1. 16 May, 2019 5 commits
    • Chenbo Feng's avatar
      bpf: relax inode permission check for retrieving bpf program · e547ff3f
      Chenbo Feng authored
      For iptable module to load a bpf program from a pinned location, it
      only retrieve a loaded program and cannot change the program content so
      requiring a write permission for it might not be necessary.
      Also when adding or removing an unrelated iptable rule, it might need to
      flush and reload the xt_bpf related rules as well and triggers the inode
      permission check. It might be better to remove the write premission
      check for the inode so we won't need to grant write access to all the
      processes that flush and restore iptables rules.
      Signed-off-by: default avatarChenbo Feng <fengc@google.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      e547ff3f
    • David S. Miller's avatar
      Merge branch 'rhashtable-Fix-sparse-warnings' · 2407a88a
      David S. Miller authored
      Herbert Xu says:
      
      ====================
      rhashtable: Fix sparse warnings
      
      This patch series fixes all the sparse warnings.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2407a88a
    • Herbert Xu's avatar
      rhashtable: Fix cmpxchg RCU warnings · e9458a4e
      Herbert Xu authored
      As cmpxchg is a non-RCU mechanism it will cause sparse warnings
      when we use it for RCU.  This patch adds explicit casts to silence
      those warnings.  This should probably be moved to RCU itself in
      future.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e9458a4e
    • Herbert Xu's avatar
      rhashtable: Remove RCU marking from rhash_lock_head · ba6306e3
      Herbert Xu authored
      The opaque type rhash_lock_head should not be marked with __rcu
      because it can never be dereferenced.  We should apply the RCU
      marking when we turn it into a pointer which can be dereferenced.
      
      This patch does exactly that.  This fixes a number of sparse
      warnings as well as getting rid of some unnecessary RCU checking.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ba6306e3
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · c7d5ec26
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2019-05-16
      
      The following pull-request contains BPF updates for your *net* tree.
      
      The main changes are:
      
      1) Fix a use after free in __dev_map_entry_free(), from Eric.
      
      2) Several sockmap related bug fixes: a splat in strparser if
         it was never initialized, remove duplicate ingress msg list
         purging which can race, fix msg->sg.size accounting upon
         skb to msg conversion, and last but not least fix a timeout
         bug in tcp_bpf_wait_data(), from John.
      
      3) Fix LRU map to avoid messing with eviction heuristics upon
         syscall lookup, e.g. map walks from user space side will
         then lead to eviction of just recently created entries on
         updates as it would mark all map entries, from Daniel.
      
      4) Don't bail out when libbpf feature probing fails. Also
         various smaller fixes to flow_dissector test, from Stanislav.
      
      5) Fix missing brackets for BTF_INT_OFFSET() in UAPI, from Gary.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c7d5ec26
  2. 15 May, 2019 8 commits
  3. 14 May, 2019 27 commits
    • Pieter Jansen van Vuuren's avatar
      nfp: flower: add rcu locks when accessing netdev for tunnels · cb07d915
      Pieter Jansen van Vuuren authored
      Add rcu locks when accessing netdev when processing route request
      and tunnel keep alive messages received from hardware.
      
      Fixes: 8e6a9046 ("nfp: flower vxlan neighbour offload")
      Fixes: 856f5b13 ("nfp: flower vxlan neighbour keep-alive")
      Signed-off-by: default avatarPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cb07d915
    • YueHaibing's avatar
      ppp: deflate: Fix possible crash in deflate_init · 3ebe1bca
      YueHaibing authored
      BUG: unable to handle kernel paging request at ffffffffa018f000
      PGD 3270067 P4D 3270067 PUD 3271063 PMD 2307eb067 PTE 0
      Oops: 0000 [#1] PREEMPT SMP
      CPU: 0 PID: 4138 Comm: modprobe Not tainted 5.1.0-rc7+ #1
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
      rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014
      RIP: 0010:ppp_register_compressor+0x3e/0xd0 [ppp_generic]
      Code: 98 4a 3f e2 48 8b 15 c1 67 00 00 41 8b 0c 24 48 81 fa 40 f0 19 a0
      75 0e eb 35 48 8b 12 48 81 fa 40 f0 19 a0 74
      RSP: 0018:ffffc90000d93c68 EFLAGS: 00010287
      RAX: ffffffffa018f000 RBX: ffffffffa01a3000 RCX: 000000000000001a
      RDX: ffff888230c750a0 RSI: 0000000000000000 RDI: ffffffffa019f000
      RBP: ffffc90000d93c80 R08: 0000000000000001 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0194080
      R13: ffff88822ee1a700 R14: 0000000000000000 R15: ffffc90000d93e78
      FS:  00007f2339557540(0000) GS:ffff888237a00000(0000)
      knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: ffffffffa018f000 CR3: 000000022bde4000 CR4: 00000000000006f0
      Call Trace:
       ? 0xffffffffa01a3000
       deflate_init+0x11/0x1000 [ppp_deflate]
       ? 0xffffffffa01a3000
       do_one_initcall+0x6c/0x3cc
       ? kmem_cache_alloc_trace+0x248/0x3b0
       do_init_module+0x5b/0x1f1
       load_module+0x1db1/0x2690
       ? m_show+0x1d0/0x1d0
       __do_sys_finit_module+0xc5/0xd0
       __x64_sys_finit_module+0x15/0x20
       do_syscall_64+0x6b/0x1d0
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      If ppp_deflate fails to register in deflate_init,
      module initialization failed out, however
      ppp_deflate_draft may has been regiestred and not
      unregistered before return.
      Then the seconed modprobe will trigger crash like this.
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Acked-by: default avatarGuillaume Nault <gnault@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3ebe1bca
    • Luca Ceresoli's avatar
      net: macb: fix error format in dev_err() · f413cbb3
      Luca Ceresoli authored
      Errors are negative numbers. Using %u shows them as very large positive
      numbers such as 4294967277 that don't make sense. Use the %d format
      instead, and get a much nicer -19.
      Signed-off-by: default avatarLuca Ceresoli <luca@lucaceresoli.net>
      Fixes: b48e0bab ("net: macb: Migrate to devm clock interface")
      Fixes: 93b31f48 ("net/macb: unify clock management")
      Fixes: 421d9df0 ("net/macb: merge at91_ether driver into macb driver")
      Fixes: aead88bd ("net: ethernet: macb: Add support for rx_clk")
      Fixes: f5473d1d ("net: macb: Support clock management for tsu_clk")
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f413cbb3
    • Sabrina Dubroca's avatar
      rtnetlink: always put IFLA_LINK for links with a link-netnsid · feadc4b6
      Sabrina Dubroca authored
      Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when
      iflink == ifindex.
      
      In some cases, a device can be created in a different netns with the
      same ifindex as its parent. That device will not dump its IFLA_LINK
      attribute, which can confuse some userspace software that expects it.
      For example, if the last ifindex created in init_net and foo are both
      8, these commands will trigger the issue:
      
          ip link add parent type dummy                   # ifindex 9
          ip link add link parent netns foo type macvlan  # ifindex 9 in ns foo
      
      So, in case a device puts the IFLA_LINK_NETNSID attribute in a dump,
      always put the IFLA_LINK attribute as well.
      
      Thanks to Dan Winship for analyzing the original OpenShift bug down to
      the missing netlink attribute.
      
      v2: change Fixes tag, it's been here forever, as Nicolas Dichtel said
          add Nicolas' ack
      v3: change Fixes tag
          fix subject typo, spotted by Edward Cree
      Analyzed-by: default avatarDan Winship <danw@redhat.com>
      Fixes: d8a5ec67 ("[NET]: netlink support for moving devices between network namespaces.")
      Signed-off-by: default avatarSabrina Dubroca <sd@queasysnail.net>
      Acked-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      feadc4b6
    • Yunjian Wang's avatar
      net/mlx4_core: Change the error print to info print · 00f9fec4
      Yunjian Wang authored
      The error print within mlx4_flow_steer_promisc_add() should
      be a info print.
      
      Fixes: 592e49dd ('net/mlx4: Implement promiscuous mode with device managed flow-steering')
      Signed-off-by: default avatarYunjian Wang <wangyunjian@huawei.com>
      Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00f9fec4
    • Johannes Berg's avatar
      NFC: Orphan the subsystem · d0a7e8cb
      Johannes Berg authored
      Samuel clearly hasn't been working on this in many years and
      patches getting to the wireless list are just being ignored
      entirely now. Mark the subsystem as orphan to reflect the
      current state and revert back to the netdev list so at least
      some fixes can be picked up by Dave.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Acked-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0a7e8cb
    • Florian Fainelli's avatar
      net: Always descend into dsa/ · 0fe9f173
      Florian Fainelli authored
      Jiri reported that with a kernel built with CONFIG_FIXED_PHY=y,
      CONFIG_NET_DSA=m and CONFIG_NET_DSA_LOOP=m, we would not get to a
      functional state where the mock-up driver is registered. Turns out that
      we are not descending into drivers/net/dsa/ unconditionally, and we
      won't be able to link-in dsa_loop_bdinfo.o which does the actual mock-up
      mdio device registration.
      Reported-by: default avatarJiri Pirko <jiri@resnulli.us>
      Fixes: 40013ff2 ("net: dsa: Fix functional dsa-loop dependency on FIXED_PHY")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarVivien Didelot <vivien.didelot@gmail.com>
      Tested-by: default avatarJiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0fe9f173
    • Yuchung Cheng's avatar
      tcp: fix retrans timestamp on passive Fast Open · cd736d8b
      Yuchung Cheng authored
      Commit c7d13c8f ("tcp: properly track retry time on
      passive Fast Open") sets the start of SYNACK retransmission
      time on passive Fast Open in "retrans_stamp". However the
      timestamp is not reset upon the handshake has completed. As a
      result, future data packet retransmission may not update it in
      tcp_retransmit_skb(). This may lead to socket aborting earlier
      unexpectedly by retransmits_timed_out() since retrans_stamp remains
      the SYNACK rtx time.
      
      This bug only manifests on passive TFO sender that a) suffered
      SYNACK timeout and then b) stalls on very first loss recovery. Any
      successful loss recovery would reset the timestamp to avoid this
      issue.
      
      Fixes: c7d13c8f ("tcp: properly track retry time on passive Fast Open")
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd736d8b
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 35c99ffa
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
      
       - enable packed ring support for s390
      
       - several fixes
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio/s390: enable packed ring
        virtio/s390: DMA support for virtio-ccw
        virtio/s390: use vring_create_virtqueue
        virtio/virtio_ring: do some comment fixes
        vhost-scsi: remove incorrect memory barrier
        tools/virtio/ringtest: Remove bogus definition of BUG_ON()
        virtio_ring: Fix potential mem leak in virtqueue_add_indirect_packed
      35c99ffa
    • Linus Torvalds's avatar
      Add gitignore file for samples/vfs/ generated files · 81413776
      Linus Torvalds authored
      Commit f1b5618e ("vfs: Add a sample program for the new mount API")
      added sample programs that get built during the kernel build, but then
      cause 'git status' to worry about whether the resulting binaries should
      be managed by git.
      
      Tell git not to worry, and to ignore the sample binaries.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      81413776
    • Linus Torvalds's avatar
      Merge branch 'parisc-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · b2c91128
      Linus Torvalds authored
      Pull more parisc updates from Helge Deller:
       "Two small enhancements, which I didn't included in the last pull
        request because I wanted to keep them a few more days in for-next
        before sending upstream:
      
         - Replace the ldcw barrier instruction by a nop instruction in the
           CAS code on uniprocessor machines.
      
         - Map variables read-only after init (enable ro_after_init feature)"
      
      * 'parisc-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Use __ro_after_init in init.c
        parisc: Use __ro_after_init in unwind.c
        parisc: Use __ro_after_init in time.c
        parisc: Use __ro_after_init in processor.c
        parisc: Use __ro_after_init in process.c
        parisc: Use __ro_after_init in perf_images.h
        parisc: Use __ro_after_init in pci.c
        parisc: Use __ro_after_init in inventory.c
        parisc: Use __ro_after_init in head.S
        parisc: Use __ro_after_init in firmware.c
        parisc: Use __ro_after_init in drivers.c
        parisc: Use __ro_after_init in cache.c
        parisc: Enable the ro_after_init feature
        parisc: Drop LDCW barrier in CAS code when running UP
      b2c91128
    • Linus Torvalds's avatar
      Merge tag 'kgdb-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux · ca4b4062
      Linus Torvalds authored
      Pull kgdb updates from Daniel Thompson:
       "Mostly cleanups but there are also a couple of fixes for out-of-bounds
        accesses (including a potential write to the byte before a static
        buffer).
      
        The main changes are:
      
         - Fixes to those out-of-bounds access (empty string to configure test
           module could write the byte before a buffer, high cpu counts could
           read outside of per-cpu structures).
      
         - Improvements to string handling problems picked up by new compiler
           warnings and other static checks. Most are fixing benign issues
           that can't be tickled without code changes but still reduce the wtf
           factor a little.
      
         - Tidy up the terminal output"
      
      * tag 'kgdb-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux:
        kdb: Fix bound check compiler warning
        kdb: do a sanity check on the cpu in kdb_per_cpu()
        kdb: Get rid of broken attempt to print CCVERSION in kdb summary
        misc: kgdbts: fix out-of-bounds access in function param_set_kgdbts_var
        kdb: kdb_support: replace strcpy() by strscpy()
        gdbstub: Replace strcpy() by strscpy()
        gdbstub: mark expected switch fall-throughs
      ca4b4062
    • Linus Torvalds's avatar
      Merge tag 'modules-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux · 280664f5
      Linus Torvalds authored
      Pull modules updates from Jessica Yu:
      
       - Use a separate table to store symbol types instead of hijacking
         fields in struct Elf_Sym
      
       - Trivial code cleanups
      
      * tag 'modules-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
        module: add stubs for within_module functions
        kallsyms: store type information in its own array
        vmlinux.lds.h: drop unused __vermagic
      280664f5
    • Alexei Starovoitov's avatar
      Merge branch 'lru-map-fix' · 5db17c96
      Alexei Starovoitov authored
      Daniel Borkmann says:
      
      ====================
      This set fixes LRU map eviction in combination with map lookups out
      of system call side from user space. Main patch is the second one and
      test cases are adapted and added in the last one. Thanks!
      ====================
      Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      5db17c96
    • Daniel Borkmann's avatar
      bpf: test ref bit from data path and add new tests for syscall path · d2baab62
      Daniel Borkmann authored
      The test_lru_map is relying on marking the LRU map entry via regular
      BPF map lookup from system call side. This is basically for simplicity
      reasons. Given we fixed marking entries in that case, the test needs
      to be fixed as well. Here we add a small drop-in replacement to retain
      existing behavior for the tests by marking out of the BPF program and
      transferring the retrieved value out via temporary map. This also adds
      new test cases to track the new behavior where two elements are marked,
      one via system call side and one via program side, where the next update
      then evicts the key looked up only from system call side.
      
        # ./test_lru_map
        nr_cpus:8
      
        test_lru_sanity0 (map_type:9 map_flags:0x0): Pass
        test_lru_sanity1 (map_type:9 map_flags:0x0): Pass
        test_lru_sanity2 (map_type:9 map_flags:0x0): Pass
        test_lru_sanity3 (map_type:9 map_flags:0x0): Pass
        test_lru_sanity4 (map_type:9 map_flags:0x0): Pass
        test_lru_sanity5 (map_type:9 map_flags:0x0): Pass
        test_lru_sanity7 (map_type:9 map_flags:0x0): Pass
        test_lru_sanity8 (map_type:9 map_flags:0x0): Pass
      
        test_lru_sanity0 (map_type:10 map_flags:0x0): Pass
        test_lru_sanity1 (map_type:10 map_flags:0x0): Pass
        test_lru_sanity2 (map_type:10 map_flags:0x0): Pass
        test_lru_sanity3 (map_type:10 map_flags:0x0): Pass
        test_lru_sanity4 (map_type:10 map_flags:0x0): Pass
        test_lru_sanity5 (map_type:10 map_flags:0x0): Pass
        test_lru_sanity7 (map_type:10 map_flags:0x0): Pass
        test_lru_sanity8 (map_type:10 map_flags:0x0): Pass
      
        test_lru_sanity0 (map_type:9 map_flags:0x2): Pass
        test_lru_sanity4 (map_type:9 map_flags:0x2): Pass
        test_lru_sanity6 (map_type:9 map_flags:0x2): Pass
        test_lru_sanity7 (map_type:9 map_flags:0x2): Pass
        test_lru_sanity8 (map_type:9 map_flags:0x2): Pass
      
        test_lru_sanity0 (map_type:10 map_flags:0x2): Pass
        test_lru_sanity4 (map_type:10 map_flags:0x2): Pass
        test_lru_sanity6 (map_type:10 map_flags:0x2): Pass
        test_lru_sanity7 (map_type:10 map_flags:0x2): Pass
        test_lru_sanity8 (map_type:10 map_flags:0x2): Pass
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      d2baab62
    • Daniel Borkmann's avatar
      bpf, lru: avoid messing with eviction heuristics upon syscall lookup · 50b045a8
      Daniel Borkmann authored
      One of the biggest issues we face right now with picking LRU map over
      regular hash table is that a map walk out of user space, for example,
      to just dump the existing entries or to remove certain ones, will
      completely mess up LRU eviction heuristics and wrong entries such
      as just created ones will get evicted instead. The reason for this
      is that we mark an entry as "in use" via bpf_lru_node_set_ref() from
      system call lookup side as well. Thus upon walk, all entries are
      being marked, so information of actual least recently used ones
      are "lost".
      
      In case of Cilium where it can be used (besides others) as a BPF
      based connection tracker, this current behavior causes disruption
      upon control plane changes that need to walk the map from user space
      to evict certain entries. Discussion result from bpfconf [0] was that
      we should simply just remove marking from system call side as no
      good use case could be found where it's actually needed there.
      Therefore this patch removes marking for regular LRU and per-CPU
      flavor. If there ever should be a need in future, the behavior could
      be selected via map creation flag, but due to mentioned reason we
      avoid this here.
      
        [0] http://vger.kernel.org/bpfconf.html
      
      Fixes: 29ba732a ("bpf: Add BPF_MAP_TYPE_LRU_HASH")
      Fixes: 8f844938 ("bpf: Add BPF_MAP_TYPE_LRU_PERCPU_HASH")
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      50b045a8
    • Daniel Borkmann's avatar
      bpf: add map_lookup_elem_sys_only for lookups from syscall side · c6110222
      Daniel Borkmann authored
      Add a callback map_lookup_elem_sys_only() that map implementations
      could use over map_lookup_elem() from system call side in case the
      map implementation needs to handle the latter differently than from
      the BPF data path. If map_lookup_elem_sys_only() is set, this will
      be preferred pick for map lookups out of user space. This hook is
      used in a follow-up fix for LRU map, but once development window
      opens, we can convert other map types from map_lookup_elem() (here,
      the one called upon BPF_MAP_LOOKUP_ELEM cmd is meant) over to use
      the callback to simplify and clean up the latter.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      c6110222
    • Linus Torvalds's avatar
      Merge tag 'backlight-next-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight · e0654264
      Linus Torvalds authored
      Pull backlight updates from Lee Jones:
       "Fix-ups:
         - Remove unused BACKLIGHT_LCD_SUPPORT symbol
         - Remove unused BACKLIGHT_CLASS_DEVICE dependencies
         - Add DT support to lm3630a_bl
      
        Bug Fixes:
         - Fix error path issues in lm3630a_bl"
      
      * tag 'backlight-next-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
        backlight: lm3630a: Add firmware node support
        dt-bindings: backlight: Add lm3630a bindings
        backlight: lm3630a: Return 0 on success in update_status functions
        video: lcd: Remove useless BACKLIGHT_CLASS_DEVICE dependencies
        video: backlight: Remove useless BACKLIGHT_LCD_SUPPORT kernel symbol
      e0654264
    • Linus Torvalds's avatar
      Merge tag 'mfd-next-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · ebcf5bb2
      Linus Torvalds authored
      Pull MFD updates from Lee Jones:
       "Core Framework:
         - Document (kerneldoc) core mfd_add_devices() API
      
        New Drivers:
         - Altera SOCFPGA System Manager
         - Maxim MAX77650/77651 PMIC
         - Maxim MAX77663 PMIC
         - ST Multi-Function eXpander (STMFX)
      
        New Device Support:
         - LEDs support in Intel Cherry Trail Whiskey Cove PMIC
         - RTC support in SAMSUNG Electronics S2MPA01 PMIC
         - SAM9X60 support in Atmel HLCDC (High-end LCD Controller)
         - USB X-Powers AXP 8xx PMICs
         - Integrated Sensor Hub (ISH) in ChromeOS EC
         - USB PD Logger in ChromeOS EC
         - AXP223 in X-Powers AXP series PMICs
         - Power Supply in X-Powers AXP 803 PMICs
         - Comet Lake in Intel Low Power Subsystem
         - Fingerprint MCU in ChromeOS EC
         - Touchpad MCU in ChromeOS EC
         - Move TI LM3532 support to LED
      
        New Functionality:
         - max77650, max77620: Add/extend DT support
         - max77620 power-off
         - syscon clocking
         - croc_ec host sleep event
      
        Fix-ups:
         - Trivial; Formatting, spelling, etc; Kconfig, sec-core, ab8500-debugfs
         - Remove unused functionality; rk808, da9063-*
         - SPDX conversion; da9063-*, atmel-*,
         - Adapt/add new register definitions; cs47l35-tables, cs47l90-tables, imx6q-iomuxc-gpr
         - Fix-up DT bindings; ti-lmu, cirrus,lochnagar
         - Simply obtaining driver data; ssbi, t7l66xb, tc6387xb, tc6393xb
      
        Bug Fixes:
         - Fix incorrect defined values; max77620, da9063
         - Fix device initialisation; twl6040
         - Reset device on init; intel-lpss
         - Fix build warnings when !OF; sun6i-prcm
         - Register OF match tables; tps65912-spi
         - Fix DMI matching; intel_quark_i2c_gpio"
      
      * tag 'mfd-next-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (65 commits)
        mfd: Use dev_get_drvdata() directly
        mfd: cros_ec: Instantiate properly CrOS Touchpad MCU device
        mfd: cros_ec: Instantiate properly CrOS FP MCU device
        mfd: cros_ec: Update the EC feature codes
        mfd: intel-lpss: Add Intel Comet Lake PCI IDs
        mfd: lochnagar: Add links to binding docs for sound and hwmon
        mfd: ab8500-debugfs: Fix a typo ("deubgfs")
        mfd: imx6sx: Add MQS register definition for iomuxc gpr
        dt-bindings: mfd: LMU: Fix lm3632 dt binding example
        mfd: intel_quark_i2c_gpio: Adjust IOT2000 matching
        mfd: da9063: Fix OTP control register names to match datasheets for DA9063/63L
        mfd: tps65912-spi: Add missing of table registration
        mfd: axp20x: Add USB power supply mfd cell to AXP803
        mfd: sun6i-prcm: Fix build warning for non-OF configurations
        mfd: intel-lpss: Set the device in reset state when init
        platform/chrome: Add support for v1 of host sleep event
        mfd: cros_ec: Add host_sleep_event_v1 command
        mfd: cros_ec: Instantiate the CrOS USB PD logger driver
        mfd: cs47l90: Make DAC_AEC_CONTROL_2 readable
        mfd: cs47l35: Make DAC_AEC_CONTROL_2 readable
        ...
      ebcf5bb2
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.2-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 414147d9
      Linus Torvalds authored
      Pull PCI updates from Bjorn Helgaas:
       "Enumeration changes:
      
         - Add _HPX Type 3 settings support, which gives firmware more
           influence over device configuration (Alexandru Gagniuc)
      
         - Support fixed bus numbers from bridge Enhanced Allocation
           capabilities (Subbaraya Sundeep)
      
         - Add "external-facing" DT property to identify cases where we
           require IOMMU protection against untrusted devices (Jean-Philippe
           Brucker)
      
         - Enable PCIe services for host controller drivers that use managed
           host bridge alloc (Jean-Philippe Brucker)
      
         - Log PCIe port service messages with pci_dev, not the pcie_device
           (Frederick Lawler)
      
         - Convert pciehp from pciehp_debug module parameter to generic
           dynamic debug (Frederick Lawler)
      
        Peer-to-peer DMA:
      
         - Add whitelist of Root Complexes that support peer-to-peer DMA
           between Root Ports (Christian König)
      
        Native controller drivers:
      
         - Add PCI host bridge DMA ranges for bridges that can't DMA
           everywhere, e.g., iProc (Srinath Mannam)
      
         - Add Amazon Annapurna Labs PCIe host controller driver (Jonathan
           Chocron)
      
         - Fix Tegra MSI target allocation so DMA doesn't generate unwanted
           MSIs (Vidya Sagar)
      
         - Fix of_node reference leaks (Wen Yang)
      
         - Fix Hyper-V module unload & device removal issues (Dexuan Cui)
      
         - Cleanup R-Car driver (Marek Vasut)
      
         - Cleanup Keystone driver (Kishon Vijay Abraham I)
      
         - Cleanup i.MX6 driver (Andrey Smirnov)
      
        Significant bug fixes:
      
         - Reset Lenovo ThinkPad P50 GPU so nouveau works after reboot (Lyude
           Paul)
      
         - Fix Switchtec firmware update performance issue (Wesley Sheng)
      
         - Work around Pericom switch link retraining erratum (Stefan Mätje)"
      
      * tag 'pci-v5.2-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (141 commits)
        MAINTAINERS: Add Karthikeyan Mitran and Hou Zhiqiang for Mobiveil PCI
        PCI: pciehp: Remove pointless MY_NAME definition
        PCI: pciehp: Remove pointless PCIE_MODULE_NAME definition
        PCI: pciehp: Remove unused dbg/err/info/warn() wrappers
        PCI: pciehp: Log messages with pci_dev, not pcie_device
        PCI: pciehp: Replace pciehp_debug module param with dyndbg
        PCI: pciehp: Remove pciehp_debug uses
        PCI/AER: Log messages with pci_dev, not pcie_device
        PCI/DPC: Log messages with pci_dev, not pcie_device
        PCI/PME: Replace dev_printk(KERN_DEBUG) with dev_info()
        PCI/AER: Replace dev_printk(KERN_DEBUG) with dev_info()
        PCI: Replace dev_printk(KERN_DEBUG) with dev_info(), etc
        PCI: Replace printk(KERN_INFO) with pr_info(), etc
        PCI: Use dev_printk() when possible
        PCI: Cleanup setup-bus.c comments and whitespace
        PCI: imx6: Allow asynchronous probing
        PCI: dwc: Save root bus for driver remove hooks
        PCI: dwc: Use devm_pci_alloc_host_bridge() to simplify code
        PCI: dwc: Free MSI in dw_pcie_host_init() error path
        PCI: dwc: Free MSI IRQ page in dw_pcie_free_msi()
        ...
      414147d9
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 318222a3
      Linus Torvalds authored
      Merge misc updates from Andrew Morton:
      
       - a few misc things and hotfixes
      
       - ocfs2
      
       - almost all of MM
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (139 commits)
        kernel/memremap.c: remove the unused device_private_entry_fault() export
        mm: delete find_get_entries_tag
        mm/huge_memory.c: make __thp_get_unmapped_area static
        mm/mprotect.c: fix compilation warning because of unused 'mm' variable
        mm/page-writeback: introduce tracepoint for wait_on_page_writeback()
        mm/vmscan: simplify trace_reclaim_flags and trace_shrink_flags
        mm/Kconfig: update "Memory Model" help text
        mm/vmscan.c: don't disable irq again when count pgrefill for memcg
        mm: memblock: make keeping memblock memory opt-in rather than opt-out
        hugetlbfs: always use address space in inode for resv_map pointer
        mm/z3fold.c: support page migration
        mm/z3fold.c: add structure for buddy handles
        mm/z3fold.c: improve compression by extending search
        mm/z3fold.c: introduce helper functions
        mm/page_alloc.c: remove unnecessary parameter in rmqueue_pcplist
        mm/hmm: add ARCH_HAS_HMM_MIRROR ARCH_HAS_HMM_DEVICE Kconfig
        mm/vmscan.c: simplify shrink_inactive_list()
        fs/sync.c: sync_file_range(2) may use WB_SYNC_ALL writeback
        xen/privcmd-buf.c: convert to use vm_map_pages_zero()
        xen/gntdev.c: convert to use vm_map_pages()
        ...
      318222a3
    • Christoph Hellwig's avatar
      640be2d1
    • Matthew Wilcox (Oracle)'s avatar
      mm: delete find_get_entries_tag · a1b8e6ab
      Matthew Wilcox (Oracle) authored
      I removed the only user of this and hadn't noticed it was now unused.
      
      Link: http://lkml.kernel.org/r/20190430152929.21813-1-willy@infradead.orgSigned-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Reviewed-by: default avatarRoss Zwisler <zwisler@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a1b8e6ab
    • Bharath Vedartham's avatar
      mm/huge_memory.c: make __thp_get_unmapped_area static · b3b07077
      Bharath Vedartham authored
      __thp_get_unmapped_area is only used in mm/huge_memory.c.  Make it static.
      Tested by building and booting the kernel.
      
      Link: http://lkml.kernel.org/r/20190504102353.GA22525@bharath12345-Inspiron-5559Signed-off-by: default avatarBharath Vedartham <linux.bhar@gmail.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b3b07077
    • Mike Rapoport's avatar
      mm/mprotect.c: fix compilation warning because of unused 'mm' variable · 94393c78
      Mike Rapoport authored
      Since 0cbe3e26 ("mm: update ptep_modify_prot_start/commit to take
      vm_area_struct as arg") the only place that uses the local 'mm' variable
      in change_pte_range() is the call to set_pte_at().
      
      Many architectures define set_pte_at() as macro that does not use the 'mm'
      parameter, which generates the following compilation warning:
      
       CC      mm/mprotect.o
      mm/mprotect.c: In function 'change_pte_range':
      mm/mprotect.c:42:20: warning: unused variable 'mm' [-Wunused-variable]
        struct mm_struct *mm = vma->vm_mm;
                          ^~
      
      Fix it by passing vma->mm to set_pte_at() and dropping the local 'mm'
      variable in change_pte_range().
      
      [liu.song.a23@gmail.com: fix missed conversions]
        Link: http://lkml.kernel.org/r/CAPhsuW6wcQgYLHNdBdw6m0YiR4RWsS4XzfpSKU7wBLLeOCTbpw@mail.gmail.comLink: http://lkml.kernel.org/r/1557305432-4940-1-git-send-email-rppt@linux.ibm.comSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Song Liu <liu.song.a23@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      94393c78
    • Yafang Shao's avatar
      mm/page-writeback: introduce tracepoint for wait_on_page_writeback() · 19343b5b
      Yafang Shao authored
      Recently there have been some hung tasks on our server due to
      wait_on_page_writeback(), and we want to know the details of this
      PG_writeback, i.e.  this page is writing back to which device.  But it is
      not so convenient to get the details.
      
      I think it would be better to introduce a tracepoint for diagnosing the
      writeback details.
      
      Link: http://lkml.kernel.org/r/1556274402-19018-1-git-send-email-laoar.shao@gmail.comSigned-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Michal Hocko <mhocko@suse.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      19343b5b
    • Yafang Shao's avatar
      mm/vmscan: simplify trace_reclaim_flags and trace_shrink_flags · 60b62ff7
      Yafang Shao authored
      trace_reclaim_flags and trace_shrink_flags are almost the same.
      We can simplify them to avoid redundant code.
      
      Link: http://lkml.kernel.org/r/1556169203-5858-1-git-send-email-laoar.shao@gmail.comSigned-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      60b62ff7