Skip to content
Permalink
Christophe-Ler…
Switch branches/tags

Commits on May 12, 2021

  1. powerpc/kprobes: Replace ppc_optinsn by common optinsn

    Commit 51c9c08 ("powerpc/kprobes: Implement Optprobes")
    implemented a powerpc specific version of optinsn in order
    to workaround the 32Mb limitation for direct branches.
    
    Instead of implementing a dedicated powerpc version, use the
    common optinsn and override the allocation and freeing functions.
    
    This also indirectly remove the CLANG warning about
    is_kprobe_ppc_optinsn_slot() not being use, and the powerpc will
    now benefit from commit 5b48562 ("kprobes, extable: Identify
    kprobes trampolines as kernel text area")
    
    Suggested-by: Masami Hiramatsu <mhiramat@kernel.org>
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    chleroy authored and intel-lab-lkp committed May 12, 2021
  2. kprobes: Allow architectures to override optinsn page allocation

    Some architectures like powerpc require a non standard
    allocation of optinsn page, because module pages are
    too far from the kernel for direct branches.
    
    Define weak alloc_optinsn_page() and free_optinsn_page(), that
    fall back on alloc_insn_page() and free_insn_page() when not
    overriden by the architecture.
    
    Suggested-by: Masami Hiramatsu <mhiramat@kernel.org>
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    chleroy authored and intel-lab-lkp committed May 12, 2021

Commits on May 8, 2021

  1. Merge branch 'master' into next

    Merge master back into next, this allows us to resolve some conflicts in
    arch/powerpc/Kconfig, and also re-sort the symbols under config PPC so
    that they are in alphabetical order again.
    mpe committed May 8, 2021

Commits on May 7, 2021

  1. Merge tag 'tag-chrome-platform-for-v5.13' of git://git.kernel.org/pub…

    …/scm/linux/kernel/git/chrome-platform/linux
    
    Pull chrome platform updates from Benson Leung:
     "cros_ec_typec:
    
       - Changes around DP mode check, hard reset, tracking port change.
    
      cros_ec misc:
    
       - wilco_ec: Convert stream-like files from nonseekable to stream open
    
       - cros_usbpd_notify: Listen to EC_HSOT_EVENT_USB_MUX host event
    
       - fix format warning in cros_ec_typec"
    
    * tag 'tag-chrome-platform-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
      platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock
      platform/chrome: cros_usbpd_notify: Listen to EC_HOST_EVENT_USB_MUX host event
      platform/chrome: cros_ec_typec: Add DP mode check
      platform/chrome: cros_ec_typec: Handle hard reset
      platform/chrome: cros_ec: Add Type C hard reset
      platform/chrome: cros_ec_typec: Track port role
      platform/chrome: cros_ec_typec: fix clang -Wformat warning
      platform/chrome: cros_ec_typec: Check for device within remove function
      platform/chrome: wilco_ec: convert stream-like files from nonseekable_open -> stream_open
    torvalds committed May 7, 2021
  2. Merge tag 'i3c/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/i3c/linux
    
    Pull i3cupdates from Alexandre Belloni:
     "Fix i3c_master_register error path"
    
    * tag 'i3c/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
      Revert "i3c master: fix missing destroy_workqueue() on error in i3c_master_register"
      dt-bindings: i3c: Fix silvaco,i3c-master-v1 compatible string
      i3c: master: svc: remove redundant assignment to cmd->read_len
    torvalds committed May 7, 2021
  3. Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/arm64/linux
    
    Pull more arm64 updates from Catalin Marinas:
     "A mix of fixes and clean-ups that turned up too late for the first
      pull request:
    
       - Restore terminal stack frame records. Their previous removal caused
         traces which cross secondary_start_kernel to terminate one entry
         too late, with a spurious "0" entry.
    
       - Fix boot warning with pseudo-NMI due to the way we manipulate the
         PMR register.
    
       - ACPI fixes: avoid corruption of interrupt mappings on watchdog
         probe failure (GTDT), prevent unregistering of GIC SGIs.
    
       - Force SPARSEMEM_VMEMMAP as the only memory model, it saves with
         having to test all the other combinations.
    
       - Documentation fixes and updates: tagged address ABI exceptions on
         brk/mmap/mremap(), event stream frequency, update booting
         requirements on the configuration of traps"
    
    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
      arm64: kernel: Update the stale comment
      arm64: Fix the documented event stream frequency
      arm64: entry: always set GIC_PRIO_PSR_I_SET during entry
      arm64: Explicitly document boot requirements for SVE
      arm64: Explicitly require that FPSIMD instructions do not trap
      arm64: Relax booting requirements for configuration of traps
      arm64: cpufeatures: use min and max
      arm64: stacktrace: restore terminal records
      arm64/vdso: Discard .note.gnu.property sections in vDSO
      arm64: doc: Add brk/mmap/mremap() to the Tagged Address ABI Exceptions
      psci: Remove unneeded semicolon
      ACPI: irq: Prevent unregistering of GIC SGIs
      ACPI: GTDT: Don't corrupt interrupt mappings on watchdow probe failure
      arm64: Show three registers per line
      arm64: remove HAVE_DEBUG_BUGVERBOSE
      arm64: alternative: simplify passing alt_region
      arm64: Force SPARSEMEM_VMEMMAP as the only memory management model
      arm64: vdso32: drop -no-integrated-as flag
    torvalds committed May 7, 2021
  4. Merge tag 'sound-fix-5.13-rc1' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/tiwai/sound
    
    Pull sound fixes from Takashi Iwai:
     "Just a few device-specific HD-audio and USB-audio fixes"
    
    * tag 'sound-fix-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
      ALSA: hda: generic: change the DAC ctl name for LO+SPK or LO+HP
      ALSA: hda/realtek: Add fixup for HP OMEN laptop
      ALSA: hda/realtek: Fix speaker amp on HP Envy AiO 32
      ALSA: hda/realtek: Fix silent headphone output on ASUS UX430UA
      ALSA: usb-audio: Add dB range mapping for Sennheiser Communications Headset PC 8
      ALSA: hda/realtek: ALC285 Thinkpad jack pin quirk is unreachable
    torvalds committed May 7, 2021
  5. Merge tag 'block-5.13-2021-05-07' of git://git.kernel.dk/linux-block

    Pull block fixes from Jens Axboe:
    
     - dasd spelling fixes (Bhaskar)
    
     - Limit bio max size on multi-page bvecs to the hardware limit, to
       avoid overly large bio's (and hence latencies). Originally queued for
       the merge window, but needed a fix and was dropped from the initial
       pull (Changheun)
    
     - NVMe pull request (Christoph):
          - reset the bdev to ns head when failover (Daniel Wagner)
          - remove unsupported command noise (Keith Busch)
          - misc passthrough improvements (Kanchan Joshi)
          - fix controller ioctl through ns_head (Minwoo Im)
          - fix controller timeouts during reset (Tao Chiu)
    
     - rnbd fixes/cleanups (Gioh, Md, Dima)
    
     - Fix iov_iter re-expansion (yangerkun)
    
    * tag 'block-5.13-2021-05-07' of git://git.kernel.dk/linux-block:
      block: reexpand iov_iter after read/write
      nvmet: remove unsupported command noise
      nvme-multipath: reset bdev to ns head when failover
      nvme-pci: fix controller reset hang when racing with nvme_timeout
      nvme: move the fabrics queue ready check routines to core
      nvme: avoid memset for passthrough requests
      nvme: add nvme_get_ns helper
      nvme: fix controller ioctl through ns_head
      bio: limit bio max size
      RDMA/rtrs: fix uninitialized symbol 'cnt'
      s390: dasd: Mundane spelling fixes
      block/rnbd: Remove all likely and unlikely
      block/rnbd-clt: Check the return value of the function rtrs_clt_query
      block/rnbd: Fix style issues
      block/rnbd-clt: Change queue_depth type in rnbd_clt_session to size_t
    torvalds committed May 7, 2021
  6. Merge tag 'io_uring-5.13-2021-05-07' of git://git.kernel.dk/linux-block

    Pull io_uring fixes from Jens Axboe:
     "Mostly fixes for merge window merged code. In detail:
    
       - Error case memory leak fixes (Colin, Zqiang)
    
       - Add the tools/io_uring/ to the list of maintained files (Lukas)
    
       - Set of fixes for the modified buffer registration API (Pavel)
    
       - Sanitize io thread setup on x86 (Stefan)
    
       - Ensure we truncate transfer count for registered buffers (Thadeu)"
    
    * tag 'io_uring-5.13-2021-05-07' of git://git.kernel.dk/linux-block:
      x86/process: setup io_threads more like normal user space threads
      MAINTAINERS: add io_uring tool to IO_URING
      io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
      io_uring: Fix memory leak in io_sqe_buffers_register()
      io_uring: Fix premature return from loop and memory leak
      io_uring: fix unchecked error in switch_start()
      io_uring: allow empty slots for reg buffers
      io_uring: add more build check for uapi
      io_uring: dont overlap internal and user req flags
      io_uring: fix drain with rsrc CQEs
    torvalds committed May 7, 2021
  7. Merge tag 'nfs-for-5.13-1' of git://git.linux-nfs.org/projects/trondm…

    …y/linux-nfs
    
    Pull NFS client updates from Trond Myklebust:
     "Highlights include:
    
      Stable fixes:
    
       - Add validation of the UDP retrans parameter to prevent shift
         out-of-bounds
    
       - Don't discard pNFS layout segments that are marked for return
    
      Bugfixes:
    
       - Fix a NULL dereference crash in xprt_complete_bc_request() when the
         NFSv4.1 server misbehaves.
    
       - Fix the handling of NFS READDIR cookie verifiers
    
       - Sundry fixes to ensure attribute revalidation works correctly when
         the server does not return post-op attributes.
    
       - nfs4_bitmask_adjust() must not change the server global bitmasks
    
       - Fix major timeout handling in the RPC code.
    
       - NFSv4.2 fallocate() fixes.
    
       - Fix the NFSv4.2 SEEK_HOLE/SEEK_DATA end-of-file handling
    
       - Copy offload attribute revalidation fixes
    
       - Fix an incorrect filehandle size check in the pNFS flexfiles driver
    
       - Fix several RDMA transport setup/teardown races
    
       - Fix several RDMA queue wrapping issues
    
       - Fix a misplaced memory read barrier in sunrpc's call_decode()
    
      Features:
    
       - Micro optimisation of the TCP transmission queue using TCP_CORK
    
       - statx() performance improvements by further splitting up the
         tracking of invalid cached file metadata.
    
       - Support the NFSv4.2 'change_attr_type' attribute and use it to
         optimise handling of change attribute updates"
    
    * tag 'nfs-for-5.13-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (85 commits)
      xprtrdma: Fix a NULL dereference in frwr_unmap_sync()
      sunrpc: Fix misplaced barrier in call_decode
      NFSv4.2: Remove ifdef CONFIG_NFSD from NFSv4.2 client SSC code.
      xprtrdma: Move fr_mr field to struct rpcrdma_mr
      xprtrdma: Move the Work Request union to struct rpcrdma_mr
      xprtrdma: Move fr_linv_done field to struct rpcrdma_mr
      xprtrdma: Move cqe to struct rpcrdma_mr
      xprtrdma: Move fr_cid to struct rpcrdma_mr
      xprtrdma: Remove the RPC/RDMA QP event handler
      xprtrdma: Don't display r_xprt memory addresses in tracepoints
      xprtrdma: Add an rpcrdma_mr_completion_class
      xprtrdma: Add tracepoints showing FastReg WRs and remote invalidation
      xprtrdma: Avoid Send Queue wrapping
      xprtrdma: Do not wake RPC consumer on a failed LocalInv
      xprtrdma: Do not recycle MR after FastReg/LocalInv flushes
      xprtrdma: Clarify use of barrier in frwr_wc_localinv_done()
      xprtrdma: Rename frwr_release_mr()
      xprtrdma: rpcrdma_mr_pop() already does list_del_init()
      xprtrdma: Delete rpcrdma_recv_buffer_put()
      xprtrdma: Fix cwnd update ordering
      ...
    torvalds committed May 7, 2021
  8. Merge tag '9p-for-5.13-rc1' of git://github.com/martinetd/linux

    Pull 9p updates from Dominique Martinet:
     "An error handling fix and constification"
    
    * tag '9p-for-5.13-rc1' of git://github.com/martinetd/linux:
      fs: 9p: fix v9fs_file_open writeback fid error check
      9p: Constify static struct v9fs_attr_group
    torvalds committed May 7, 2021
  9. Merge branch 'akpm' (patches from Andrew)

    Merge yet more updates from Andrew Morton:
     "This is everything else from -mm for this merge window.
    
      90 patches.
    
      Subsystems affected by this patch series: mm (cleanups and slub),
      alpha, procfs, sysctl, misc, core-kernel, bitmap, lib, compat,
      checkpatch, epoll, isofs, nilfs2, hpfs, exit, fork, kexec, gcov,
      panic, delayacct, gdb, resource, selftests, async, initramfs, ipc,
      drivers/char, and spelling"
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (90 commits)
      mm: fix typos in comments
      mm: fix typos in comments
      treewide: remove editor modelines and cruft
      ipc/sem.c: spelling fix
      fs: fat: fix spelling typo of values
      kernel/sys.c: fix typo
      kernel/up.c: fix typo
      kernel/user_namespace.c: fix typos
      kernel/umh.c: fix some spelling mistakes
      include/linux/pgtable.h: few spelling fixes
      mm/slab.c: fix spelling mistake "disired" -> "desired"
      scripts/spelling.txt: add "overflw"
      scripts/spelling.txt: Add "diabled" typo
      scripts/spelling.txt: add "overlfow"
      arm: print alloc free paths for address in registers
      mm/vmalloc: remove vwrite()
      mm: remove xlate_dev_kmem_ptr()
      drivers/char: remove /dev/kmem for good
      mm: fix some typos and code style problems
      ipc/sem.c: mundane typo fixes
      ...
    torvalds committed May 7, 2021
  10. mm: fix typos in comments

    succed -> succeed in mm/hugetlb.c
    wil -> will in mm/mempolicy.c
    wit -> with in mm/page_alloc.c
    Retruns -> Returns in mm/page_vma_mapped.c
    confict -> conflict in mm/secretmem.c
    No functionality changed.
    
    Link: https://lkml.kernel.org/r/20210408140027.60623-1-lujialin4@huawei.com
    Signed-off-by: Lu Jialin <lujialin4@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Lu Jialin authored and torvalds committed May 7, 2021
  11. mm: fix typos in comments

    Fix ~94 single-word typos in locking code comments, plus a few
    very obvious grammar mistakes.
    
    Link: https://lkml.kernel.org/r/20210322212624.GA1963421@gmail.com
    Link: https://lore.kernel.org/r/20210322205203.GB1959563@gmail.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
    Cc: Bhaskar Chowdhury <unixbhaskar@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Ingo Molnar authored and torvalds committed May 7, 2021
  12. treewide: remove editor modelines and cruft

    The section "19) Editor modelines and other cruft" in
    Documentation/process/coding-style.rst clearly says, "Do not include any
    of these in source files."
    
    I recently receive a patch to explicitly add a new one.
    
    Let's do treewide cleanups, otherwise some people follow the existing code
    and attempt to upstream their favoriate editor setups.
    
    It is even nicer if scripts/checkpatch.pl can check it.
    
    If we like to impose coding style in an editor-independent manner, I think
    editorconfig (patch [1]) is a saner solution.
    
    [1] https://lore.kernel.org/lkml/20200703073143.423557-1-danny@kdrag0n.dev/
    
    Link: https://lkml.kernel.org/r/20210324054457.1477489-1-masahiroy@kernel.org
    Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
    Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Reviewed-by: Miguel Ojeda <ojeda@kernel.org>	[auxdisplay]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    masahir0y authored and torvalds committed May 7, 2021
  13. ipc/sem.c: spelling fix

    s/purpuse/purpose/
    
    Link: https://lkml.kernel.org/r/20210319221432.26631-1-unixbhaskar@gmail.com
    Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
    Acked-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    unixbhaskar authored and torvalds committed May 7, 2021
  14. fs: fat: fix spelling typo of values

    vaules -> values
    
    Link: https://lkml.kernel.org/r/20210302034817.30384-1-dingsenjie@163.com
    Signed-off-by: dingsenjie <dingsenjie@yulong.com>
    Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    dingsenjie authored and torvalds committed May 7, 2021
  15. kernel/sys.c: fix typo

    change 'infite'     to 'infinite'
    change 'concurent'  to 'concurrent'
    change 'memvers'    to 'members'
    change 'decendants' to 'descendants'
    change 'argumets'   to 'arguments'
    
    Link: https://lkml.kernel.org/r/20210316112904.10661-1-cxfcosmos@gmail.com
    Signed-off-by: Xiaofeng Cao <caoxiaofeng@yulong.com>
    Acked-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    CaoXiaofengGH authored and torvalds committed May 7, 2021
  16. kernel/up.c: fix typo

    s/condtions/conditions/
    
    Link: https://lkml.kernel.org/r/20210317032732.3260835-1-unixbhaskar@gmail.com
    Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    unixbhaskar authored and torvalds committed May 7, 2021
  17. kernel/user_namespace.c: fix typos

    change 'verifing' to 'verifying'
    change 'certaint' to 'certain'
    change 'approprpiate' to 'appropriate'
    
    Link: https://lkml.kernel.org/r/20210317100129.12440-1-caoxiaofeng@yulong.com
    Signed-off-by: Xiaofeng Cao <caoxiaofeng@yulong.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    CaoXiaofengGH authored and torvalds committed May 7, 2021
  18. kernel/umh.c: fix some spelling mistakes

    Fix some spelling mistakes, and modify the order of the parameter comments
    to be consistent with the order of the parameters passed to the function.
    
    Link: https://lkml.kernel.org/r/1615636139-4076-1-git-send-email-zhouchuangao@vivo.com
    Signed-off-by: zhouchuangao <zhouchuangao@vivo.com>
    Acked-by: Luis Chamberlain <mcgrof@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    zhouchuangao authored and torvalds committed May 7, 2021
  19. include/linux/pgtable.h: few spelling fixes

    Few spelling fixes throughout the file.
    
    Link: https://lkml.kernel.org/r/20210318201404.6380-1-unixbhaskar@gmail.com
    Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
    Acked-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    unixbhaskar authored and torvalds committed May 7, 2021
  20. mm/slab.c: fix spelling mistake "disired" -> "desired"

    There is a spelling mistake in a comment. Fix it.
    
    Link: https://lkml.kernel.org/r/20210317094158.5762-1-colin.king@canonical.com
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Colin Ian King authored and torvalds committed May 7, 2021
  21. scripts/spelling.txt: add "overflw"

    Add typo "overflw" for "overflow".  This typo was found and fixed in
    drivers/clocksource/timer-pistachio.c.
    
    Link: https://lore.kernel.org/lkml/20210305090315.384547-1-drew@beagleboard.org/
    Link: https://lkml.kernel.org/r/20210305095151.388182-1-drew@beagleboard.org
    Signed-off-by: Drew Fustini <drew@beagleboard.org>
    Suggested-by: Gustavo A. R. Silva <gustavoars@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    pdp7 authored and torvalds committed May 7, 2021
  22. scripts/spelling.txt: Add "diabled" typo

    Increase "diabled" spelling error check.
    
    Link: https://lkml.kernel.org/r/20210304070106.2313-1-zuoqilin1@163.com
    Signed-off-by: zuoqilin <zuoqilin@yulong.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    zuoqilin authored and torvalds committed May 7, 2021
  23. scripts/spelling.txt: add "overlfow"

    Add typo "overlfow" for "overflow". This typo was found and fixed in
    net/sctp/tsnmap.c.
    
    Link: https://lore.kernel.org/netdev/20210304055548.56829-1-drew@beagleboard.org/
    Link: https://lkml.kernel.org/r/20210304072657.64577-1-drew@beagleboard.org
    Signed-off-by: Drew Fustini <drew@beagleboard.org>
    Suggested-by: Kees Cook <keescook@chromium.org>
    Reviewed-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    pdp7 authored and torvalds committed May 7, 2021
  24. arm: print alloc free paths for address in registers

    In case of a use after free kernel oops, the freeing path of the object
    is required to debug futher.  In most of cases the object address is
    present in one of the registers.
    
    Thus check the register's address and if it belongs to slab, print its
    alloc and free path.
    
    e.g. in the below issue register r6 belongs to slab, and a use after
    free issue occurred on one of its dereferenced values:
    
      Unable to handle kernel paging request at virtual address 6b6b6b6f
      ....
      pc : [<c0538afc>]    lr : [<c0465674>]    psr: 60000013
      sp : c8927d40  ip : ffffefff  fp : c8aa8020
      r10: c8927e10  r9 : 00000001  r8 : 00400cc0
      r7 : 00000000  r6 : c8ab0180  r5 : c1804a80  r4 : c8aa8008
      r3 : c1a5661c  r2 : 00000000  r1 : 6b6b6b6b  r0 : c139bf48
      .....
      Register r6 information: slab kmalloc-64 start c8ab0140 data offset 64 pointer offset 0 size 64 allocated at meminfo_proc_show+0x40/0x4fc
          meminfo_proc_show+0x40/0x4fc
          seq_read_iter+0x18c/0x4c4
          proc_reg_read_iter+0x84/0xac
          generic_file_splice_read+0xe8/0x17c
          splice_direct_to_actor+0xb8/0x290
          do_splice_direct+0xa0/0xe0
          do_sendfile+0x2d0/0x438
          sys_sendfile64+0x12c/0x140
          ret_fast_syscall+0x0/0x58
          0xbeeacde4
       Free path:
          meminfo_proc_show+0x5c/0x4fc
          seq_read_iter+0x18c/0x4c4
          proc_reg_read_iter+0x84/0xac
          generic_file_splice_read+0xe8/0x17c
          splice_direct_to_actor+0xb8/0x290
          do_splice_direct+0xa0/0xe0
          do_sendfile+0x2d0/0x438
          sys_sendfile64+0x12c/0x140
          ret_fast_syscall+0x0/0x58
          0xbeeacde4
    
    Link: https://lkml.kernel.org/r/1615891032-29160-3-git-send-email-maninder1.s@samsung.com
    Co-developed-by: Vaneet Narang <v.narang@samsung.com>
    Signed-off-by: Vaneet Narang <v.narang@samsung.com>
    Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Dmitry Safonov <0x7f454c46@gmail.com>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: Paul E. McKenney <paulmck@kernel.org>
    Cc: Pekka Enberg <penberg@kernel.org>
    Cc: Russell King <linux@armlinux.org.uk>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    maninder42 authored and torvalds committed May 7, 2021
  25. mm/vmalloc: remove vwrite()

    The last user (/dev/kmem) is gone. Let's drop it.
    
    Link: https://lkml.kernel.org/r/20210324102351.6932-4-david@redhat.com
    Signed-off-by: David Hildenbrand <david@redhat.com>
    Acked-by: Michal Hocko <mhocko@suse.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Hillf Danton <hdanton@sina.com>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: Oleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: huang ying <huang.ying.caritas@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    davidhildenbrand authored and torvalds committed May 7, 2021
  26. mm: remove xlate_dev_kmem_ptr()

    Since /dev/kmem has been removed, let's remove the xlate_dev_kmem_ptr()
    leftovers.
    
    Link: https://lkml.kernel.org/r/20210324102351.6932-3-david@redhat.com
    Signed-off-by: David Hildenbrand <david@redhat.com>
    Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Acked-by: Michal Hocko <mhocko@suse.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Richard Henderson <rth@twiddle.net>
    Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
    Cc: Matt Turner <mattst88@gmail.com>
    Cc: Russell King <linux@armlinux.org.uk>
    Cc: Brian Cain <bcain@codeaurora.org>
    Cc: Geert Uytterhoeven <geert@linux-m68k.org>
    Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
    Cc: Helge Deller <deller@gmx.de>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Heiko Carstens <hca@linux.ibm.com>
    Cc: Vasily Gorbik <gor@linux.ibm.com>
    Cc: Christian Borntraeger <borntraeger@de.ibm.com>
    Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
    Cc: Rich Felker <dalias@libc.org>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: Krzysztof Kozlowski <krzk@kernel.org>
    Cc: Mikulas Patocka <mpatocka@redhat.com>
    Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
    Cc: Mike Rapoport <rppt@kernel.org>
    Cc: Palmer Dabbelt <palmerdabbelt@google.com>
    Cc: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Greentime Hu <green.hu@gmail.com>
    Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Cc: Randy Dunlap <rdunlap@infradead.org>
    Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
    Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
    Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
    Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
    Cc: Niklas Schnelle <schnelle@linux.ibm.com>
    Cc: Pierre Morel <pmorel@linux.ibm.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    davidhildenbrand authored and torvalds committed May 7, 2021
  27. drivers/char: remove /dev/kmem for good

    Patch series "drivers/char: remove /dev/kmem for good".
    
    Exploring /dev/kmem and /dev/mem in the context of memory hot(un)plug and
    memory ballooning, I started questioning the existence of /dev/kmem.
    
    Comparing it with the /proc/kcore implementation, it does not seem to be
    able to deal with things like
    
    a) Pages unmapped from the direct mapping (e.g., to be used by secretmem)
      -> kern_addr_valid(). virt_addr_valid() is not sufficient.
    
    b) Special cases like gart aperture memory that is not to be touched
      -> mem_pfn_is_ram()
    
    Unless I am missing something, it's at least broken in some cases and might
    fault/crash the machine.
    
    Looks like its existence has been questioned before in 2005 and 2010 [1],
    after ~11 additional years, it might make sense to revive the discussion.
    
    CONFIG_DEVKMEM is only enabled in a single defconfig (on purpose or by
    mistake?).  All distributions disable it: in Ubuntu it has been disabled
    for more than 10 years, in Debian since 2.6.31, in Fedora at least
    starting with FC3, in RHEL starting with RHEL4, in SUSE starting from
    15sp2, and OpenSUSE has it disabled as well.
    
    1) /dev/kmem was popular for rootkits [2] before it got disabled
       basically everywhere. Ubuntu documents [3] "There is no modern user of
       /dev/kmem any more beyond attackers using it to load kernel rootkits.".
       RHEL documents in a BZ [5] "it served no practical purpose other than to
       serve as a potential security problem or to enable binary module drivers
       to access structures/functions they shouldn't be touching"
    
    2) /proc/kcore is a decent interface to have a controlled way to read
       kernel memory for debugging puposes. (will need some extensions to
       deal with memory offlining/unplug, memory ballooning, and poisoned
       pages, though)
    
    3) It might be useful for corner case debugging [1]. KDB/KGDB might be a
       better fit, especially, to write random memory; harder to shoot
       yourself into the foot.
    
    4) "Kernel Memory Editor" [4] hasn't seen any updates since 2000 and seems
       to be incompatible with 64bit [1]. For educational purposes,
       /proc/kcore might be used to monitor value updates -- or older
       kernels can be used.
    
    5) It's broken on arm64, and therefore, completely disabled there.
    
    Looks like it's essentially unused and has been replaced by better
    suited interfaces for individual tasks (/proc/kcore, KDB/KGDB). Let's
    just remove it.
    
    [1] https://lwn.net/Articles/147901/
    [2] https://www.linuxjournal.com/article/10505
    [3] https://wiki.ubuntu.com/Security/Features#A.2Fdev.2Fkmem_disabled
    [4] https://sourceforge.net/projects/kme/
    [5] https://bugzilla.redhat.com/show_bug.cgi?id=154796
    
    Link: https://lkml.kernel.org/r/20210324102351.6932-1-david@redhat.com
    Link: https://lkml.kernel.org/r/20210324102351.6932-2-david@redhat.com
    Signed-off-by: David Hildenbrand <david@redhat.com>
    Acked-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Kees Cook <keescook@chromium.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: "Alexander A. Klimov" <grandmaster@al2klimov.de>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
    Cc: Andrew Lunn <andrew@lunn.ch>
    Cc: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Brian Cain <bcain@codeaurora.org>
    Cc: Christian Borntraeger <borntraeger@de.ibm.com>
    Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
    Cc: Chris Zankel <chris@zankel.net>
    Cc: Corentin Labbe <clabbe@baylibre.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Geert Uytterhoeven <geert@linux-m68k.org>
    Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
    Cc: Greentime Hu <green.hu@gmail.com>
    Cc: Gregory Clement <gregory.clement@bootlin.com>
    Cc: Heiko Carstens <hca@linux.ibm.com>
    Cc: Helge Deller <deller@gmx.de>
    Cc: Hillf Danton <hdanton@sina.com>
    Cc: huang ying <huang.ying.caritas@gmail.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
    Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
    Cc: James Troup <james.troup@canonical.com>
    Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
    Cc: Jonas Bonn <jonas@southpole.se>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Kairui Song <kasong@redhat.com>
    Cc: Krzysztof Kozlowski <krzk@kernel.org>
    Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Cc: Liviu Dudau <liviu.dudau@arm.com>
    Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
    Cc: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: Matt Turner <mattst88@gmail.com>
    Cc: Max Filippov <jcmvbkbc@gmail.com>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Mike Rapoport <rppt@kernel.org>
    Cc: Mikulas Patocka <mpatocka@redhat.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Niklas Schnelle <schnelle@linux.ibm.com>
    Cc: Oleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com>
    Cc: openrisc@lists.librecores.org
    Cc: Palmer Dabbelt <palmerdabbelt@google.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: "Pavel Machek (CIP)" <pavel@denx.de>
    Cc: Pavel Machek <pavel@ucw.cz>
    Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
    Cc: Pierre Morel <pmorel@linux.ibm.com>
    Cc: Randy Dunlap <rdunlap@infradead.org>
    Cc: Richard Henderson <rth@twiddle.net>
    Cc: Rich Felker <dalias@libc.org>
    Cc: Robert Richter <rric@kernel.org>
    Cc: Rob Herring <robh@kernel.org>
    Cc: Russell King <linux@armlinux.org.uk>
    Cc: Sam Ravnborg <sam@ravnborg.org>
    Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
    Cc: sparclinux@vger.kernel.org
    Cc: Stafford Horne <shorne@gmail.com>
    Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Sudeep Holla <sudeep.holla@arm.com>
    Cc: Theodore Dubois <tblodt@icloud.com>
    Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Vasily Gorbik <gor@linux.ibm.com>
    Cc: Viresh Kumar <viresh.kumar@linaro.org>
    Cc: William Cohen <wcohen@redhat.com>
    Cc: Xiaoming Ni <nixiaoming@huawei.com>
    Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    davidhildenbrand authored and torvalds committed May 7, 2021
  28. mm: fix some typos and code style problems

    fix some typos and code style problems in mm.
    
    gfp.h: s/MAXNODES/MAX_NUMNODES
    mmzone.h: s/then/than
    rmap.c: s/__vma_split()/__vma_adjust()
    swap.c: s/__mod_zone_page_stat/__mod_zone_page_state, s/is is/is
    swap_state.c: s/whoes/whose
    z3fold.c: code style problem fix in z3fold_unregister_migration
    zsmalloc.c: s/of/or, s/give/given
    
    Link: https://lkml.kernel.org/r/20210419083057.64820-1-luoshijie1@huawei.com
    Signed-off-by: Shijie Luo <luoshijie1@huawei.com>
    Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Shijie Luo authored and torvalds committed May 7, 2021
  29. ipc/sem.c: mundane typo fixes

    s/runtine/runtime/
    s/AQUIRE/ACQUIRE/
    s/seperately/separately/
    s/wont/won\'t/
    s/succesfull/successful/
    
    Link: https://lkml.kernel.org/r/20210326022240.26375-1-unixbhaskar@gmail.com
    Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
    Acked-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    unixbhaskar authored and torvalds committed May 7, 2021
  30. modules: add CONFIG_MODPROBE_PATH

    Allow the developer to specifiy the initial value of the modprobe_path[]
    string.  This can be used to set it to the empty string initially, thus
    effectively disabling request_module() during early boot until userspace
    writes a new value via the /proc/sys/kernel/modprobe interface.  [1]
    
    When building a custom kernel (often for an embedded target), it's normal
    to build everything into the kernel that is needed for booting, and indeed
    the initramfs often contains no modules at all, so every such
    request_module() done before userspace init has mounted the real rootfs is
    a waste of time.
    
    This is particularly useful when combined with the previous patch, which
    made the initramfs unpacking asynchronous - for that to work, it had to
    make any usermodehelper call wait for the unpacking to finish before
    attempting to invoke the userspace helper.  By eliminating all such
    (known-to-be-futile) calls of usermodehelper, the initramfs unpacking and
    the {device,late}_initcalls can proceed in parallel for much longer.
    
    For a relatively slow ppc board I'm working on, the two patches combined
    lead to 0.2s faster boot - but more importantly, the fact that the
    initramfs unpacking proceeds completely in the background while devices
    get probed means I get to handle the gpio watchdog in time without getting
    reset.
    
    [1] __request_module() already has an early -ENOENT return when
    modprobe_path is the empty string.
    
    Link: https://lkml.kernel.org/r/20210313212528.2956377-3-linux@rasmusvillemoes.dk
    Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Acked-by: Jessica Yu <jeyu@kernel.org>
    Acked-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Nick Desaulniers <ndesaulniers@google.com>
    Cc: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Villemoes authored and torvalds committed May 7, 2021
  31. init/initramfs.c: do unpacking asynchronously

    Patch series "background initramfs unpacking, and CONFIG_MODPROBE_PATH", v3.
    
    These two patches are independent, but better-together.
    
    The second is a rather trivial patch that simply allows the developer to
    change "/sbin/modprobe" to something else - e.g.  the empty string, so
    that all request_module() during early boot return -ENOENT early, without
    even spawning a usermode helper, needlessly synchronizing with the
    initramfs unpacking.
    
    The first patch delegates decompressing the initramfs to a worker thread,
    allowing do_initcalls() in main.c to proceed to the device_ and late_
    initcalls without waiting for that decompression (and populating of
    rootfs) to finish.  Obviously, some of those later calls may rely on the
    initramfs being available, so I've added synchronization points in the
    firmware loader and usermodehelper paths - there might be other places
    that would need this, but so far no one has been able to think of any
    places I have missed.
    
    There's not much to win if most of the functionality needed during boot is
    only available as modules.  But systems with a custom-made .config and
    initramfs can boot faster, partly due to utilizing more than one cpu
    earlier, partly by avoiding known-futile modprobe calls (which would still
    trigger synchronization with the initramfs unpacking, thus eliminating
    most of the first benefit).
    
    This patch (of 2):
    
    Most of the boot process doesn't actually need anything from the
    initramfs, until of course PID1 is to be executed.  So instead of doing
    the decompressing and populating of the initramfs synchronously in
    populate_rootfs() itself, push that off to a worker thread.
    
    This is primarily motivated by an embedded ppc target, where unpacking
    even the rather modest sized initramfs takes 0.6 seconds, which is long
    enough that the external watchdog becomes unhappy that it doesn't get
    attention soon enough.  By doing the initramfs decompression in a worker
    thread, we get to do the device_initcalls and hence start petting the
    watchdog much sooner.
    
    Normal desktops might benefit as well.  On my mostly stock Ubuntu kernel,
    my initramfs is a 26M xz-compressed blob, decompressing to around 126M.
    That takes almost two seconds:
    
    [    0.201454] Trying to unpack rootfs image as initramfs...
    [    1.976633] Freeing initrd memory: 29416K
    
    Before this patch, these lines occur consecutively in dmesg.  With this
    patch, the timestamps on these two lines is roughly the same as above, but
    with 172 lines inbetween - so more than one cpu has been kept busy doing
    work that would otherwise only happen after the populate_rootfs()
    finished.
    
    Should one of the initcalls done after rootfs_initcall time (i.e., device_
    and late_ initcalls) need something from the initramfs (say, a kernel
    module or a firmware blob), it will simply wait for the initramfs
    unpacking to be done before proceeding, which should in theory make this
    completely safe.
    
    But if some driver pokes around in the filesystem directly and not via one
    of the official kernel interfaces (i.e.  request_firmware*(),
    call_usermodehelper*) that theory may not hold - also, I certainly might
    have missed a spot when sprinkling wait_for_initramfs().  So there is an
    escape hatch in the form of an initramfs_async= command line parameter.
    
    Link: https://lkml.kernel.org/r/20210313212528.2956377-1-linux@rasmusvillemoes.dk
    Link: https://lkml.kernel.org/r/20210313212528.2956377-2-linux@rasmusvillemoes.dk
    Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Jessica Yu <jeyu@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Nick Desaulniers <ndesaulniers@google.com>
    Cc: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Villemoes authored and torvalds committed May 7, 2021
  32. kernel/async.c: remove async_unregister_domain()

    No callers in the tree.
    
    Link: https://lkml.kernel.org/r/20210309151723.1907838-2-linux@rasmusvillemoes.dk
    Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Cc: Tejun Heo <tj@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Villemoes authored and torvalds committed May 7, 2021
Older