Commit Graph

747706 Commits

Author SHA1 Message Date
Tan Xiaojun 48d154e7f5 net: hns3: fix length overflow when CONFIG_ARM64_64K_PAGES
When enable the config item "CONFIG_ARM64_64K_PAGES", the size of PAGE_SIZE
is 65536(64K). But the type of length is u16, it will overflow. So change it
to u32.

Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:46:14 -04:00
Dirk van der Merwe 1489bbd10e nfp: use full 40 bits of the NSP buffer address
The NSP default buffer is a piece of NFP memory where additional
command data can be placed.  Its format has been copied from
host buffer, but the PCIe selection bits do not make sense in
this case.  If those get masked out from a NFP address - writes
to random place in the chip memory may be issued and crash the
device.

Even in the general NSP buffer case, it doesn't make sense to have the
PCIe selection bits there anymore. These are unused at the moment, and
when it becomes necessary, the PCIe selection bits should rather be
moved to another register to utilise more bits for the buffer address.

This has never been an issue because the buffer used to be
allocated in memory with less-than-38-bit-long address but that
is about to change.

Fixes: 1a64821c6a ("nfp: add support for service processor access")
Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:45:24 -04:00
Alexander Graf 92571a1aae lan78xx: Connect phy early
When using wicked with a lan78xx device attached to the system, we
end up with ethtool commands issued on the device before an ifup
got issued. That lead to the following crash:

    Unable to handle kernel NULL pointer dereference at virtual address 0000039c
    pgd = ffff800035b30000
    [0000039c] *pgd=0000000000000000
    Internal error: Oops: 96000004 [#1] SMP
    Modules linked in: [...]
    Supported: Yes
    CPU: 3 PID: 638 Comm: wickedd Tainted: G            E      4.12.14-0-default #1
    Hardware name: raspberrypi rpi/rpi, BIOS 2018.03-rc2 02/21/2018
    task: ffff800035e74180 task.stack: ffff800036718000
    PC is at phy_ethtool_ksettings_get+0x20/0x98
    LR is at lan78xx_get_link_ksettings+0x44/0x60 [lan78xx]
    pc : [<ffff0000086f7f30>] lr : [<ffff000000dcca84>] pstate: 20000005
    sp : ffff80003671bb20
    x29: ffff80003671bb20 x28: ffff800035e74180
    x27: ffff000008912000 x26: 000000000000001d
    x25: 0000000000000124 x24: ffff000008f74d00
    x23: 0000004000114809 x22: 0000000000000000
    x21: ffff80003671bbd0 x20: 0000000000000000
    x19: ffff80003671bbd0 x18: 000000000000040d
    x17: 0000000000000001 x16: 0000000000000000
    x15: 0000000000000000 x14: ffffffffffffffff
    x13: 0000000000000000 x12: 0000000000000020
    x11: 0101010101010101 x10: fefefefefefefeff
    x9 : 7f7f7f7f7f7f7f7f x8 : fefefeff31677364
    x7 : 0000000080808080 x6 : ffff80003671bc9c
    x5 : ffff80003671b9f8 x4 : ffff80002c296190
    x3 : 0000000000000000 x2 : 0000000000000000
    x1 : ffff80003671bbd0 x0 : ffff80003671bc00
    Process wickedd (pid: 638, stack limit = 0xffff800036718000)
    Call trace:
    Exception stack(0xffff80003671b9e0 to 0xffff80003671bb20)
    b9e0: ffff80003671bc00 ffff80003671bbd0 0000000000000000 0000000000000000
    ba00: ffff80002c296190 ffff80003671b9f8 ffff80003671bc9c 0000000080808080
    ba20: fefefeff31677364 7f7f7f7f7f7f7f7f fefefefefefefeff 0101010101010101
    ba40: 0000000000000020 0000000000000000 ffffffffffffffff 0000000000000000
    ba60: 0000000000000000 0000000000000001 000000000000040d ffff80003671bbd0
    ba80: 0000000000000000 ffff80003671bbd0 0000000000000000 0000004000114809
    baa0: ffff000008f74d00 0000000000000124 000000000000001d ffff000008912000
    bac0: ffff800035e74180 ffff80003671bb20 ffff000000dcca84 ffff80003671bb20
    bae0: ffff0000086f7f30 0000000020000005 ffff80002c296000 ffff800035223900
    bb00: 0000ffffffffffff 0000000000000000 ffff80003671bb20 ffff0000086f7f30
    [<ffff0000086f7f30>] phy_ethtool_ksettings_get+0x20/0x98
    [<ffff000000dcca84>] lan78xx_get_link_ksettings+0x44/0x60 [lan78xx]
    [<ffff0000087cbc40>] ethtool_get_settings+0x68/0x210
    [<ffff0000087cc0d4>] dev_ethtool+0x214/0x2180
    [<ffff0000087e5008>] dev_ioctl+0x400/0x630
    [<ffff00000879dd00>] sock_do_ioctl+0x70/0x88
    [<ffff00000879f5f8>] sock_ioctl+0x208/0x368
    [<ffff0000082cde10>] do_vfs_ioctl+0xb0/0x848
    [<ffff0000082ce634>] SyS_ioctl+0x8c/0xa8
    Exception stack(0xffff80003671bec0 to 0xffff80003671c000)
    bec0: 0000000000000009 0000000000008946 0000fffff4e841d0 0000aa0032687465
    bee0: 0000aaaafa2319d4 0000fffff4e841d4 0000000032687465 0000000032687465
    bf00: 000000000000001d 7f7fff7f7f7f7f7f 72606b622e71ff4c 7f7f7f7f7f7f7f7f
    bf20: 0101010101010101 0000000000000020 ffffffffffffffff 0000ffff7f510c68
    bf40: 0000ffff7f6a9d18 0000ffff7f44ce30 000000000000040d 0000ffff7f6f98f0
    bf60: 0000fffff4e842c0 0000000000000001 0000aaaafa2c2e00 0000ffff7f6ab000
    bf80: 0000fffff4e842c0 0000ffff7f62a000 0000aaaafa2b9f20 0000aaaafa2c2e00
    bfa0: 0000fffff4e84818 0000fffff4e841a0 0000ffff7f5ad0cc 0000fffff4e841a0
    bfc0: 0000ffff7f44ce3c 0000000080000000 0000000000000009 000000000000001d
    bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000

The culprit is quite simple: The driver tries to access the phy left and right,
but only actually has a working reference to it when the device is up.

The fix thus is quite simple too: Get a reference to the phy on probe already
and keep it even when the device is going down.

With this patch applied, I can successfully run wicked on my system and bring
the interface up and down as many times as I want, without getting NULL pointer
dereferences in between.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:41:03 -04:00
Jakub Kicinski 0df57e604c nfp: add a separate counter for packets with CHECKSUM_COMPLETE
We are currently counting packets with CHECKSUM_COMPLETE as
"hw_rx_csum_ok".  This is confusing.  Add a new counter.
To make sure it fits in the same cacheline move the less used
error counter to a different location.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:36:50 -04:00
Jon Maloy b714295abc tipc: Fix missing list initializations in struct tipc_subscription
When an item of struct tipc_subscription is created, we fail to
initialize the two lists aggregated into the struct. This has so far
never been a problem, since the items are just added to a root
object by list_add(), which does not require the addee list to be
pre-initialized. However, syzbot is provoking situations where this
addition fails, whereupon the attempted removal if the item from
the list causes a crash.

This problem seems to always have been around, despite that the code
for creating this object was rewritten in commit 242e82cc95 ("tipc:
collapse subscription creation functions"), which is still in net-next.

We fix this for that commit by initializing the two lists properly.

Fixes: 242e82cc95 ("tipc: collapse subscription creation functions")
Reported-by: syzbot+0bb443b74ce09197e970@syzkaller.appspotmail.com
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:33:52 -04:00
David S. Miller f51ffde927 Merge branch 'ipv6-udp-set-dst-cache-for-a-connected-sk-if-current-not-valid'
Alexey Kodanev says:

====================
ipv6: udp: set dst cache for a connected sk if current not valid

A new RTF_CACHE route can be created with the socket's dst cache
update between the below calls in udpv6_sendmsg(), when datagram
sending results to ICMPV6_PKT_TOOBIG error:

   dst = ip6_sk_dst_lookup_flow(...)
   ...
release_dst:
    if (dst) {
        if (connected) {
            ip6_dst_store(sk, dst)

Therefore, the new socket's dst cache reset to the old one on
"release_dst:".

The first three patches prepare the code to store dst cache
with ip6_sk_dst_lookup_flow():

  * the first patch adds ip6_sk_dst_store_flow() function with
    commonly used source and destiantion addresses checks using
    the flow information.

  * the second patch adds a new argument to ip6_sk_dst_lookup_flow()
    and ability to store dst in the socket's cache. Also, the two
    users of the function are updated without enabling the new
    behavior: pingv6_sendmsg() and udpv6_sendmsg().

  * the third patch makes 'connected' variable in udpv6_sendmsg()
    to be consistent with ip6_sk_dst_store_flow(), changes its type
    from int to bool.

The last patch contains the actual fix that removes sk dst cache
update in the end of udpv6_sendmsg(), and allows to do it in
ip6_sk_dst_lookup_flow().

v6: * use bool type for a new parameter in ip_sk_dst_lookup_flow()
    * add one more patch to convert 'connected' variable in
      udpv6_sendmsg() from int to bool type. If it shouldn't be
      here I will resend it when the net-next is opened.

v5: * relocate ip6_sk_dst_store_flow() to net/ipv6/route.c and
      rename ip6_dst_store_flow() to ip6_sk_dst_store_flow() as
      suggested by Martin

v4: * fix the error in the build of ip_dst_store_flow() reported by
      kbuild test robot due to missing checks for CONFIG_IPV6: add
      new function to ip6_output.c instead of ip6_route.h
    * add 'const' to struct flowi6 in ip6_dst_store_flow()
    * minor commit messages fixes

v3: * instead of moving ip6_dst_store() above udp_v6_send_skb(),
      update socket's dst cache inside ip6_sk_dst_lookup_flow()
      if the current one is invalid
    * the issue not reproduced in 4.1, but starting from 4.2. Add
      one more 'Fixes:' commit that creates new RTF_CACHE route.
      Though, it is also mentioned in the first one
====================

Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:32:34 -04:00
Alexey Kodanev 4f858c56bd ipv6: udp: set dst cache for a connected sk if current not valid
A new RTF_CACHE route can be created between ip6_sk_dst_lookup_flow()
and ip6_dst_store() calls in udpv6_sendmsg(), when datagram sending
results to ICMPV6_PKT_TOOBIG error:

    udp_v6_send_skb(), for example with vti6 tunnel:
        vti6_xmit(), get ICMPV6_PKT_TOOBIG error
            skb_dst_update_pmtu(), can create a RTF_CACHE clone
            icmpv6_send()
    ...
    udpv6_err()
        ip6_sk_update_pmtu()
           ip6_update_pmtu(), can create a RTF_CACHE clone
           ...
           ip6_datagram_dst_update()
                ip6_dst_store()

And after commit 33c162a980 ("ipv6: datagram: Update dst cache of
a connected datagram sk during pmtu update"), the UDPv6 error handler
can update socket's dst cache, but it can happen before the update in
the end of udpv6_sendmsg(), preventing getting the new dst cache on
the next udpv6_sendmsg() calls.

In order to fix it, save dst in a connected socket only if the current
socket's dst cache is invalid.

The previous patch prepared ip6_sk_dst_lookup_flow() to do that with
the new argument, and this patch enables it in udpv6_sendmsg().

Fixes: 33c162a980 ("ipv6: datagram: Update dst cache of a connected datagram sk during pmtu update")
Fixes: 45e4fd2668 ("ipv6: Only create RTF_CACHE routes after encountering pmtu exception")
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:31:57 -04:00
Alexey Kodanev 9f542f616c ipv6: udp: convert 'connected' to bool type in udpv6_sendmsg()
This should make it consistent with ip6_sk_dst_lookup_flow()
that is accepting the new 'connected' parameter of type bool.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:31:57 -04:00
Alexey Kodanev 96818159c3 ipv6: allow to cache dst for a connected sk in ip6_sk_dst_lookup_flow()
Add 'connected' parameter to ip6_sk_dst_lookup_flow() and update
the cache only if ip6_sk_dst_check() returns NULL and a socket
is connected.

The function is used as before, the new behavior for UDP sockets
in udpv6_sendmsg() will be enabled in the next patch.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:31:57 -04:00
Alexey Kodanev 7d6850f7c6 ipv6: add a wrapper for ip6_dst_store() with flowi6 checks
Move commonly used pattern of ip6_dst_store() usage to a separate
function - ip6_sk_dst_store_flow(), which will check the addresses
for equality using the flow information, before saving them.

There is no functional changes in this patch. In addition, it will
be used in the next patch, in ip6_sk_dst_lookup_flow().

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:31:57 -04:00
Russell King 0d3ad8549c net: phy: marvell10g: add thermal hwmon device
Add a thermal monitoring device for the Marvell 88x3310, which updates
once a second.  We also need to hook into the suspend/resume mechanism
to ensure that the thermal monitoring is reconfigured when we resume.

Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:24:54 -04:00
Eric Dumazet bfacfb457b pptp: remove a buggy dst release in pptp_connect()
Once dst has been cached in socket via sk_setup_caps(),
it is illegal to call ip_rt_put() (or dst_release()),
since sk_setup_caps() did not change dst refcount.

We can still dereference it since we hold socket lock.

Caugth by syzbot :

BUG: KASAN: use-after-free in atomic_dec_return include/asm-generic/atomic-instrumented.h:198 [inline]
BUG: KASAN: use-after-free in dst_release+0x27/0xa0 net/core/dst.c:185
Write of size 4 at addr ffff8801c54dc040 by task syz-executor4/20088

CPU: 1 PID: 20088 Comm: syz-executor4 Not tainted 4.16.0+ #376
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1a7/0x27d lib/dump_stack.c:53
 print_address_description+0x73/0x250 mm/kasan/report.c:256
 kasan_report_error mm/kasan/report.c:354 [inline]
 kasan_report+0x23c/0x360 mm/kasan/report.c:412
 check_memory_region_inline mm/kasan/kasan.c:260 [inline]
 check_memory_region+0x137/0x190 mm/kasan/kasan.c:267
 kasan_check_write+0x14/0x20 mm/kasan/kasan.c:278
 atomic_dec_return include/asm-generic/atomic-instrumented.h:198 [inline]
 dst_release+0x27/0xa0 net/core/dst.c:185
 sk_dst_set include/net/sock.h:1812 [inline]
 sk_dst_reset include/net/sock.h:1824 [inline]
 sock_setbindtodevice net/core/sock.c:610 [inline]
 sock_setsockopt+0x431/0x1b20 net/core/sock.c:707
 SYSC_setsockopt net/socket.c:1845 [inline]
 SyS_setsockopt+0x2ff/0x360 net/socket.c:1828
 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4552d9
RSP: 002b:00007f4878126c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007f48781276d4 RCX: 00000000004552d9
RDX: 0000000000000019 RSI: 0000000000000001 RDI: 0000000000000013
RBP: 000000000072bea0 R08: 0000000000000010 R09: 0000000000000000
R10: 00000000200010c0 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000526 R14: 00000000006fac30 R15: 0000000000000000

Allocated by task 20088:
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552
 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489
 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3542
 dst_alloc+0x11f/0x1a0 net/core/dst.c:104
 rt_dst_alloc+0xe9/0x540 net/ipv4/route.c:1520
 __mkroute_output net/ipv4/route.c:2265 [inline]
 ip_route_output_key_hash_rcu+0xa49/0x2c60 net/ipv4/route.c:2493
 ip_route_output_key_hash+0x20b/0x370 net/ipv4/route.c:2322
 __ip_route_output_key include/net/route.h:126 [inline]
 ip_route_output_flow+0x26/0xa0 net/ipv4/route.c:2577
 ip_route_output_ports include/net/route.h:163 [inline]
 pptp_connect+0xa84/0x1170 drivers/net/ppp/pptp.c:453
 SYSC_connect+0x213/0x4a0 net/socket.c:1639
 SyS_connect+0x24/0x30 net/socket.c:1620
 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

Freed by task 20082:
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520
 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527
 __cache_free mm/slab.c:3486 [inline]
 kmem_cache_free+0x83/0x2a0 mm/slab.c:3744
 dst_destroy+0x266/0x380 net/core/dst.c:140
 dst_destroy_rcu+0x16/0x20 net/core/dst.c:153
 __rcu_reclaim kernel/rcu/rcu.h:178 [inline]
 rcu_do_batch kernel/rcu/tree.c:2675 [inline]
 invoke_rcu_callbacks kernel/rcu/tree.c:2930 [inline]
 __rcu_process_callbacks kernel/rcu/tree.c:2897 [inline]
 rcu_process_callbacks+0xd6c/0x17b0 kernel/rcu/tree.c:2914
 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285

The buggy address belongs to the object at ffff8801c54dc000
 which belongs to the cache ip_dst_cache of size 168
The buggy address is located 64 bytes inside of
 168-byte region [ffff8801c54dc000, ffff8801c54dc0a8)
The buggy address belongs to the page:
page:ffffea0007153700 count:1 mapcount:0 mapping:ffff8801c54dc000 index:0x0
flags: 0x2fffc0000000100(slab)
raw: 02fffc0000000100 ffff8801c54dc000 0000000000000000 0000000100000010
raw: ffffea0006b34b20 ffffea0006b6c1e0 ffff8801d674a1c0 0000000000000000
page dumped because: kasan: bad access detected

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:17:55 -04:00
Florian Fainelli 18bd5949e5 net: dsa: mt7530: Use NULL instead of plain integer
We would be passing 0 instead of NULL as the rsp argument to
mt7530_fdb_cmd(), fix that.

Fixes: b8f126a8d5 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:15:49 -04:00
Florian Fainelli 861690d054 net: dsa: b53: Fix sparse warnings in b53_mmap.c
sparse complains about the following warnings:

drivers/net/dsa/b53/b53_mmap.c:33:31: warning: incorrect type in
initializer (different address spaces)
drivers/net/dsa/b53/b53_mmap.c:33:31:    expected unsigned char
[noderef] [usertype] <asn:2>*regs
drivers/net/dsa/b53/b53_mmap.c:33:31:    got void *priv

and indeed, while what we are doing is functional, we are dereferencing
a void * pointer into a void __iomem * which is not great. Just use the
defined b53_mmap_priv structure which holds our register base and use
that.

Fixes: 967dd82ffc ("net: dsa: b53: Add support for Broadcom RoboSwitch")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:15:27 -04:00
Cong Wang 3848ec5dc8 af_unix: remove redundant lockdep class
After commit 581319c586 ("net/socket: use per af lockdep classes for sk queues")
sock queue locks now have per-af lockdep classes, including unix socket.
It is no longer necessary to workaround it.

I noticed this while looking at a syzbot deadlock report, this patch
itself doesn't fix it (this is why I don't add Reported-by).

Fixes: 581319c586 ("net/socket: use per af lockdep classes for sk queues")
Cc: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:13:40 -04:00
David S. Miller 51508179ec Merge branch 'net-Broadcom-drivers-sparse-fixes'
Florian Fainelli says:

====================
net: Broadcom drivers sparse fixes

This patch series fixes the same warning reported by sparse in bcmsysport and
bcmgenet in the code that deals with inserting the TX checksum pointers:

drivers/net/ethernet/broadcom/bcmsysport.c:1155:26: warning: cast from restricted __be16
drivers/net/ethernet/broadcom/bcmsysport.c:1155:26: warning: incorrect type in argument 1 (different base types)
drivers/net/ethernet/broadcom/bcmsysport.c:1155:26:    expected unsigned short [unsigned] [usertype] val
drivers/net/ethernet/broadcom/bcmsysport.c:1155:26:    got restricted __be16 [usertype] protocol

This patch fixes both issues by using the same construct and not swapping
skb->protocol but instead the values we are checking against.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:07:21 -04:00
Florian Fainelli c0eb05585d net: systemport: Fix sparse warnings in bcm_sysport_insert_tsb()
skb->protocol is a __be16 which we would be calling htons() against,
while this is not wrong per-se as it correctly results in swapping the
value on LE hosts, this still upsets sparse. Adopt a similar pattern to
what other drivers do and just assign ip_ver to skb->protocol, and then
use htons() against the different constants such that the compiler can
resolve the values at build time.

Fixes: 80105befdb ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:07:21 -04:00
Florian Fainelli 6f89421180 net: bcmgenet: Fix sparse warnings in bcmgenet_put_tx_csum()
skb->protocol is a __be16 which we would be calling htons() against,
while this is not wrong per-se as it correctly results in swapping the
value on LE hosts, this still upsets sparse. Adopt a similar pattern to
what other drivers do and just assign ip_ver to skb->protocol, and then
use htons() against the different constants such that the compiler can
resolve the values at build time.

Fixes: 1c1008c793 ("net: bcmgenet: add main driver file")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:07:21 -04:00
David Howells b41d7cfef5 rxrpc: Fix undefined packet handling
By analogy with other Rx implementations, RxRPC packet types 9, 10 and 11
should just be discarded rather than being aborted like other undefined
packet types.

Reported-by: Jeffrey Altman <jaltman@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 11:04:08 -04:00
Palmer Dabbelt 83fbdf1c05 openrisc: Set CONFIG_MULTI_IRQ_HANDLER
arm has an optional MULTI_IRQ_HANDLER, which openrisc copied but didn't
make optional.  The multi irq handler infrastructure has been copied to
generic code selectable with a new config symbol. That symbol can be
selected by randconfig builds and can cause build breakage.

Introduce CONFIG_MULTI_IRQ_HANDLER as an intermediate step which prevents
the core config symbol from being selected. The openrisc local config
symbol will be removed once openrisc gets converted to the generic code.

Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: https://lkml.kernel.org/r/20180404043130.31277-3-palmer@sifive.com
2018-04-04 12:04:28 +02:00
Palmer Dabbelt 667b24d049 arm64: Set CONFIG_MULTI_IRQ_HANDLER
arm has an optional MULTI_IRQ_HANDLER, which arm64 copied but didn't make
optional.  The multi irq handler infrastructure has been copied to generic
code selectable with a new config symbol. That symbol can be selected by
randconfig builds and can cause build breakage.

Introduce CONFIG_MULTI_IRQ_HANDLER as an intermediate step which prevents
the core config symbol from being selected. The arm64 local config symbol
will be removed once arm64 gets converted to the generic code.

Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: https://lkml.kernel.org/r/20180404043130.31277-2-palmer@sifive.com
2018-04-04 12:04:28 +02:00
Palmer Dabbelt d6f73825dc genirq: Make GENERIC_IRQ_MULTI_HANDLER depend on !MULTI_IRQ_HANDLER
These config switches enable the same code in the core and the not yet
converted architecture code. They can be selected both by randconfig builds
and cause linker error because the same symbols are defined twice.

Make the new GENERIC_IRQ_MULTI_HANDLER depend on !MULTI_IRQ_HANDLER to
prevent that. The dependency will be removed once all architectures are
converted over.

Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: https://lkml.kernel.org/r/20180404043130.31277-4-palmer@sifive.com
2018-04-04 12:04:28 +02:00
Al Viro 04bbc9795d Merge branch 'old.dcache' into work.dcache 2018-04-04 00:40:19 -04:00
Linus Torvalds 17dec0a949 Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull namespace updates from Eric Biederman:
 "There was a lot of work this cycle fixing bugs that were discovered
  after the merge window and getting everything ready where we can
  reasonably support fully unprivileged fuse. The bug fixes you already
  have and much of the unprivileged fuse work is coming in via other
  trees.

  Still left for fully unprivileged fuse is figuring out how to cleanly
  handle .set_acl and .get_acl in the legacy case, and properly handling
  of evm xattrs on unprivileged mounts.

  Included in the tree is a cleanup from Alexely that replaced a linked
  list with a statically allocated fix sized array for the pid caches,
  which simplifies and speeds things up.

  Then there is are some cleanups and fixes for the ipc namespace. The
  motivation was that in reviewing other code it was discovered that
  access ipc objects from different pid namespaces recorded pids in such
  a way that when asked the wrong pids were returned. In the worst case
  there has been a measured 30% performance impact for sysvipc
  semaphores. Other test cases showed no measurable performance impact.
  Manfred Spraul and Davidlohr Bueso who tend to work on sysvipc
  performance both gave the nod that this is good enough.

  Casey Schaufler and James Morris have given their approval to the LSM
  side of the changes.

  I simplified the types and the code dealing with sysvipc to pass just
  kern_ipc_perm for all three types of ipc. Which reduced the header
  dependencies throughout the kernel and simplified the lsm code.

  Which let me work on the pid fixes without having to worry about
  trivial changes causing complete kernel recompiles"

* 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
  ipc/shm: Fix pid freeing.
  ipc/shm: fix up for struct file no longer being available in shm.h
  ipc/smack: Tidy up from the change in type of the ipc security hooks
  ipc: Directly call the security hook in ipc_ops.associate
  ipc/sem: Fix semctl(..., GETPID, ...) between pid namespaces
  ipc/msg: Fix msgctl(..., IPC_STAT, ...) between pid namespaces
  ipc/shm: Fix shmctl(..., IPC_STAT, ...) between pid namespaces.
  ipc/util: Helpers for making the sysvipc operations pid namespace aware
  ipc: Move IPCMNI from include/ipc.h into ipc/util.h
  msg: Move struct msg_queue into ipc/msg.c
  shm: Move struct shmid_kernel into ipc/shm.c
  sem: Move struct sem and struct sem_array into ipc/sem.c
  msg/security: Pass kern_ipc_perm not msg_queue into the msg_queue security hooks
  shm/security: Pass kern_ipc_perm not shmid_kernel into the shm security hooks
  sem/security: Pass kern_ipc_perm not sem_array into the sem security hooks
  pidns: simpler allocation of pid_* caches
2018-04-03 19:15:32 -07:00
Linus Torvalds d92cd810e6 Merge branch 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue updates from Tejun Heo:
 "rcu_work addition and a couple trivial changes"

* 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: remove the comment about the old manager_arb mutex
  workqueue: fix the comments of nr_idle
  fs/aio: Use rcu_work instead of explicit rcu and work item
  cgroup: Use rcu_work instead of explicit rcu and work item
  RCU, workqueue: Implement rcu_work
2018-04-03 18:00:13 -07:00
Linus Torvalds a23867f1d2 Merge branch 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Pull libata updates from Tejun Heo:
 "Nothing too interesting.

  The biggest change is refcnting fix for ata_host - the bug is recent
  and can only be triggered on controller hotplug, so very few are
  hitting it.

  There also are a number of trivial license / error message changes and
  some hardware specific changes"

* 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (23 commits)
  ahci: imx: add the imx8qm ahci sata support
  libata: ensure host is free'd on error exit paths
  ata: ahci-platform: add reset control support
  ahci: imx: fix the build warning
  ata: add Amiga Gayle PATA controller driver
  ahci: imx: add the imx6qp ahci sata support
  ata: change Tegra124 to Tegra
  ata: ahci_tegra: Add AHCI support for Tegra210
  ata: ahci_tegra: disable DIPM
  ata: ahci_tegra: disable devslp for Tegra124
  ata: ahci_tegra: initialize regulators from soc struct
  ata: ahci_tegra: Update initialization sequence
  dt-bindings: Tegra210: add binding documentation
  libata: add refcounting to ata_host
  pata_bk3710: clarify license version and use SPDX header
  pata_falcon: clarify license version and use SPDX header
  pata_it821x: Delete an error message for a failed memory allocation in it821x_firmware_command()
  pata_macio: Delete an error message for a failed memory allocation in two functions
  pata_mpc52xx: Delete an error message for a failed memory allocation in mpc52xx_ata_probe()
  sata_dwc_460ex: Delete an error message for a failed memory allocation in sata_dwc_port_start()
  ...
2018-04-03 17:42:25 -07:00
James Bottomley 2e1f44f6ad Merge branch 'fixes' into misc
Somewhat nasty merge due to conflicts between "33b28357dd00 scsi:
qla2xxx: Fix Async GPN_FT for FCP and FC-NVMe scan" and "2b5b96473efc
scsi: qla2xxx: Fix FC-NVMe LUN discovery"

Merge is non-trivial and has been verified by Qlogic (Cavium)

Signed-off-by: James E.J. Bottomley <jejb@linux.vnet.ibm.com>
2018-04-03 17:38:39 -07:00
Linus Torvalds ef1c4a6fa9 media updates for v4.17-rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJaw1yeAAoJEAhfPr2O5OEVDDgQAIYpin6obedJOm7zIm741Q0S
 fS2FL2pygyvHlVtU20ERHgvM6aD5tujekpDM4+GNgnq0aAabxvqBvdohmHQjyVSw
 FgszgY6kQSnI8S4Oy9RB8H/MFRq7Wz9Qf+KmJh0SfuUoMzBe2A40yLjYQ+sAMJr9
 mm0ijxxRpFYikVtIBgKDbjnx6wdkOs12M7YlJuI8N/tMBHMt+p2EfvqcX6GF725i
 sgLGcMsTJr1sUSyY8vnM2pAlKfZL2tZqigx5f9sB4UM7uHSw/oL/a/8I+t6Mju1X
 J1BD3L7UtTpwqO9sAR5BsJQ+0pAkXNOF+eLGs2p9rx4sO0DOLKoUptMI+YryvE86
 /SOlTskSSAeX/rBFyZJw1zv0/9mdGrHoyCy0q/lfDkD/mQkrUJDDZ7GPLqZ9rLUe
 2cXn1xMWB/soeR70oTyew0D2SZkp6y4DQr0Rwje7V8/SOWMmJvhaVIWhVIP9ZrS6
 AvCS7WUYTTVIX+td2glnLkJ5SaXXJyRYv8Utp/TUrYvCFOX7wsk7F0pRY4PE4PeZ
 BL7Bl8H9l3HGWWhdqPvw+ETdJgcbq/IwVUcpuuEPjkhDZEqHz//vzwoPt1nT4v6M
 gfqfaW5LaYuj0MYYqyxZMDwP3FWk4SsQ0NZzmaFs+yfE17bcWUMuf3ZVJtjmLxzk
 RUo0E/7RZsrw7LkCy0KF
 =bzhS
 -----END PGP SIGNATURE-----

Merge tag 'media/v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - new CEC pin injection code for testing purposes

 - DVB frontend cxd2099 promoted from staging

 - new platform driver for Sony cxd2880 DVB devices

 - new sensor drivers: mt9t112, ov2685, ov5695, ov772x, tda1997x,
   tw9910.c

 - removal of unused cx18 and ivtv alsa mixers

 - the reneseas-ceu driver doesn't depend on soc_camera anymore and
   moved from staging

 - removed the mantis_vp3028 driver, unused since 2009

 - s5p-mfc: add support for version 10 of the MSP

 - added a decoder for imon protocol

 - atomisp: lots of cleanups

 - imx074 and mt9t031: don't depend on soc_camera anymore, being
   promoted from staging

 - added helper functions to better support DVB I2C binding

 - lots of driver improvements and cleanups

* tag 'media/v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (438 commits)
  media: v4l2-ioctl: rename a temp var that stores _IOC_SIZE(cmd)
  media: fimc-capture: get rid of two warnings
  media: dvb-usb-v2: fix a missing dependency of I2C_MUX
  media: uvc: to the right check at uvc_ioctl_enum_framesizes()
  media: cec-core: fix a bug at cec_error_inj_write()
  media: tda9840: cleanup a warning
  media: tm6000:  avoid casting just to print pointer address
  media: em28xx-input: improve error handling code
  media: zr364xx: avoid casting just to print pointer address
  media: vivid-radio-rx: add a cast to avoid a warning
  media: saa7134-alsa: don't use casts to print a buffer address
  media: solo6x10: get rid of an address space warning
  media: zoran: don't cast pointers to print them
  media: ir-kbd-i2c: change the if logic to avoid a warning
  media: ir-kbd-i2c: improve error handling code
  media: saa7134-input: improve error handling
  media: s2255drv: fix a casting warning
  media: ivtvfb: Cleanup some warnings
  media: videobuf-dma-sg: Fix a weird cast
  soc_camera: fix a weird cast on printk
  ...
2018-04-03 17:16:59 -07:00
Linus Torvalds 147a89bc71 Kconfig updates for v4.17
- improve checkpatch for more precise Kconfig code checking
 
 - clarify effective selects by grouping reverse dependencies in help
 
 - do not write out '# CONFIG_FOO is not set' from invisible symbols
 
 - make oldconfig as silent as it should be
 
 - rename 'silentoldconfig' to 'syncconfig'
 
 - add unit-test framework and several test cases
 
 - warn unmet dependency of tristate symbols
 
 - make unmet dependency warnings readable, removing false positives
 
 - improve recursive include detection
 
 - use yylineno to simplify the line number tracking
 
 - misc cleanups
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJaw6i1AAoJED2LAQed4NsGU7oP/Rc5DJmtQXbqONvEfVskfNzL
 NaQekDa4QuWRCbrAdRZM+8dlAgX76kXHd0I1LnL6XeCZ2KZ7f93zxpqBKHZAteGU
 Y6b06tDXiW9qIdI0wzfKB3KdZo0Jc1LELv7SMRrZ7+wFXZKmhh5M0mVX17sKrQai
 L3wPMqiu15ve2Ya9s8F8+PGFBZfqzhOBEzYij8YtTZWFWVEfoLDDD5YDUxQNcJrS
 FXO+fZH5EUpoWj+JseiIPuOKASChsyeqtwqCND444IrjqDQ0TLAyJSZJhSm+6bX3
 qP/yMH0K+kMMkvKp8CCnaTfwkOJ2BZo+91Ydw1mnqLdnZ8gZndnyexrBFubIv+fJ
 0KxX9IyGA+RBnwArsnF1yIoryktG3xtaR5diO2p5ztd8xgptKG+PqQfJ40DHjpu4
 iZNpoVPIPh669w/Dfx033t1RZVhov8Mau2dZ5RCtpvXAAS6oRe+UmaazqUGt7O2z
 V8ekSNL3g7FN3YYx0awXJWzX8e3BDMOcUjRvw/SI16XBk0BdHiBMrYfnRN+e3mpy
 FjhzZdXajJclNwMVbUOAPaQypvbBQJjBMy0ryz05ZyTPEsmJqM+WjkPSLDppnMYT
 8L3C5KSqC7WKdf1bj55YdGWyfyU0P9bCO026IClnvZNZDI/bg+3gB9ocyRfZG0sL
 0Q7GJF+BixbUUQeUcejm
 =sKto
 -----END PGP SIGNATURE-----

Merge tag 'kconfig-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kconfig updates from Masahiro Yamada:

 - improve checkpatch for more precise Kconfig code checking

 - clarify effective selects by grouping reverse dependencies in help

 - do not write out '# CONFIG_FOO is not set' from invisible symbols

 - make oldconfig as silent as it should be

 - rename 'silentoldconfig' to 'syncconfig'

 - add unit-test framework and several test cases

 - warn unmet dependency of tristate symbols

 - make unmet dependency warnings readable, removing false positives

 - improve recursive include detection

 - use yylineno to simplify the line number tracking

 - misc cleanups

* tag 'kconfig-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits)
  kconfig: use yylineno option instead of manual lineno increments
  kconfig: detect recursive inclusion earlier
  kconfig: remove duplicated file name and lineno of recursive inclusion
  kconfig: do not include both curses.h and ncurses.h for nconfig
  kconfig: make unmet dependency warnings readable
  kconfig: warn unmet direct dependency of tristate symbols selected by y
  kconfig: tests: test if recursive inclusion is detected
  kconfig: tests: test if recursive dependencies are detected
  kconfig: tests: test randconfig for choice in choice
  kconfig: tests: test defconfig when two choices interact
  kconfig: tests: check visibility of tristate choice values in y choice
  kconfig: tests: check unneeded "is not set" with unmet dependency
  kconfig: tests: test if new symbols in choice are asked
  kconfig: tests: test automatic submenu creation
  kconfig: tests: add basic choice tests
  kconfig: tests: add framework for Kconfig unit testing
  kbuild: add PYTHON2 and PYTHON3 variables
  kconfig: remove redundant streamline_config.pl prerequisite
  kconfig: rename silentoldconfig to syncconfig
  kconfig: invoke oldconfig instead of silentoldconfig from local*config
  ...
2018-04-03 16:28:01 -07:00
Linus Torvalds 3b24b83763 Kbuild updates for v4.17
- add a shell script to get Clang version
 
 - improve portability of build scripts
 
 - drop always-enabled CONFIG_THIN_ARCHIVE and remove unused code
 
 - rename built-in.o which is now thin archive to built-in.a
 
 - process clean/build targets one by one to get along with -j option
 
 - simplify ld-option
 
 - improve building with CONFIG_TRIM_UNUSED_KSYMS
 
 - define KBUILD_MODNAME even for objects shared among multiple modules
 
 - avoid linking multiple instances of same objects from composite objects
 
 - move <linux/compiler_types.h> to c_flags to include it only for C files
 
 - clean-up various Makefiles
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJaw6eWAAoJED2LAQed4NsGrK8QAJmbYg83TTNoOgQRK/7Lg+sj
 KL1+RGFxmdHRVOqG5n18L7Q4LmTD19tUFNQImrQTTrKrbH2vbMSTF2PfzdmDRwMz
 R5vW5+wsagfhSttOce/GR4p9+bM9XEclzEa3liqNVQxijOFXmkV14pn0x5anYfeB
 ABthxFFHcVn3exP/q3lmq048x1yNE71wUU5WQIWf6V/ZKf+++wQU8r7HpnATWYeO
 vtf8gZq+xyLLjhxoJF6n6olSZXI7Yhz4jV2G68/VroS312AUFWPogK+cSshWGlSw
 zGixM1q55oj9CXjZ37nR6pTzQhSZLf/uHX5beatlpeoJ4Hho6HlIABvx2oEnat7b
 o5RW64RB0gVJqlYZdKxL29HNrovr9tlWPTaIPGFRvWDpl3c1w+rMKXE+5hwu8jMJ
 2jgxd5FZCgBaDsAKojmeQR7PAo2ffAdUO0Dj/SuAaMOpuHWHcnJk9kIN2PUrC+Sf
 d/H2soT9x+60KbQmtCEo5VfEN8bvNP3+ZSnadEG/gRN2IIa5FZAUQykU+i50gAvj
 tuKAokdRGZHvXM+buYFBfN6RbhVCXzBF/fAG7r37QVR2u1zaUszmgFOUqERhTQfm
 RNnyeAs9G9rljtna/AD7cIOdKTg8oETPISxt8Y6EzNMpI8PhF0aGoxso3yD19oH1
 M+fq55RigsR48Kic40hY
 =N5BL
 -----END PGP SIGNATURE-----

Merge tag 'kbuild-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild updates from Masahiro Yamada:

 - add a shell script to get Clang version

 - improve portability of build scripts

 - drop always-enabled CONFIG_THIN_ARCHIVE and remove unused code

 - rename built-in.o which is now thin archive to built-in.a

 - process clean/build targets one by one to get along with -j option

 - simplify ld-option

 - improve building with CONFIG_TRIM_UNUSED_KSYMS

 - define KBUILD_MODNAME even for objects shared among multiple modules

 - avoid linking multiple instances of same objects from composite
   objects

 - move <linux/compiler_types.h> to c_flags to include it only for C
   files

 - clean-up various Makefiles

* tag 'kbuild-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (29 commits)
  kbuild: get <linux/compiler_types.h> out of <linux/kconfig.h>
  kbuild: clean up link rule of composite modules
  kbuild: clean up archive rule of built-in.a
  kbuild: remove partial section mismatch detection for built-in.a
  net: liquidio: clean up Makefile for simpler composite object handling
  lib: zstd: clean up Makefile for simpler composite object handling
  kbuild: link $(real-obj-y) instead of $(obj-y) into built-in.a
  kbuild: rename real-objs-y/m to real-obj-y/m
  kbuild: move modname and modname-multi close to modname_flags
  kbuild: simplify modname calculation
  kbuild: fix modname for composite modules
  kbuild: define KBUILD_MODNAME even if multiple modules share objects
  kbuild: remove unnecessary $(subst $(obj)/, , ...) in modname-multi
  kbuild: Use ls(1) instead of stat(1) to obtain file size
  kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS
  kbuild: move include/config/ksym/* to include/ksym/*
  kbuild: move CONFIG_TRIM_UNUSED_KSYMS code unneeded for external module
  kbuild: restore autoksyms.h touch to the top Makefile
  kbuild: move 'scripts' target below
  kbuild: remove wrong 'touch' in adjust_autoksyms.sh
  ...
2018-04-03 15:51:22 -07:00
Linus Torvalds 0734e00ef9 Merge branch 'parisc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller:
 "Lots of small enhancements and fixes in this patchset:

   - improved the x86-64 compatibility for PCI cards by returning -1UL
     for timed out MMIO transactions (instead of crashing)

   - fixed HPMC handler for PAT machines: size needs to be multiple of 16

   - prepare machine_power_off() to be able to turn rp3410 and c8000
     machines off via IMPI

   - added code to extract machine info for usage with qemu

   - some init sections fixes

   - lots of fixes for sparse-, ubsan- and uninitalized variables
     warnings"

* 'parisc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Fix out of array access in match_pci_device()
  parisc: Add code generator for Qemu/SeaBIOS machine info
  parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode
  parisc: Fix HPMC handler by increasing size to multiple of 16 bytes
  parisc: Directly call machine_power_off() in power button driver
  parisc: machine_power_off() should call pm_power_off()
  parisc/Kconfig: SMP kernels boot on all machines
  parisc: Silence uninitialized variable warning in dbl_to_sgl_fcnvff()
  parisc: Move various functions and strings to init section
  parisc: Convert MAP_TYPE to cover 4 bits on parisc
  parisc: Force to various endian types for sparse
  parisc/gscps2: Fix sparse warnings
  parisc/led: Fix sparse warnings
  parisc/parport_gsc: Use NULL to avoid sparse warning
  parisc/stifb: Use fb_memset() to avoid sparse warning
2018-04-03 15:48:04 -07:00
Linus Torvalds 4608f06453 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next
Pull sparc updates from David Miller:

 1) Add support for ADI (Application Data Integrity) found in more
    recent sparc64 cpus. Essentially this is keyed based access to
    virtual memory, and if the key encoded in the virual address is
    wrong you get a trap.

    The mm changes were reviewed by Andrew Morton and others.

    Work by Khalid Aziz.

 2) Validate DAX completion index range properly, from Rob Gardner.

 3) Add proper Kconfig deps for DAX driver. From Guenter Roeck.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next:
  sparc64: Make atomic_xchg() an inline function rather than a macro.
  sparc64: Properly range check DAX completion index
  sparc: Make auxiliary vectors for ADI available on 32-bit as well
  sparc64: Oracle DAX driver depends on SPARC64
  sparc64: Update signal delivery to use new helper functions
  sparc64: Add support for ADI (Application Data Integrity)
  mm: Allow arch code to override copy_highpage()
  mm: Clear arch specific VM flags on protection change
  mm: Add address parameter to arch_validate_prot()
  sparc64: Add auxiliary vectors to report platform ADI properties
  sparc64: Add handler for "Memory Corruption Detected" trap
  sparc64: Add HV fault type handlers for ADI related faults
  sparc64: Add support for ADI register fields, ASIs and traps
  mm, swap: Add infrastructure for saving page metadata on swap
  signals, sparc: Add signal codes for ADI violations
2018-04-03 14:08:58 -07:00
Linus Torvalds 5bb053bef8 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:

 1) Support offloading wireless authentication to userspace via
    NL80211_CMD_EXTERNAL_AUTH, from Srinivas Dasari.

 2) A lot of work on network namespace setup/teardown from Kirill Tkhai.
    Setup and cleanup of namespaces now all run asynchronously and thus
    performance is significantly increased.

 3) Add rx/tx timestamping support to mv88e6xxx driver, from Brandon
    Streiff.

 4) Support zerocopy on RDS sockets, from Sowmini Varadhan.

 5) Use denser instruction encoding in x86 eBPF JIT, from Daniel
    Borkmann.

 6) Support hw offload of vlan filtering in mvpp2 dreiver, from Maxime
    Chevallier.

 7) Support grafting of child qdiscs in mlxsw driver, from Nogah
    Frankel.

 8) Add packet forwarding tests to selftests, from Ido Schimmel.

 9) Deal with sub-optimal GSO packets better in BBR congestion control,
    from Eric Dumazet.

10) Support 5-tuple hashing in ipv6 multipath routing, from David Ahern.

11) Add path MTU tests to selftests, from Stefano Brivio.

12) Various bits of IPSEC offloading support for mlx5, from Aviad
    Yehezkel, Yossi Kuperman, and Saeed Mahameed.

13) Support RSS spreading on ntuple filters in SFC driver, from Edward
    Cree.

14) Lots of sockmap work from John Fastabend. Applications can use eBPF
    to filter sendmsg and sendpage operations.

15) In-kernel receive TLS support, from Dave Watson.

16) Add XDP support to ixgbevf, this is significant because it should
    allow optimized XDP usage in various cloud environments. From Tony
    Nguyen.

17) Add new Intel E800 series "ice" ethernet driver, from Anirudh
    Venkataramanan et al.

18) IP fragmentation match offload support in nfp driver, from Pieter
    Jansen van Vuuren.

19) Support XDP redirect in i40e driver, from Björn Töpel.

20) Add BPF_RAW_TRACEPOINT program type for accessing the arguments of
    tracepoints in their raw form, from Alexei Starovoitov.

21) Lots of striding RQ improvements to mlx5 driver with many
    performance improvements, from Tariq Toukan.

22) Use rhashtable for inet frag reassembly, from Eric Dumazet.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1678 commits)
  net: mvneta: improve suspend/resume
  net: mvneta: split rxq/txq init and txq deinit into SW and HW parts
  ipv6: frags: fix /proc/sys/net/ipv6/ip6frag_low_thresh
  net: bgmac: Fix endian access in bgmac_dma_tx_ring_free()
  net: bgmac: Correctly annotate register space
  route: check sysctl_fib_multipath_use_neigh earlier than hash
  fix typo in command value in drivers/net/phy/mdio-bitbang.
  sky2: Increase D3 delay to sky2 stops working after suspend
  net/mlx5e: Set EQE based as default TX interrupt moderation mode
  ibmvnic: Disable irqs before exiting reset from closed state
  net: sched: do not emit messages while holding spinlock
  vlan: also check phy_driver ts_info for vlan's real device
  Bluetooth: Mark expected switch fall-throughs
  Bluetooth: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for BTUSB_QCA_ROME
  Bluetooth: btrsi: remove unused including <linux/version.h>
  Bluetooth: hci_bcm: Remove DMI quirk for the MINIX Z83-4
  sh_eth: kill useless check in __sh_eth_get_regs()
  sh_eth: add sh_eth_cpu_data::no_xdfar flag
  ipv6: factorize sk_wmem_alloc updates done by __ip6_append_data()
  ipv4: factorize sk_wmem_alloc updates done by __ip_append_data()
  ...
2018-04-03 14:04:18 -07:00
Linus Torvalds bb2407a721 There's been a fair amount of activity in Documentation/ this time around:
- Lots of work aligning Documentation/ABI with reality, done by Aishwarya
    Pant.
 
  - The trace documentation has been converted to RST by Changbin Du
 
  - I thrashed up kernel-doc to deal with a parsing issue and to try to make
    the code more readable.  It's still a 20+-year-old Perl hack, though.
 
  - Lots of other updates, typo fixes, and more.
 -----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCAAtFiEEUOvtSCFqLxY/7px3jc41VjAi5XoFAlrCPGYPHGNvcmJldEBs
 d24ubmV0AAoJEI3ONVYwIuV6izAP/1DpGfBdnrG4TZkCf+qQHT19ZluwGm+wOBF4
 +7qa6It4BL4PbSmSSZx79yZIpeSL96codCWMFSrud71WzOzfCtidyzOduuqvEluJ
 3Fhl+hxyDYDQGpPt4y7rPbjh23dliXHFzYycfsFn7H9Gj4MX74c6ktRlPUwIgR/D
 YFyE2jEKUU/2wblpZgcGdS49AUZAWiC9kS2Z9lSrIswcy+G2eZ1qUfbX60tge0op
 nLKWlWwv2hTO0KnYJebdHwQsRe5DkW9smPiG1fsCX5CUT1auZY9FVK3KS2AUVxia
 vilpUZrjEzuSa1EKWcflpmR/RuZ37a3fhc+cDoHrnCDp5FxOkdGp035Tx0/mgIDv
 I7TrUJzt+jawdVo7fMbsDcSmd12Dmsl16knVN4WXSfD1JUiTZNAIEnEH4fF5fsIF
 nvASedA9rsRRvMYEqqFIAPFJxdmfm3mWBKpOVhQyyAT3/T+vR1+rr6pGmThjHL09
 DZUCiPpdFqZZ8fhNZQxjQvbIkZFHLCrl1zNENlEPtvOXGZfNTdcag2mA87n4JVfp
 gCf1TuEvQ/aCMSL5V7aS3exXeaq1Xe+1P4+JOhY/Rv1SbI1JopChvO8z3ElHsKzN
 x+0UBYDjXSeD5LS0lCBytKo3IZLJAxabSLK4eMLdVr60kNi3c3cgtlUjNx+LTRVu
 tr7nWWLY
 =QQ/a
 -----END PGP SIGNATURE-----

Merge tag 'docs-4.17' of git://git.lwn.net/linux

Pull documentation updates from Jonathan Corbet:
 "There's been a fair amount of activity in Documentation/ this time
  around:

   - Lots of work aligning Documentation/ABI with reality, done by
     Aishwarya Pant.

   - The trace documentation has been converted to RST by Changbin Du

   - I thrashed up kernel-doc to deal with a parsing issue and to try to
     make the code more readable. It's still a 20+-year-old Perl hack,
     though.

   - Lots of other updates, typo fixes, and more"

* tag 'docs-4.17' of git://git.lwn.net/linux: (82 commits)
  Documentation/process: update FUSE project website
  docs: kernel-doc: fix parsing of arrays
  dmaengine: Fix spelling for parenthesis in dmatest documentation
  dmaengine: Make dmatest.rst indeed reST compatible
  dmaengine: Add note to dmatest documentation about supported channels
  Documentation: magic-numbers: Fix typo
  Documentation: admin-guide: add kvmconfig, xenconfig and tinyconfig commands
  Input: alps - Update documentation for trackstick v3 format
  Documentation: Mention why %p prints ptrval
  COPYING: use the new text with points to the license files
  COPYING: create a new file with points to the Kernel license files
  Input: trackpoint: document sysfs interface
  xfs: Change URL for the project in xfs.txt
  char/bsr: add sysfs interface documentation
  acpi: nfit: document sysfs interface
  block: rbd: update sysfs interface
  Documentation/sparse: fix typo
  Documentation/CodingStyle: Add an example for braces
  docs/vm: update 00-INDEX
  kernel-doc: Remove __sched markings
  ...
2018-04-03 13:35:51 -07:00
Linus Torvalds e40dc66220 LED updates for 4.17-rc1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJaw8noAAoJEL1qUBy3i3wmZ/wP/RBzogQV0YhZeMJO4B/w/QaE
 OJCAOJYd28dWwm6/aTkicAj1mf/WUnp9q5n7xvUOU56+cK3gqjD0cvTkIX4/T9bK
 TnT4kJgIx1FibvqSAIxSfpawH8U7bO7peWTqSRAVtlT0UerNk8rBOFXOaThPg/Px
 YRISOixexlIYWcGPdQiG00pr0Lwk8jr/ZLvx5FXpzwL89S25g7GZJatNTKIjAcau
 WF1EBWMh7lIuiTQ5aWCXK+X9jGNSfzIMsHaANMBuTIo2dCPcBPKfT/eO8YVOHL1G
 6jsvIwUinhmOFgo17CpQcqLxidyqMyNEpKxycNzwx2/CkjYIxkeQnQUG+UCawpZF
 gb6OhAFJeitVh9kIxKxxwUSYhhL3RP10XxUxhX8imbPPf7F5llWTPdYUe5PMeXeQ
 mqc37+YIqaZ88IGoVdxODPVaZCGXw9r5wAmc0yLQlzC68gp0G6vmIo29t64DKcOL
 xKF5elBspm9bfLymzvHoVJsnErLMCbxY/fzAFpD32oGdJ/1UGoA4y29dMjaPazPr
 cab7d+FYQSzMfiT9A3iIbwSh5luGjxSyzXr+awdBp6OujgqlFNkqYhWC0nSo0Jy7
 To1RKASA37w/kCrNsdDXZOZuA8HQKve43JPF7LgFcUQvMHbhurZ9XsscyTNvSWLV
 4nngEMtDNtmeXIfbNLNk
 =2js3
 -----END PGP SIGNATURE-----

Merge tag 'leds_for_4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds

Pull LED updates from Jacek Anaszewski:
 "New LED class driver:
   - add driver for Mellanox regmap LEDs

  Improvement to ledtrig-disk:
   - extend disk trigger for reads and writes

  Improvements and fixes to existing LED class drivers:
   - add more product/board names for PC Engines APU2
   - fix wrong dmi_match on PC Engines APU LEDs
   - clarify chips supported by LM355x driver
   - fix Kconfig text for MLXCPLD, SYSCON, MC13783, NETXBIG
   - allow leds-mlxcpld compilation for 32 bit arch"

* tag 'leds_for_4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
  leds: Fix wrong dmi_match on PC Engines APU LEDs
  leds: Extends disk trigger for reads and writes
  leds: Add more product/board names for PC Engines APU2
  leds: add driver for support Mellanox regmap LEDs for BMC and x86 platform
  leds: fix Kconfig text for MLXCPLD, SYSCON, MC13783, NETXBIG
  leds: Clarify supported chips by LM355x driver
  leds: leds-mlxcpld: Allow compilation for 32 bit arch
2018-04-03 12:38:19 -07:00
Linus Torvalds cc5ada7ca3 Mostly small changes, as usual.
This does add an IPMI BMC server-side driver, to allow a Linux
 system to act as an IPMI controller.  That's the biggest change,
 but it is just a new driver that is fairly narrow in use.
 
 The other largish change is removing ACPI SPMI probe support,
 which should have never really been there in the beginning.
 
 -corey
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJaw8XOAAoJEGHzjJCRm/+BeoQQAIBokkgHSAl6y8jlmmTmu9fV
 gXl0GT97yAMyuTUaTvkWLdWm8GWCrSSUTAqjbcTzMWya87KRODsUg9eTO58fFw8m
 ODbD7ruTGmBQggJEqDaS5NHAiU22ce2aDn5I0WjJkH8vaJ3nQSa6nEgBOzXDMC1A
 OmaVQE6BnEAIA+nmlzbUgcuduB3iv7gTua2gy7MQSG/5jBPIAOQtpsgHtCZMA+Dt
 bk9LqDpOa6dZry7eIn5/u62YRVLX+iVO/DoxCgZyOxVfgnV/ykKT3PvWO9vviBQV
 QXXLAzLO3niDQ/ZwwpqrUWjR7oGWDKe4ntMATfnxCP7LQNrSF7LnAxz8oCcwuBxq
 ELrwME8LEQmMYGFg3SYcLA0k1teTP2UVWURUH6zBTft2xzo8bJN0JU7J52tTL4xa
 yC7JgTVeq8uQB8gkYKf43LGHlXlaxFQsnRKeCJ2JG+1yD+sOmxbZshfiLroMZ5DM
 nPKOuMdoqPCd7JVUMs/c0IgcDHd6vtkiDRA0jh38JdIdp9B/i+dFYs61bSzrkBD9
 tXUua56QTVl5WEWy2lGX+ZH/JUJbQnTxjiaW99Q9Soml6qXqIVjR5ZvLtls0PeW0
 ZytaQEGuV8758YEmOGk/1pUys/oC37mDlyjTpONGYzvAyzJqU258/YU9eJMkcQ/G
 FFEEkWILLuGgtFnyxwN/
 =p993
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-4.17' of git://github.com/cminyard/linux-ipmi

Pull IPMI updates from Corey Minyard:
 "Mostly small changes, as usual.

  This does add an IPMI BMC server-side driver, to allow a Linux system
  to act as an IPMI controller. That's the biggest change, but it is
  just a new driver that is fairly narrow in use.

  The other largish change is removing ACPI SPMI probe support, which
  should have never really been there in the beginning"

* tag 'for-linus-4.17' of git://github.com/cminyard/linux-ipmi:
  ipmi/parisc: Add IPMI chassis poweroff for certain HP PA-RISC and IA-64 servers
  ipmi_ssif: Fix kernel panic at msg_done_handler
  ipmi:pci: Blacklist a Realtek "IPMI" device
  ipmi: Remove ACPI SPMI probing from the system interface driver
  ipmi: Remove ACPI SPMI probing from the SSIF (I2C) driver
  ipmi: missing error code in try_smi_init()
  ipmi: use ARRAY_SIZE for poweroff_functions array sizing calculation
  ipmi: Consolidate cleanup code
  ipmi: Remove some unnecessary initializations
  ipmi: Fix some error cleanup issues
  ipmi: Add or fix SPDX-License-Identifier in all files
  ipmi: Re-use existing macros for built-in properties
  ipmi:pci: Make the PCI defines consistent with normal Linux ones
  ipmi: kcs_bmc: coding-style fixes and use new poll type
  char/ipmi: add documentation for sysfs interface
  ipmi: kcs_bmc: mark expected switch fall-through in kcs_bmc_handle_data
  ipmi: add an Aspeed KCS IPMI BMC driver
  ipmi: add a KCS IPMI BMC driver
2018-04-03 12:25:44 -07:00
Linus Torvalds 77624cd2a7 Pin control bulk changes for the v4.17 kernel cycle:
New drivers:
 
 - Qualcomm SDM845: this is their new flagship SoC platform
   which seems to be targeted at premium mobile handsets.
 
 - Renesas R-Car M3-N SoC.
 
 - Renesas R8A77980 SoC.
 
 - NXP (ex Freescale) i.MX 6SLL SoC.
 
 - Mediatek MT2712 SoC.
 
 - Allwinner H6 SoC.
 
 Improvements:
 
 - Uniphier adds a few new functions and pins.
 
 - Renesas refactorings and additional pin definitions.
 
 - Improved pin groups for Axis Artpec6.
 
 Cleanup:
 
 - Drop the TZ1090 drivers. This platform is no longer
   maintained and is being deleted.
 
 - Drop ST-Ericsson U8540/U9540 support as this was never
   productified.
 
 - Overall minor fixes and janitorial.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJawz1oAAoJEEEQszewGV1zWUUQAJEIXW0vEsgwwFCIQYrKZBbi
 ovfQtpPgv5wbRmvLy/IaIFvO7eFedlOqjLTU0a3wuFZdHn9y0VkebVOjdG97TTeF
 g4fyqQ7pzdCKmxlDMm4zcOUycho9ZMa8lG3tKdyxI4tal6ygl81BypzKVi/WIxLA
 po2Vr1MHfKicWyPbgD1VRJV6oSzXSOMFkEcPUqx+6m5OM/GTKTKasU/fa4uu12jI
 OHF1TVr9glMbPiU0wC8bvKilgXCxhDYMYf1JCaxojr0Rt/DlR2vBgbfU7dIeRtO1
 MJ1nyJm0yZQfN/bBV1roSg/GGRS3jGbdHDzMnK8pI6LJNJYRa6vfLD/NHKUciSnf
 5cgpWloyvR+rbfObr6CYTirKE7iGBYvAH+do2TwmfvfwUYOI9lnbJrtnqtIovdVA
 R5FxrvI/Ol/j2t4V5wZGC1BBDsC6GH/1YV+W+n9fwKMdDIRgEsOTFsCNEWmSShWP
 Z53NzyZRVL32RK35g3WEqicfXOtmw3XXuHJZqWjlmXyVitEElMAVWySd6oG0HhvU
 sdRaoVGjXL9EVM3iZrqHtaRazRjItBA2CFnloC1PVjwi+dkHDcwWDvtOur+AF3wz
 VORi0xlWXd0Gzolo/ccsk7JUVmrkfCDnZx9uiTKQ+jgiSDfoEuQOvBfTI6LdeoNY
 upTZIfEhR/dMcjcdKIKe
 =IT6S
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control bulk updates from Linus Walleij:
 "New drivers:

   - Qualcomm SDM845: this is their new flagship SoC platform which
     seems to be targeted at premium mobile handsets.

   - Renesas R-Car M3-N SoC.

   - Renesas R8A77980 SoC.

   - NXP (ex Freescale) i.MX 6SLL SoC.

   - Mediatek MT2712 SoC.

   - Allwinner H6 SoC.

  Improvements:

   - Uniphier adds a few new functions and pins.

   - Renesas refactorings and additional pin definitions.

   - Improved pin groups for Axis Artpec6.

  Cleanup:

   - Drop the TZ1090 drivers. This platform is no longer maintained and
     is being deleted.

   - Drop ST-Ericsson U8540/U9540 support as this was never
     productified.

   - Overall minor fixes and janitorial"

* tag 'pinctrl-v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (82 commits)
  pinctrl: uniphier: add UART hardware flow control pin-mux settings
  pinctrl: sunxi: add support for the Allwinner H6 main pin controller
  pinctrl: sunxi: change irq_bank_base to irq_bank_map
  pinctrl: sunxi: introduce IRQ bank conversion function
  pinctrl: sunxi: refactor irq related register function to have desc
  pinctrl: msm8998: Remove owner assignment from platform_driver
  pinctrl: uniphier: divide I2S and S/PDIF audio out pin-mux group
  pinctrl: uniphier: add PXs2 Audio in/out pin-mux settings
  pinctrl/amd: poll InterruptEnable bits in enable_irq
  pinctrl: ocelot: fix gpio direction
  pinctrl: mtk: fix check warnings.
  pintcrl: mtk: support bias-disable of generic and special pins simultaneously
  pinctrl: add mt2712 pinctrl driver
  pinctrl: pinctrl-single: Fix pcs_request_gpio() when bits_per_mux != 0
  pinctrl: imx: Add pinctrl driver support for imx6sll
  dt-bindings: imx: update pinctrl doc for imx6sll
  pinctrl: intel: Implement intel_gpio_get_direction callback
  pinctrl: stm32: add 'depends on HAS_IOMEM' to fix unmet dependency
  pinctrl: mediatek: mtk-common: use true and false for boolean values
  pinctrl: sunxi: always look for apb block
  ...
2018-04-03 12:20:54 -07:00
Linus Torvalds dc73d6a8d4 MMC core:
- Export host capabilities through debugfs
  - Export card RCA register via sysfs
  - Improve card initializing sequence while enabling 4-bit bus
  - Export a function to enable/disable wakeup for card detect IRQ
 
 MMC host:
  - dw_mmc: Add support for new hi3798cv200 variant
  - dw_mmc: Remove support for some deprecated DT properties
  - mediatek: Add support for new variant used on MT7622 SoC
  - sdhci: Improve wakeup support for SDIO IRQs
  - sdhci: Improve wakeup support for card detect IRQs
  - sdhci-omap: Add tuning support
  - sdhci_omap: Add UHS-I mode support
  - sunxi: Prepare for runtime PM support via a few re-factorings
  - tmio: deprecate "toshiba,mmc-wrprotect-disable" DT property
  - tmio/renesas_sdhi: Consolidate code supporting write protect
  - tmio: Improve DMA vs PIO handling
  - tmio: Add support for IP-builtin card detection logic
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJaw0MuAAoJEP4mhCVzWIwpW78P/2N2qPt21OfvnIbSexY1nyPd
 5+rjScgy+oTUnNxITA9LOnM4P6Wg/9PgvhjUdNdHzd5ZaXIchw372+Xu6hZHdujI
 vBfnpsI/xtyL1TQ6nvJc9b+Sp4W4LL2MlCqxi+btAKLvTAU3NNm7uJRRP6xRNDd5
 8wcsCoIN4C3k5hmh5++DDLCfuzpwmbC1cEbGtL/QEV9xeCY5+fJq4Qpq14L2TJ0g
 LeDls3X4HAJa3SsgSGOdNr8rttKUSS+j7i1XsShHMyq89DD21PJ8fvMhdzlXJub9
 A4PatcOXALS/Xd2YVjeLHrRRlTitssD+Sllt46NsB4eJJOO+DempecY+i0WoW60y
 p9IUSSX86yokGoyweiL2GI0Ja1Bg8xgdzTGVbfZ6w6UKHjQAcItnojyMghDM5+zt
 VjDIU59rzm+BEDqcktsbGgLPjOZ0ZWgJPPp2NPkechxsojvCJ9Smm6yPjzaUnZ60
 U9PxsYbs4NB+nE9iKDioyA1ABP0N+BloUkTf/cVHdPBBPMmOyI7jYEDS7mqollZU
 bQCFx+BqcQMbnvI/TZxNDTr4HsiyiXJa0GTCB77sge8tZdcUTjUsWyhc+BYpIqgA
 68/dlwTcawSXDliup5XxtYcAjGugtHbPnS/39uBXvscqWVej1WI5RTyzKdC/hnos
 BP5uz0K1Wic1Dl+jqlWc
 =2Pd6
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC updates from Ulf Hansson:
 "MMC core:
   - Export host capabilities through debugfs
   - Export card RCA register via sysfs
   - Improve card initializing sequence while enabling 4-bit bus
   - Export a function to enable/disable wakeup for card detect IRQ

  MMC host:
   - dw_mmc: Add support for new hi3798cv200 variant
   - dw_mmc: Remove support for some deprecated DT properties
   - mediatek: Add support for new variant used on MT7622 SoC
   - sdhci: Improve wakeup support for SDIO IRQs
   - sdhci: Improve wakeup support for card detect IRQs
   - sdhci-omap: Add tuning support
   - sdhci_omap: Add UHS-I mode support
   - sunxi: Prepare for runtime PM support via a few re-factorings
   - tmio: deprecate "toshiba,mmc-wrprotect-disable" DT property
   - tmio/renesas_sdhi: Consolidate code supporting write protect
   - tmio: Improve DMA vs PIO handling
   - tmio: Add support for IP-builtin card detection logic"

* tag 'mmc-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (55 commits)
  mmc: renesas_sdhi: replace EXT_ACC with HOST_MODE
  mmc: update sdio_claim_irq documentation
  mmc: Export host capabilities to debugfs.
  mmc: core: Disable HPI for certain Micron (Numonyx) eMMC cards
  mmc: block: fix updating ext_csd caches on ioctl call
  mmc: sunxi: Set our device drvdata earlier
  mmc: sunxi: Move the reset deassertion before enabling the clocks
  mmc: sunxi: Move resources management to separate functions
  mmc: dw_mmc: add support for hi3798cv200 specific extensions of dw-mshc
  dt-bindings: mmc: add bindings for hi3798cv200-dw-mshc
  mmc: core: Export card RCA register via sysfs
  mmc: renesas_sdhi: fix WP detection
  mmc: core: Use memdup_user() rather than duplicating its implementation
  mmc: dw_mmc-rockchip: correct property names in debug
  mmc: sd: Remove redundant err assignment from mmc_read_switch
  mmc: sdio: Check the return value of sdio_enable_4bit_bus
  mmc: core: Don't try UHS-I mode if 4-bit mode isn't supported
  arm64: dts: hi3660: remove 'num-slots' property for dwmmc
  ARM: dts: lpc18xx: remove 'num-slots' property for dwmmc
  arm64: dts: stratix10: remove 'num-slots' property for dwmmc
  ...
2018-04-03 12:17:25 -07:00
Linus Torvalds dabe51840e HSI changes for the v4.17 series
* spelling/typo fixes
 * remove extra error printing for -ENOMEM
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlrCZrcACgkQ2O7X88g7
 +powuA/+J28nj0euC6sFyJqaUYjFZQKfZCA+asdtFUmpihrjk5BqGVOdT7255w3z
 6devZAn68xvFv8WvvTlH4/aUHzZFxpZIXCFiZSokjnKvebzR7fAcauKaRrp96/3j
 7kcTgFmWn8TVvXSm7RhrhpWc5HO4sv/to1Ul8QchrX8HapXADzvZpU2EZWYBdTZN
 fkWV/HzKaScm+QeT3JJycmpYrQMoEXpHXqO2SBHCUBu77ArQhAlFeB9KMb6jD9BO
 b3zQlPS592lZfhyxq0894hHSnwtp8nqZjpsE/oQ0DIOxClhjcxucGWAcT+M0unEr
 1ViyZbtlBmd/ZjLSN7BVcELhr8THHJYLy+hwxb7xT+tDPExpBey2FwHehDseEQ5N
 +NaO3HxBTcv536ZF+X2YYr+bdQpoRDLvnguFUBCVyw9GTd+GRhFbJiNIVZuUemXG
 9N+XMineaJGR4/8pBGCQt2Ty62l137JoZlCR7Xq8Sysi01Pe/LY86CLFa9xqkF3g
 wqZPCfLraXKKreIvQl+serQgS7m5JozvjFoq+zIo+DXhZVwK87UcFkOdfQf6REwZ
 VVNIObYjOTFRRKHclUWIkgcpudi/LI518saQY3MAJ4hZsUoXJhuV2IA/LHm1xrS4
 WKGTSgysMXha6cKf7SqCoE1aqq3T0q3T1Tl8v1Dp22mWCnyqLRs=
 =Flbh
 -----END PGP SIGNATURE-----

Merge tag 'hsi-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi

Pull HSI updates from Sebastian Reichel:

 - spelling/typo fixes

 - remove extra error printing for -ENOMEM

* tag 'hsi-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
  HSI: hsi_char: Delete an error message for a failed memory allocation in hsc_probe()
  HSI: ssi_protocol: fix spelling mistake: "trigerred" -> "triggered"
  HSI: ssi_protocol: Delete an error message for a failed memory allocation in ssi_protocol_probe()
  HSI: ssi_protocol: Fix a typo in two comment lines
2018-04-03 12:14:54 -07:00
Linus Torvalds 3ac684b881 power supply and reset changes for the v4.17 series
* Microsemi Ocelot reset support
 * Spreadtrum SC27xx reset support
 * generic gpio charger: lot's of cleanups
 * axp20x fuel gauge: add AXP813 support
 * misc. fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlrCZVQACgkQ2O7X88g7
 +ppKgQ/8Cmgfta6nX5N8U3jAbBmduFkxmV+WaVE2yMned7ABL5ZAXBOBIDXW0Cvk
 yFNhu4fgpb2tDW/NEsYiyu61ES7F4W+q0AlvTNaPcM4oh+j8+E3B8C26qUaojw7E
 rB5FrRJA7/1RQeBl8RrWplT3bmYyL8qPrEca3hPPrrVPYsvf7TqJlgJRqOEu5bIG
 GBcU+aPZsd6T0u3SloErm0LL9Q4S6YpuW/gqR69azcQUacfalA7kjZ5gpiN9YXYq
 xSsm3zoJl77x4HTAnKN+7Kzyl3gugKJXIN8kN19F9iYwpc3ccii9FROrx7T3trps
 nUojvRorlZHawwAOYxp/6C21u6N7SXZ+TyVnPWgjP24Fr7DI5OxqWEZ8fZqaN7M4
 nNjhZYpquJDwgg63E1WoA3aPOUCQp7ZLz2xKUWuwX6n1zXr/R3qVeguFPORvhp9Q
 uu9nfoZXo5ThVz5JK5eGP7pE1OU/qpnzF2ZLHyeNULjAJcnxQjNzN2nTG35IxiO0
 BKlYmy31GcMwooRqarJrKavzMU1xGKZtIGxOm6uIluqA1cGfH+8ahk84tzLgYAZ4
 4MYnPjDyR31gzt9AB3eb7wGo+TP7djnIzeooeyz8Q71oNcCx263QgrmaKcPZjQtm
 QcLA+/jyGNg0T5t6l2Kj7mLKNdiGb6bHMqMs5KrezTruJcDhlRg=
 =VY8H
 -----END PGP SIGNATURE-----

Merge tag 'for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:

 - Microsemi Ocelot reset support

 - Spreadtrum SC27xx reset support

 - generic gpio charger: lot's of cleanups

 - axp20x fuel gauge: add AXP813 support

 - misc fixes, including one devicetree change for the Nokia N900, that
   has been Acked-by Tony Lindgren

* tag 'for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (27 commits)
  power: reset: at91-reset: Switch from the pr_*() to the dev_*() logging functions
  power: reset: at91-poweroff: Remove redundant dev_err call in at91_poweroff_probe()
  power: reset: at91-poweroff: Switch from the pr_*() to the dev_*() logging functions
  power: reset: make function sc27xx_poweroff_shutdown static
  power: supply: da9150-fg: remove VLA usage
  ARM: dts: omap3-n900: Add link between battery and charger
  power: supply: bq2415x: add DT referencing support
  power: supply: bq27xxx: support missing supplier device
  max17042: propagate of_node to power supply device
  power: supply: axp288_fuel_gauge: Fix full status reporting
  power: supply: axp288_fuel_gauge: Do not register FG on ECS EF20EA
  power: reset: gpio-poweroff: Support for timeout from device property
  dt-bindings: power: reset: gpio-poweroff: Add 'timeout-ms' property
  power: reset: Add Spreadtrum SC27xx PMIC power off support
  power: supply: axp20x_battery: add support for AXP813
  dt-bindings: power: supply: axp20x: add AXP813 battery DT binding
  power: supply: axp20x_battery: use data struct for variant specific code
  power: supply: gpio-charger: Remove pdata from gpio_charger
  power: supply: gpio-charger: Use GPIOF_ACTIVE_LOW for legacy setup
  power: supply: gpio-charger: Remove redundant dev_err call in probe function
  ...
2018-04-03 12:10:01 -07:00
Linus Torvalds 75dcc7ef95 spi: SPI updates for v4.17
A quiet release for SPI, some fixes and small updates for individual
 drivers with one bigger change from Linus Walleij which coverts the
 bitbanging SPI driver to use the GPIO descriptor API from Linus Walleij.
 Since GPIO descriptors were used by platform data this means there's a
 few changes in arch/ making relevant updates for a few platforms and one
 misc driver that are affected.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlrCYDYTHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0DXhB/9Hueo2D1Pku0iAwq+yIAPvk2N0fyGP
 YWJWbDQGngSZEnU3dUzdfaOHh4MMiMgs0q8hxOYnmkIhhTs7cXsPj8x6rlZP8bee
 TtSEEgHSuHlVWyADquFIel8OCq8BWd7p4aQKqP3LaojCH/wqswxtn4I+RH/xw1Rd
 LIPgU12fxGUpRMO7uGNiMhqqkQDH1ZBFzCUYRPqQk2E+5hyZraQYoROgZkEBPzb1
 EWjLxLxytj/Zj4N5eQkW4BWfX5HKJb9CpwKIIdyNuybr14yC5FR83VxOf9wW4/pG
 39DIn8LtGTkuMRF4Yw5rPlC9KqnLpUDTnQCcOW4lt+z8QtZQ+LP3boxE
 =xNln
 -----END PGP SIGNATURE-----

Merge tag 'spi-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull SPI updates from Mark Brown:
 "A quiet release for SPI, some fixes and small updates for individual
  drivers with one bigger change from Linus Walleij which coverts the
  bitbanging SPI driver to use the GPIO descriptor API from Linus
  Walleij.

  Since GPIO descriptors were used by platform data this means there's a
  few changes in arch/ making relevant updates for a few platforms and
  one misc driver that are affected"

* tag 'spi-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (24 commits)
  MAINTAINERS: update Andi's e-mail
  spi: spi-atmel: Use correct enum for DMA transfer direction
  spi: sh-msiof: Document R-Car M3-N support
  spi: sh-msiof: Use correct enum for DMA transfer direction
  spi: sprd: Add the support of restarting the system
  spi: sprd: Simplify the transfer function
  spi: Fix unregistration of controller with fixed SPI bus number
  spi: rspi: use correct enum for DMA transfer direction
  spi: jcore: disable ref_clk after getting its rate
  spi: bcm-qspi: fIX some error handling paths
  spi: pxa2xx: Disable runtime PM if controller registration fails
  spi: tegra20-slink: use true and false for boolean values
  spi: Fix scatterlist elements size in spi_map_buf
  spi: atmel: init FIFOs before spi enable
  spi: orion: Prepare space for per-child options
  spi: orion: Make the error message greppable
  spi: orion: Rework GPIO CS handling
  spi: bcm2835aux: Avoid 64-bit arithmetic in xfer len calc
  spi: spi-gpio: Augment device tree bindings
  spi: spi-gpio: Rewrite to use GPIO descriptors
  ...
2018-04-03 12:06:21 -07:00
Linus Torvalds b51c4354df regulator: Updates for v4.17
A very small set of updates for the regulator API this time around,
 there's a few bug fixes and also:
 
  - Conversion of the regulator API to use GPIO descriptors rather than
    numbers from Linus Walleij.
  - New drivers for Marvell 88PG86x and Qualcomm PM8998 and PMI8998.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlrCWysTHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0GRNB/46x233PDi9o0GWsVYyCy5BLwINq9xC
 K1pPNoTWN9BS6VkDwaQIXOXS0qIjf5OCMCFLcAc1wncGVQDEUUNb8ndDYb+zLksn
 Ra5n8vX5qmWHdZHyecy8gFqHzLbsNUvR0E62vtghsGSuM2EeKNcHOCnd852TkcF6
 Bh9GKHXIDvQcos1bHBTbkRfb/CM4uF9rzN38NdTiyxYVqvhdBbo4h33tcuKHrvHn
 vO3tkrnhUvDdX9YNbhIal/qecouX3KsZZuLdHt/l8ygSx2eoVEzdoA9uyvU9rywe
 FZkc45DIYYH7Yz+faFHVRMU4oBN8jwalVjlGTWBD8Iyje+BT2w0eFUCJ
 =/rLA
 -----END PGP SIGNATURE-----

Merge tag 'regulator-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator updates from Mark Brown:
 "A very small set of updates for the regulator API this time around,
  there's a few bug fixes and also:

   - Conversion of the regulator API to use GPIO descriptors rather than
     numbers from Linus Walleij.

   - New drivers for Marvell 88PG86x and Qualcomm PM8998 and PMI8998"

* tag 'regulator-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: qcom: smd: Add pm8998 and pmi8998 regulators
  regulator: core: Add missing blank line between functions
  regulator: qcom_smd: Drop regulator/{machine,of_regulator} includes
  regulator: giving regulator controlling gpios a non-empty label when used through the devicetree.
  regulator: gpio: Fix some error handling paths in 'gpio_regulator_probe()'
  regulator: 88pg86x: new i2c dual regulator chip
  regulator: 88pg86x: add DT bindings document
  regulator: da9211: Pass descriptors instead of GPIO numbers
  regulator: da9055: Pass descriptor instead of GPIO number
  regulator: core: Support passing an initialized GPIO enable descriptor
  regulator: dt: regulator-name is required property
  regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulator_match()'
2018-04-03 11:52:16 -07:00
Linus Torvalds ffd776bf56 regmap: Updates for v4.17
This is a fairly large set of updates for regmap, mainly bugfixes.  The
 biggest bit of this is some fixes for the bulk operations code which
 had issues in some use cases, Charles Keepax has sorted them out.  We
 also gained the ability to use debugfs with syscon regmaps and to
 specify the clock to be used with MMIO regmaps.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlrCVS8THGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0I8DCACDPubZk2MzaXHIa/jCNAtJty+lEYuK
 X7Q/dOqrUxOoLcpMQNH8cHc9UtQ01xrthOkcOIOwVandOf6VHea7NpNzqZIZwCh9
 K5kqpHMOs2Gmx39Kg3ng4lNmzDf/XUeheI8qPDyqAKb9fFQjD+F3bOVsiU7a3VOh
 oCGk81fdLEb5Xp2qKaIM3viZ7AemEJABRdKrIs/hghNv4DaHV2auIh8FJ9WFzGwK
 s+JAP2RIX9N6HR4mmnDUtfavEDQwrDXN3IDxDjxkgo2CT62e5D1wZ9ixUWM+q1RA
 74n3Mc5ZoMxAssNiuEOPRLWTbsPpGtJhKcN0QbUdViM8UMKwHSRvpFAS
 =CqUP
 -----END PGP SIGNATURE-----

Merge tag 'regmap-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull regmap updates from Mark Brown:
 "This is a fairly large set of updates for regmap, mainly bugfixes.

  The biggest bit of this is some fixes for the bulk operations code
  which had issues in some use cases, Charles Keepax has sorted them
  out. We also gained the ability to use debugfs with syscon regmaps and
  to specify the clock to be used with MMIO regmaps"

* tag 'regmap-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: (21 commits)
  regmap: debugfs: Improve warning message on debugfs_create_dir() failure
  regmap: debugfs: Free map->debugfs_name when debugfs_create_dir() failed
  regmap: debugfs: Don't leak dummy names
  regmap: debugfs: Disambiguate dummy debugfs file name
  regmap: mmio: Add function to attach a clock
  regmap: Merge redundant handling in regmap_bulk_write
  regmap: Tidy up regmap_raw_write chunking code
  regmap: Move the handling for max_raw_write into regmap_raw_write
  regmap: Remove unnecessary printk for failed allocation
  regmap: Format data for raw write in regmap_bulk_write
  regmap: use debugfs even when no device
  regmap: Allow missing device in regmap_name_read_file()
  regmap: Use _regmap_read in regmap_bulk_read
  regmap: Tidy up regmap_raw_read chunking code
  regmap: Move the handling for max_raw_read into regmap_raw_read
  regmap: Use helper function for register offset
  regmap: Don't use format_val in regmap_bulk_read
  regmap: Correct comparison in regmap_cached
  regmap: Correct offset handling in regmap_volatile_range
  regmap-i2c: Off by one in regmap_i2c_smbus_i2c_read/write()
  ...
2018-04-03 11:46:38 -07:00
Linus Torvalds f2d285669a Power management updates for 4.17-rc1
- Modify the cpuidle poll state implementation to prevent CPUs from
    staying in the loop in there for excessive times (Rafael Wysocki).
 
  - Add Intel Cannon Lake chips support to the RAPL power capping
    driver (Joe Konno).
 
  - Add reference counting to the device links handling code in the
    PM core (Lukas Wunner).
 
  - Avoid reconfiguring GPEs on suspend-to-idle in the ACPI system
    suspend code (Rafael Wysocki).
 
  - Allow devices to be put into deeper low-power states via ACPI
    if both _SxD and _SxW are missing (Daniel Drake).
 
  - Reorganize the core ACPI suspend-to-idle wakeup code to avoid a
    keyboard wakeup issue on Asus UX331UA (Chris Chiu).
 
  - Prevent the PCMCIA library code from aborting suspend-to-idle due
    to noirq suspend failures resulting from incorrect assumptions
    (Rafael Wysocki).
 
  - Add coupled cpuidle supprt to the Exynos3250 platform (Marek
    Szyprowski).
 
  - Add new sysfs file to make it easier to specify the image storage
    location during hibernation (Mario Limonciello).
 
  - Add sysfs files for collecting suspend-to-idle usage and time
    statistics for CPU idle states (Rafael Wysocki).
 
  - Update the pm-graph utilities (Todd Brandt).
 
  - Reduce the kernel log noise related to reporting Low-power Idle
    constraings by the ACPI system suspend code (Rafael Wysocki).
 
  - Make it easier to distinguish dedicated wakeup IRQs in the
    /proc/interrupts output (Tony Lindgren).
 
  - Add the frequency table validation in cpufreq to the core and
    drop it from a number of cpufreq drivers (Viresh Kumar).
 
  - Drop "cooling-{min|max}-level" for CPU nodes from a couple of
    DT bindings (Viresh Kumar).
 
  - Clean up the CPU online error code path in the cpufreq core
    (Viresh Kumar).
 
  - Fix assorted issues in the SCPI, CPPC, mediatek and tegra186
    cpufreq drivers (Arnd Bergmann, Chunyu Hu, George Cherian,
    Viresh Kumar).
 
  - Drop memory allocation error messages from a few places in
    cpufreq and cpuildle drivers (Markus Elfring).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJawgTUAAoJEILEb/54YlRxI48QALc6IUfj/O+gLAWAf8qHk+8V
 eLn9E1NrZXUtNMNYItBcgZfuMImIj7MC5qRo/BhzYdd0VyUzFYEyd9liUVFBDEXA
 SH65jyjRrXORKfLrSP5H8lcCdckTFXfxzonVFN2n4l7Gdv540UFuqloU+vS4Wrfp
 wMg9UvKRxr+7LwOI4q2sMFtB8Uki+lySY5UECqRIKUIJKIH6RPo3m73Kps7kw8kU
 c2RCU8w/9PoomPaEjvwZ0vT5lNrQXmBbC5hxcMzBHtLS0Cwb3xJsUB4w6niezdGY
 e+n6Vx7XeId7+Ujnn4praxUwyVq2wEirJccvAEgKFcZzjmGAXrHl8rOgMLvb3ugN
 P+ftkYk+Vizci9hmACeA1LGw4hN/dXMfephnezCsy9Q/QK8QPJV8XO0vxfyaQYhZ
 ie6SKcdZimFDzqd6oHLFftRou3imvq8RUvKTx2CR0KVkApnaDDiTeP5ay1Yd+UU3
 EomWe7/mxoSgJ9kB/9GlKifQXBof62/fbrWH0AdM1oliONbbOZcLqg5x4DZUmfTK
 hTAx3SSxMRZSlc4Zl1CzbrHnFKi9cRBYCs0tPdOSnAO2ZfCsOmokJE+ig5I8lZre
 SlaciUpG2Vvf7m61mVlrqLLos8T9rTVM2pqwsoxII7A+dFrWK3HpqoypEN/87tm7
 4/zjPF6LK2eTKL9WdTCk
 =6JC2
 -----END PGP SIGNATURE-----

Merge tag 'pm-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management updates from Rafael Wysocki:
 "These update the cpuidle poll state definition to reduce excessive
  energy usage related to it, add new CPU ID to the RAPL power capping
  driver, update the ACPI system suspend code to handle some special
  cases better, extend the PM core's device links code slightly, add new
  sysfs attribute for better suspend-to-idle diagnostics and easier
  hibernation handling, update power management tools and clean up
  cpufreq quite a bit.

  Specifics:

   - Modify the cpuidle poll state implementation to prevent CPUs from
     staying in the loop in there for excessive times (Rafael Wysocki).

   - Add Intel Cannon Lake chips support to the RAPL power capping
     driver (Joe Konno).

   - Add reference counting to the device links handling code in the PM
     core (Lukas Wunner).

   - Avoid reconfiguring GPEs on suspend-to-idle in the ACPI system
     suspend code (Rafael Wysocki).

   - Allow devices to be put into deeper low-power states via ACPI if
     both _SxD and _SxW are missing (Daniel Drake).

   - Reorganize the core ACPI suspend-to-idle wakeup code to avoid a
     keyboard wakeup issue on Asus UX331UA (Chris Chiu).

   - Prevent the PCMCIA library code from aborting suspend-to-idle due
     to noirq suspend failures resulting from incorrect assumptions
     (Rafael Wysocki).

   - Add coupled cpuidle supprt to the Exynos3250 platform (Marek
     Szyprowski).

   - Add new sysfs file to make it easier to specify the image storage
     location during hibernation (Mario Limonciello).

   - Add sysfs files for collecting suspend-to-idle usage and time
     statistics for CPU idle states (Rafael Wysocki).

   - Update the pm-graph utilities (Todd Brandt).

   - Reduce the kernel log noise related to reporting Low-power Idle
     constraings by the ACPI system suspend code (Rafael Wysocki).

   - Make it easier to distinguish dedicated wakeup IRQs in the
     /proc/interrupts output (Tony Lindgren).

   - Add the frequency table validation in cpufreq to the core and drop
     it from a number of cpufreq drivers (Viresh Kumar).

   - Drop "cooling-{min|max}-level" for CPU nodes from a couple of DT
     bindings (Viresh Kumar).

   - Clean up the CPU online error code path in the cpufreq core (Viresh
     Kumar).

   - Fix assorted issues in the SCPI, CPPC, mediatek and tegra186
     cpufreq drivers (Arnd Bergmann, Chunyu Hu, George Cherian, Viresh
     Kumar).

   - Drop memory allocation error messages from a few places in cpufreq
     and cpuildle drivers (Markus Elfring)"

* tag 'pm-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (56 commits)
  ACPI / PM: Fix keyboard wakeup from suspend-to-idle on ASUS UX331UA
  cpufreq: CPPC: Use transition_delay_us depending transition_latency
  PM / hibernate: Change message when writing to /sys/power/resume
  PM / hibernate: Make passing hibernate offsets more friendly
  cpuidle: poll_state: Avoid invoking local_clock() too often
  PM: cpuidle/suspend: Add s2idle usage and time state attributes
  cpuidle: Enable coupled cpuidle support on Exynos3250 platform
  cpuidle: poll_state: Add time limit to poll_idle()
  cpufreq: tegra186: Don't validate the frequency table twice
  cpufreq: speedstep: Don't validate the frequency table twice
  cpufreq: sparc: Don't validate the frequency table twice
  cpufreq: sh: Don't validate the frequency table twice
  cpufreq: sfi: Don't validate the frequency table twice
  cpufreq: scpi: Don't validate the frequency table twice
  cpufreq: sc520: Don't validate the frequency table twice
  cpufreq: s3c24xx: Don't validate the frequency table twice
  cpufreq: qoirq: Don't validate the frequency table twice
  cpufreq: pxa: Don't validate the frequency table twice
  cpufreq: ppc_cbe: Don't validate the frequency table twice
  cpufreq: powernow: Don't validate the frequency table twice
  ...
2018-04-03 10:45:39 -07:00
Linus Torvalds be55375427 ACPI updates for 4.17-rc1
- Update the in-kernel ACPICA code to upstream revision 20180313
    including:
    * Module-level AML code handling fixes and simplifications (Bob
      Moore, Erik Schmauss).
    * Fixes and cleanups related to messaging (Bob Moore).
    * Events handling fixes related to disabling and enabling GPEs
      (Erik Schmauss).
    * Introduction of SPDX license identifiers and removal of license
      boilerplate in multiple files (Erik Schmauss).
    * Assorted fixes and cleanups (Bob Moore, Erik Schmauss, Hans
      de Goede, Seunghun Han).
 
  - Add new basic driver for the ACPI Time and Alarm Device (Rafael
    Wysocki).
 
  - Modify the ACPI battery driver to support battery thresholds on
    Lenovo ThinkPads (Ognjen Galic, Colin Ian King).
 
  - Avoid reporting battery capacity over 100 in the ACPI battery
    driver in some cases (Laszlo Toth).
 
  - Make the kernel recognize an OEM _OSI string from Dell to avoid
    power management issues with NVidia GPUs in Dell platforms (Alex
    Hung).
 
  - Make the PCI IRQ management code handle missing _PRS cleanly (Alex
    Hung).
 
  - Fix uevent notifications related to device hotplut (Lee, Chun-Yi).
 
  - Prevent the ACPI PAD driver from leaking memory (Lenny Szubowicz).
 
  - Update the ACPI CPPC library code to include subspace IDs in the
    kernel messages logged by it (George Cherian).
 
  - Add backlight quirk for Samsung 670Z5E (Hans de Goede).
 
  - Add the NFIT and HMAT tables to the list of ACPI tables that can
    be overridden via initrd (Dan Williams).
 
  - Fix and clean up some ACPI documentation and Kconfig help language
    (Aishwarya Pant, Randy Dunlap).
 
  - Replace license boilerplate with an SPDX license ID in the ACPI
    PMIC operation region handling code (Rajmohan Mani).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJawgRsAAoJEILEb/54YlRxZv4P/3jl22A8YfhbUVs3NOFzmQYa
 xDSGgFMKRt3Zh4XEfwg6sBugibs9KLNPUSc9SR2oGsPju+VAowi1LXnocylymKDW
 WbRbziBEOJ8v7swmrsXCuiOH5TE9VA34UsBUoyu1MvgQB0YkBK2cw8WuEDwqFNqO
 2AlJkSSqLDFCDRZgVnoVgPWQCBa6xW2gjMCsZhUaF0rqxzI+iMw9ErjgUunKzOgh
 mbpsUk4E3TCbqomMeXj53JuZA4utG0K0oLK7hozrQUm7fWzy424cc5P4F6SMWDiK
 Q6TR3qPosP2Qg52qyUbjISyLcnIz+UTeT+ekJtE/vVMhc0Igwe0z45JEGk6QlxRG
 q6MEmlgw2DsdUtxWnXrX02bgRNtR0GHT5OIuH8vmSqLHvphQv9MNtg+FOHZWmShN
 EA+AMzE3bLT5EZLbkI/8xjSRPf2Lxp2S1UpvW3TAbSBbyCt71GK7t9U2eVnOU8pS
 sDC/uIexO/XY/ELSwyKJ3xbp032ZfcOTouI5j4TyBTB7ezng//LFqvnzGzFvYwyJ
 Ne/1n+W5HS2l7KMWRENQTpstk7Nr1k5GAJW6zXLTlM/oZhQ+mz0MKyxABeY2byRx
 wxL8LBs75jcpDxYHvHAZv8Kj3GaNfIhI1wZ24W7mwj+3s29fFiovtIJsH0S4SR4n
 MheLeKYCBPMHI4z388Mn
 =pVZ/
 -----END PGP SIGNATURE-----

Merge tag 'acpi-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:
 "These update the ACPICA code in the kernel to follow upstream revision
  20180313 which includes fixes related to the so-called module-level
  AML (mostly "if" type of statements outside of any methods) that
  should improve the handling of systems that load alternative SSDTs
  depending on the current configuration, for example, and event
  handling fixes related to disabling and enabling GPEs on system
  startup and on suspend/resume.

  Moreover, the ACPICA license boilerplate is replaced with SPDX license
  IDs which alone reduces the number of lines of ACPICA code in the
  kernel quite a bit.

  Also added is a new driver for the generic ACPI Time and Alarm Device
  (TAD). At the moment it only handles the most basic capabilities of
  the TAD, however.

  In addition to that the ACPI battery driver is improved to handle
  battery thresholds on ThinkPads, among other things, some bugs are
  fixed, a new backlight quirk is added and some documentation is
  updated.

  Specifics:

   - Update the in-kernel ACPICA code to upstream revision 20180313
     including:
      * Module-level AML code handling fixes and simplifications (Bob
        Moore, Erik Schmauss).
      * Fixes and cleanups related to messaging (Bob Moore).
      * Events handling fixes related to disabling and enabling GPEs
        (Erik Schmauss).
      * Introduction of SPDX license identifiers and removal of license
        boilerplate in multiple files (Erik Schmauss).
      * Assorted fixes and cleanups (Bob Moore, Erik Schmauss, Hans de
        Goede, Seunghun Han).

   - Add new basic driver for the ACPI Time and Alarm Device (Rafael
     Wysocki).

   - Modify the ACPI battery driver to support battery thresholds on
     Lenovo ThinkPads (Ognjen Galic, Colin Ian King).

   - Avoid reporting battery capacity over 100 in the ACPI battery
     driver in some cases (Laszlo Toth).

   - Make the kernel recognize an OEM _OSI string from Dell to avoid
     power management issues with NVidia GPUs in Dell platforms (Alex
     Hung).

   - Make the PCI IRQ management code handle missing _PRS cleanly (Alex
     Hung).

   - Fix uevent notifications related to device hotplut (Lee, Chun-Yi).

   - Prevent the ACPI PAD driver from leaking memory (Lenny Szubowicz).

   - Update the ACPI CPPC library code to include subspace IDs in the
     kernel messages logged by it (George Cherian).

   - Add backlight quirk for Samsung 670Z5E (Hans de Goede).

   - Add the NFIT and HMAT tables to the list of ACPI tables that can be
     overridden via initrd (Dan Williams).

   - Fix and clean up some ACPI documentation and Kconfig help language
     (Aishwarya Pant, Randy Dunlap).

   - Replace license boilerplate with an SPDX license ID in the ACPI
     PMIC operation region handling code (Rajmohan Mani)"

* tag 'acpi-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (39 commits)
  ACPI: acpi_pad: Fix memory leak in power saving threads
  ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E
  ACPI: Add Time and Alarm Device (TAD) driver
  ACPI / scan: Send change uevent with offine environmental data
  ACPI / Kconfig: Update ACPI_PROCFS_POWER help text
  ACPI / OSI: Add OEM _OSI strings to disable NVidia RTD3
  ACPICA: Update version to 20180313
  ACPICA: Cleanup/simplify module-level code support
  ACPICA: Events: add a return on failure from acpi_hw_register_read
  ACPICA: adding SPDX headers
  ACPICA: Rename a global for clarity, no functional change
  ACPICA: macros: fix ACPI_ERROR_NAMESPACE macro
  ACPICA: Change a compile-time option to a runtime option
  ACPICA: Remove calling of _STA from acpi_get_object_info()
  ACPICA: AML Debug Object: Don't ignore output of zero-length strings
  ACPICA: Fix memory leak on unusual memory leak
  ACPICA: Events: Dispatch GPEs after enabling for the first time
  ACPICA: Events: Add parallel GPE handling support to fix potential redundant _Exx evaluations
  ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume
  ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c
  ...
2018-04-03 10:38:46 -07:00
Palmer Dabbelt f6a11d9feb
RISC-V: Rename CONFIG_CMDLINE_OVERRIDE to CONFIG_CMDLINE_FORCE
The device tree code looks for CONFIG_CMDLINE_FORCE, but we were using
CONFIG_CMDLINE_OVERRIDE.  It looks like this was just a hold over from
before our device tree conversion -- in fact, we'd already removed the
support for CONFIG_CMDLINE_OVERRIDE from our arch-specific code so it
didn't even work any more.

Thanks to Mortiz and Trung for finding the original bug, and for Michael
for suggeting a better fix.

CC: Trung Tran <trung.tran@ettus.com>
CC: Michael J Clark <mjc@sifive.com>
Reviewed-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2018-04-03 09:48:27 -07:00
David S. Miller d13864b68e sparc64: Make atomic_xchg() an inline function rather than a macro.
This avoids a lot of -Wunused warnings such as:

====================
kernel/debug/debug_core.c: In function ‘kgdb_cpu_enter’:
./arch/sparc/include/asm/cmpxchg_64.h:55:22: warning: value computed is not used [-Wunused-value]
 #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))

./arch/sparc/include/asm/atomic_64.h:86:30: note: in expansion of macro ‘xchg’
 #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
                              ^~~~
kernel/debug/debug_core.c:508:4: note: in expansion of macro ‘atomic_xchg’
    atomic_xchg(&kgdb_active, cpu);
    ^~~~~~~~~~~
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-03 08:24:35 -07:00
Takashi Iwai a820ccbe21 ALSA: pcm: Fix UAF at PCM release via PCM timer access
The PCM runtime object is created and freed dynamically at PCM stream
open / close time.  This is tracked via substream->runtime, and it's
cleared at snd_pcm_detach_substream().

The runtime object assignment is protected by PCM open_mutex, so for
all PCM operations, it's safely handled.  However, each PCM substream
provides also an ALSA timer interface, and user-space can access to
this while closing a PCM substream.  This may eventually lead to a
UAF, as snd_pcm_timer_resolution() tries to access the runtime while
clearing it in other side.

Fortunately, it's the only concurrent access from the PCM timer, and
it merely reads runtime->timer_resolution field.  So, we can avoid the
race by reordering kfree() and wrapping the substream->runtime
clearance with the corresponding timer lock.

Reported-by: syzbot+8e62ff4e07aa2ce87826@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-03 08:36:40 +02:00
Linus Torvalds 642e7fd233 Merge branch 'syscalls-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux
Pull removal of in-kernel calls to syscalls from Dominik Brodowski:
 "System calls are interaction points between userspace and the kernel.
  Therefore, system call functions such as sys_xyzzy() or
  compat_sys_xyzzy() should only be called from userspace via the
  syscall table, but not from elsewhere in the kernel.

  At least on 64-bit x86, it will likely be a hard requirement from
  v4.17 onwards to not call system call functions in the kernel: It is
  better to use use a different calling convention for system calls
  there, where struct pt_regs is decoded on-the-fly in a syscall wrapper
  which then hands processing over to the actual syscall function. This
  means that only those parameters which are actually needed for a
  specific syscall are passed on during syscall entry, instead of
  filling in six CPU registers with random user space content all the
  time (which may cause serious trouble down the call chain). Those
  x86-specific patches will be pushed through the x86 tree in the near
  future.

  Moreover, rules on how data may be accessed may differ between kernel
  data and user data. This is another reason why calling sys_xyzzy() is
  generally a bad idea, and -- at most -- acceptable in arch-specific
  code.

  This patchset removes all in-kernel calls to syscall functions in the
  kernel with the exception of arch/. On top of this, it cleans up the
  three places where many syscalls are referenced or prototyped, namely
  kernel/sys_ni.c, include/linux/syscalls.h and include/linux/compat.h"

* 'syscalls-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: (109 commits)
  bpf: whitelist all syscalls for error injection
  kernel/sys_ni: remove {sys_,sys_compat} from cond_syscall definitions
  kernel/sys_ni: sort cond_syscall() entries
  syscalls/x86: auto-create compat_sys_*() prototypes
  syscalls: sort syscall prototypes in include/linux/compat.h
  net: remove compat_sys_*() prototypes from net/compat.h
  syscalls: sort syscall prototypes in include/linux/syscalls.h
  kexec: move sys_kexec_load() prototype to syscalls.h
  x86/sigreturn: use SYSCALL_DEFINE0
  x86: fix sys_sigreturn() return type to be long, not unsigned long
  x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm()
  mm: add ksys_readahead() helper; remove in-kernel calls to sys_readahead()
  mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff()
  mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64()
  fs: add ksys_fallocate() wrapper; remove in-kernel calls to sys_fallocate()
  fs: add ksys_p{read,write}64() helpers; remove in-kernel calls to syscalls
  fs: add ksys_truncate() wrapper; remove in-kernel calls to sys_truncate()
  fs: add ksys_sync_file_range helper(); remove in-kernel calls to syscall
  kernel: add ksys_setsid() helper; remove in-kernel call to sys_setsid()
  kernel: add ksys_unshare() helper; remove in-kernel calls to sys_unshare()
  ...
2018-04-02 21:22:12 -07:00
Omar Sandoval 21035965f6 bitmap: fix memset optimization on big-endian systems
Commit 2a98dc028f ("include/linux/bitmap.h: turn bitmap_set and
bitmap_clear into memset when possible") introduced an optimization to
bitmap_{set,clear}() which uses memset() when the start and length are
constants aligned to a byte.

This is wrong on big-endian systems; our bitmaps are arrays of unsigned
long, so bit n is not at byte n / 8 in memory.  This was caught by the
Btrfs selftests, but the bitmap selftests also fail when run on a
big-endian machine.

We can still use memset if the start and length are aligned to an
unsigned long, so do that on big-endian.  The same problem applies to
the memcmp in bitmap_equal(), so fix it there, too.

Fixes: 2a98dc028f ("include/linux/bitmap.h: turn bitmap_set and bitmap_clear into memset when possible")
Fixes: 2c6deb0152 ("bitmap: use memcmp optimisation in more situations")
Cc: stable@kernel.org
Reported-by: "Erhard F." <erhard_f@mailbox.org>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-04-02 20:52:27 -07:00