Skip to content
Permalink
Lucas-Tanure/A…
Switch branches/tags

Commits on Dec 16, 2021

  1. ALSA: hda/realtek: Add CS35L41 support for Thinkpad laptops

    Add support for two CS35L41 using I2C bus and the component
    binding method
    
    Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
    Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
    Stefan Binding authored and intel-lab-lkp committed Dec 16, 2021
  2. ALSA: hda/realtek: Add support for Legion 7 16ACHg6 laptop

    Add Support for CS35L41 using the component binding
    method
    
    Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
    lucastanure authored and intel-lab-lkp committed Dec 16, 2021
  3. ACPI / scan: Create platform device for CLSA0100 and CSC3551 ACPI nodes

    The ACPI device with CLSA0100 or CSC3551 is a sound card
    with multiple instances of CS35L41 connectec by I2C to
    the main CPU.
    
    We add an ID to the i2c_multi_instantiate_ids list to enumerate
    all I2C slaves correctly.
    
    Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
    lucastanure authored and intel-lab-lkp committed Dec 16, 2021
  4. hda: cs35l41: Add support for CS35L41 in HDA systems

    Add support for CS35L41 using a new separated driver
    that can be used in all upcoming designs
    
    Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
    lucastanure authored and intel-lab-lkp committed Dec 16, 2021
  5. ASoC: cs35l41: Create shared function for boost configuration

    ASoC and HDA will use the same registers to configure
    internal boost for the device
    
    Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
    lucastanure authored and intel-lab-lkp committed Dec 16, 2021
  6. ASoC: cs35l41: Create shared function for setting channels

    ASoC and HDA will use the same register to set channels
    for the device
    
    Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
    lucastanure authored and intel-lab-lkp committed Dec 16, 2021
  7. ASoC: cs35l41: Create shared function for errata patches

    ASoC and HDA systems require the same errata patches, so
    move it to the shared code using a function the correctly
    applies the patches by revision
    
    Also, move CS35L41_DSP1_CCM_CORE_CTRL write to errata
    patch function as is required to be written at boot,
    but not in regmap_register_patch sequence as will affect
    waking up from hibernation
    
    Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
    lucastanure authored and intel-lab-lkp committed Dec 16, 2021
  8. ASoC: cs35l41: Move power initializations to reg_sequence

    ASoC and HDA systems for all revisions of CS35L41 will benefit
    from having this initialization, so add it to reg_sequence of
    each revision
    
    By moving to reg_sequence all gains are set to zero. And boost,
    monitoring parts, and class D amplifier are disabled.
    
    Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
    lucastanure authored and intel-lab-lkp committed Dec 16, 2021
  9. ASoC: cs35l41: Move cs35l41_otp_unpack to shared code

    ASoC and HDA will do the same cs35l41_otp_unpack, so move it
    to shared code
    
    Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
    lucastanure authored and intel-lab-lkp committed Dec 16, 2021
  10. ASoC: cs35l41: Convert tables to shared source code

    To support CS35L41 in HDA systems the HDA driver
    for CS35L41 would have to duplicate some functions
    that already exist on ASoC driver
    So instead of duplicate the code, use the new lib
    source as a shared resource for both ASoC and HDA
    
    Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
    lucastanure authored and intel-lab-lkp committed Dec 16, 2021

Commits on Dec 15, 2021

  1. Add linux-next specific files for 20211215

    Signed-off-by: Mark Brown <broonie@kernel.org>
    broonie committed Dec 15, 2021
  2. mm: Fix mismerge

    git rerere didn't appear to forget the merge like I asked it to.
    
    Signed-off-by: Mark Brown <broonie@kernel.org>
    broonie committed Dec 15, 2021
  3. Merge branch 'akpm/master'

    broonie committed Dec 15, 2021
  4. lib/stackdepot: always do filter_irq_stacks() in stack_depot_save()

    The non-interrupt portion of interrupt stack traces before interrupt entry
    is usually arbitrary.  Therefore, saving stack traces of interrupts (that
    include entries before interrupt entry) to stack depot leads to unbounded
    stackdepot growth.
    
    As such, use of filter_irq_stacks() is a requirement to ensure stackdepot
    can efficiently deduplicate interrupt stacks.
    
    Looking through all current users of stack_depot_save(), none (except
    KASAN) pass the stack trace through filter_irq_stacks() before passing it
    on to stack_depot_save().
    
    Rather than adding filter_irq_stacks() to all current users of
    stack_depot_save(), it became clear that stack_depot_save() should simply
    do filter_irq_stacks().
    
    Link: https://lkml.kernel.org/r/20211130095727.2378739-1-elver@google.com
    Signed-off-by: Marco Elver <elver@google.com>
    Reviewed-by: Alexander Potapenko <glider@google.com>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Vijayanand Jitta <vjitta@codeaurora.org>
    Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
    Cc: Imran Khan <imran.f.khan@oracle.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Jani Nikula <jani.nikula@intel.com>
    Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    melver authored and broonie committed Dec 15, 2021
  5. lib/stackdepot: allow optional init and stack_table allocation by kvm…

    …alloc() - fixup3
    
    Due to cd06ab2 ("drm/locking: add backtrace for locking contended
    locks without backoff") landing recently to -next adding a new stack depot
    user in drivers/gpu/drm/drm_modeset_lock.c we need to add an appropriate
    call to stack_depot_init() there as well.
    
    Link: https://lkml.kernel.org/r/2a692365-cfa1-64f2-34e0-8aa5674dce5e@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Cc: Jani Nikula <jani.nikula@intel.com>
    Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
    Cc: Marco Elver <elver@google.com>
    Cc: Vijayanand Jitta <vjitta@codeaurora.org>
    Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Cc: Maxime Ripard <mripard@kernel.org>
    Cc: Thomas Zimmermann <tzimmermann@suse.de>
    Cc: David Airlie <airlied@linux.ie>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Andrey Konovalov <andreyknvl@gmail.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Geert Uytterhoeven <geert@linux-m68k.org>
    Cc: Oliver Glitta <glittao@gmail.com>
    Cc: Imran Khan <imran.f.khan@oracle.com>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    tehcaster authored and broonie committed Dec 15, 2021
  6. lib/stackdepot: allow optional init and stack_table allocation by kvm…

    …alloc() - fixup
    
    On FLATMEM, we call page_ext_init_flatmem_late() just before
    kmem_cache_init() which means stack_depot_init() (called by page owner
    init) will not recognize properly it should use kvmalloc() and not
    memblock_alloc().  memblock_alloc() will also not issue a warning and
    return a block memory that can be invalid and cause kernel page fault when
    saving stacks, as reported by the kernel test robot [1].
    
    Fix this by moving page_ext_init_flatmem_late() below kmem_cache_init() so
    that slab_is_available() is true during stack_depot_init().  SPARSEMEM
    doesn't have this issue, as it doesn't do page_ext_init_flatmem_late(),
    but a different page_ext_init() even later in the boot process.
    
    Thanks to Mike Rapoport for pointing out the FLATMEM init ordering issue.
    
    While at it, also actually resolve a checkpatch warning in stack_depot_init()
    from DRM CI, which was supposed to be in the original patch already.
    
    [1] https://lore.kernel.org/all/20211014085450.GC18719@xsang-OptiPlex-9020/
    
    Link: https://lkml.kernel.org/r/6abd9213-19a9-6d58-cedc-2414386d2d81@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Reported-by: kernel test robot <oliver.sang@intel.com>
    Cc: Mike Rapoport <rppt@kernel.org>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    tehcaster authored and broonie committed Dec 15, 2021
  7. lib/stackdepot: fix spelling mistake and grammar in pr_err message

    There is a spelling mistake of the work allocation so fix this and
    re-phrase the message to make it easier to read.
    
    Link: https://lkml.kernel.org/r/20211015104159.11282-1-colin.king@canonical.com
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Colin Ian King authored and broonie committed Dec 15, 2021
  8. lib/stackdepot: allow optional init and stack_table allocation by kvm…

    …alloc()
    
    Currently, enabling CONFIG_STACKDEPOT means its stack_table will be
    allocated from memblock, even if stack depot ends up not actually used.
    The default size of stack_table is 4MB on 32-bit, 8MB on 64-bit.
    
    This is fine for use-cases such as KASAN which is also a config option and
    has overhead on its own.  But it's an issue for functionality that has to
    be actually enabled on boot (page_owner) or depends on hardware (GPU
    drivers) and thus the memory might be wasted.  This was raised as an issue
    [1] when attempting to add stackdepot support for SLUB's debug object
    tracking functionality.  It's common to build kernels with
    CONFIG_SLUB_DEBUG and enable slub_debug on boot only when needed, or
    create only specific kmem caches with debugging for testing purposes.
    
    It would thus be more efficient if stackdepot's table was allocated only
    when actually going to be used.  This patch thus makes the allocation (and
    whole stack_depot_init() call) optional:
    
    - Add a CONFIG_STACKDEPOT_ALWAYS_INIT flag to keep using the current
      well-defined point of allocation as part of mem_init(). Make CONFIG_KASAN
      select this flag.
    - Other users have to call stack_depot_init() as part of their own init when
      it's determined that stack depot will actually be used. This may depend on
      both config and runtime conditions. Convert current users which are
      page_owner and several in the DRM subsystem. Same will be done for SLUB
      later.
    - Because the init might now be called after the boot-time memblock allocation
      has given all memory to the buddy allocator, change stack_depot_init() to
      allocate stack_table with kvmalloc() when memblock is no longer available.
      Also handle allocation failure by disabling stackdepot (could have
      theoretically happened even with memblock allocation previously), and don't
      unnecessarily align the memblock allocation to its own size anymore.
    
    [1] https://lore.kernel.org/all/CAMuHMdW=eoVzM1Re5FVoEN87nKfiLmM2+Ah7eNu2KXEhCvbZyA@mail.gmail.com/
    
    Link: https://lkml.kernel.org/r/20211013073005.11351-1-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Dmitry Vyukov <dvyukov@google.com>
    Reviewed-by: Marco Elver <elver@google.com> # stackdepot
    Cc: Marco Elver <elver@google.com>
    Cc: Vijayanand Jitta <vjitta@codeaurora.org>
    Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Cc: Maxime Ripard <mripard@kernel.org>
    Cc: Thomas Zimmermann <tzimmermann@suse.de>
    Cc: David Airlie <airlied@linux.ie>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Andrey Konovalov <andreyknvl@gmail.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Geert Uytterhoeven <geert@linux-m68k.org>
    Cc: Oliver Glitta <glittao@gmail.com>
    Cc: Imran Khan <imran.f.khan@oracle.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    tehcaster authored and broonie committed Dec 15, 2021
  9. proc-remove-pde_data-completely-fix-fix

    Cc: Muchun Song <songmuchun@bytedance.com>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    akpm00 authored and broonie committed Dec 15, 2021
  10. proc-remove-pde_data-completely-fix

    fix naming clash in drivers/nubus/proc.c
    
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: Alexey Gladkov <gladkov.alexey@gmail.com>
    Cc: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: Muchun Song <songmuchun@bytedance.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    akpm00 authored and broonie committed Dec 15, 2021
  11. proc: remove PDE_DATA() completely

    Remove PDE_DATA() completely and replace it with pde_data().
    
    Link: https://lkml.kernel.org/r/20211124081956.87711-2-songmuchun@bytedance.com
    Signed-off-by: Muchun Song <songmuchun@bytedance.com>
    Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: Alexey Gladkov <gladkov.alexey@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Muchun Song authored and broonie committed Dec 15, 2021
  12. fs: proc: store PDE()->data into inode->i_private

    PDE_DATA(inode) is introduced to get user private data and hide the layout
    of struct proc_dir_entry.  The inode->i_private is used to do the same
    thing as well.  Save a copy of user private data to inode-> i_private when
    proc inode is allocated.  This means the user also can get their private
    data by inode->i_private.
    
    Introduce pde_data() to wrap inode->i_private so that we can remove
    PDE_DATA() from fs/proc/generic.c and make PTE_DATE() as a wrapper of
    pde_data().  It will be easier if we decide to remove PDE_DATE() in the
    future.
    
    Link: https://lkml.kernel.org/r/20211124081956.87711-1-songmuchun@bytedance.com
    Signed-off-by: Muchun Song <songmuchun@bytedance.com>
    Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: Alexey Gladkov <gladkov.alexey@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Muchun Song authored and broonie committed Dec 15, 2021
  13. kprobe: move sysctl_kprobes_optimization to kprobes.c

    kernel/sysctl.c is a kitchen sink where everyone leaves their dirty
    dishes, this makes it very difficult to maintain.
    
    To help with this maintenance let's start by moving sysctls to places
    where they actually belong.  The proc sysctl maintainers do not want to
    know what sysctl knobs you wish to add for your own piece of code, we just
    care about the core logic.
    
    Move sysctl_kprobes_optimization from kernel/sysctl.c to kernel/kprobes.c.
    Use register_sysctl() to register the sysctl interface.
    
    [mcgrof@kernel.org: fix compile issue when CONFIG_OPTPROBES is disabled]
    Link: https://lkml.kernel.org/r/20211129211943.640266-7-mcgrof@kernel.org
    Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Eric Biggers <ebiggers@google.com>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
    Cc: Stephen Kitt <steve@sk2.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    nixiaoming authored and broonie committed Dec 15, 2021
  14. fs/coredump: move coredump sysctls into its own file

    This moves the fs/coredump.c respective sysctls to its own file.
    
    Link: https://lkml.kernel.org/r/20211129211943.640266-6-mcgrof@kernel.org
    Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Eric Biggers <ebiggers@google.com>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
    Cc: Stephen Kitt <steve@sk2.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    nixiaoming authored and broonie committed Dec 15, 2021
  15. printk: fix build warning when CONFIG_PRINTK=n

    build warning when CONFIG_PRINTK=n
    	kernel/printk/printk.c:175:5: warning: no previous prototype for
    	 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes]
    
    devkmsg_sysctl_set_loglvl() is only used in sysctl.c when CONFIG_PRINTK=y,
    but it participates in the build when CONFIG_PRINTK=n.  So add compile
    dependency CONFIG_PRINTK=y && CONFIG_SYSCTL=y to fix the build warning.
    
    Link: https://lkml.kernel.org/r/20211129211943.640266-5-mcgrof@kernel.org
    Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Eric Biggers <ebiggers@google.com>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
    Cc: Stephen Kitt <steve@sk2.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    nixiaoming authored and broonie committed Dec 15, 2021
  16. kernel/sysctl.c: rename sysctl_init() to sysctl_init_bases()

    Rename sysctl_init() to sysctl_init_bases() so to reflect exactly what
    this is doing.
    
    Link: https://lkml.kernel.org/r/20211129211943.640266-4-mcgrof@kernel.org
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Eric Biggers <ebiggers@google.com>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
    Cc: Stephen Kitt <steve@sk2.org>
    Cc: Xiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    mcgrof authored and broonie committed Dec 15, 2021
  17. fs: move namespace sysctls and declare fs base directory

    This moves the namespace sysctls to its own file as part of the
    kernel/sysctl.c spring cleaning
    
    Since we have now removed all sysctls for "fs", we now have to declare it
    on the filesystem code, we do that using the new helper, which reduces
    boiler plate code.
    
    We rename init_fs_shared_sysctls() to init_fs_sysctls() to reflect that
    now fs/sysctls.c is taking on the burden of being the first to register
    the base directory as well.
    
    Lastly, since init code will load in the order in which we link it we have
    to move the sysctl code to be linked in early, so that its early init
    routine runs prior to other fs code.  This way, other filesystem code can
    register their own sysctls using the helpers after this:
    
      * register_sysctl_init()
      * register_sysctl()
    
    Link: https://lkml.kernel.org/r/20211129211943.640266-3-mcgrof@kernel.org
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Eric Biggers <ebiggers@google.com>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
    Cc: Stephen Kitt <steve@sk2.org>
    Cc: Xiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    mcgrof authored and broonie committed Dec 15, 2021
  18. sysctl-add-and-use-base-directory-declarer-and-registration-helper-fix

    null-terminate the ctl_table arrays
    
    Link: https://lkml.kernel.org/r/YafJY3rXDYnjK/gs@bombadil.infradead.org
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    mcgrof authored and broonie committed Dec 15, 2021
  19. sysctl: add and use base directory declarer and registration helper

    Patch series "sysctl: add and use base directory declarer and registration helper".
    
    In this patch series we start addressing base directories, and so we start
    with the "fs" sysctls.  The end goal is we end up completely moving all
    "fs" sysctl knobs out from kernel/sysctl.
    
    This patch (of 6):
    
    Add a set of helpers which can be used to declare and register base
    directory sysctls on their own.  We do this so we can later move each of
    the base sysctl directories like "fs", "kernel", etc, to their own
    respective files instead of shoving the declarations and registrations all
    on kernel/sysctl.c.  The lazy approach has caught up and with this, we
    just end up extending the list of base directories / sysctls on one file
    and this makes maintenance difficult due to merge conflicts from many
    developers.
    
    The declarations are used first by kernel/sysctl.c for registration its
    own base which over time we'll try to clean up.  It will be used in the
    next patch to demonstrate how to cleanly deal with base sysctl
    directories.
    
    Link: https://lkml.kernel.org/r/20211129211943.640266-1-mcgrof@kernel.org
    Link: https://lkml.kernel.org/r/20211129211943.640266-2-mcgrof@kernel.org
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: Xiaoming Ni <nixiaoming@huawei.com>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Stephen Kitt <steve@sk2.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: Eric Biggers <ebiggers@google.com>
    Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    mcgrof authored and broonie committed Dec 15, 2021
  20. fs: move pipe sysctls to is own file

    kernel/sysctl.c is a kitchen sink where everyone leaves their dirty
    dishes, this makes it very difficult to maintain.
    
    To help with this maintenance let's start by moving sysctls to places
    where they actually belong.  The proc sysctl maintainers do not want to
    know what sysctl knobs you wish to add for your own piece of code, we just
    care about the core logic.
    
    So move the pipe sysctls to its own file.
    
    Link: https://lkml.kernel.org/r/20211129205548.605569-10-mcgrof@kernel.org
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: "J. Bruce Fields" <bfields@fieldses.org>
    Cc: Jeff Layton <jlayton@kernel.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: Stephen Kitt <steve@sk2.org>
    Cc: Xiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    mcgrof authored and broonie committed Dec 15, 2021
  21. fs: move fs/exec.c sysctls into its own file

    kernel/sysctl.c is a kitchen sink where everyone leaves their dirty
    dishes, this makes it very difficult to maintain.
    
    To help with this maintenance let's start by moving sysctls to places
    where they actually belong.  The proc sysctl maintainers do not want to
    know what sysctl knobs you wish to add for your own piece of code, we just
    care about the core logic.
    
    So move the fs/exec.c respective sysctls to its own file.
    
    Since checkpatch complains about style issues with the old code, this move
    also fixes a few of those minor style issues:
    
      * Use pr_warn() instead of prink(WARNING
      * New empty lines are wanted at the beginning of routines
    
    Link: https://lkml.kernel.org/r/20211129205548.605569-9-mcgrof@kernel.org
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: "J. Bruce Fields" <bfields@fieldses.org>
    Cc: Jeff Layton <jlayton@kernel.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: Stephen Kitt <steve@sk2.org>
    Cc: Xiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    mcgrof authored and broonie committed Dec 15, 2021
  22. fs: move namei sysctls to its own file

    kernel/sysctl.c is a kitchen sink where everyone leaves their dirty
    dishes, this makes it very difficult to maintain.
    
    To help with this maintenance let's start by moving sysctls to places
    where they actually belong.  The proc sysctl maintainers do not want to
    know what sysctl knobs you wish to add for your own piece of code, we just
    care about the core logic.
    
    So move namei's own sysctl knobs to its own file.
    
    Other than the move we also avoid initializing two static variables to 0
    as this is not needed:
    
      * sysctl_protected_symlinks
      * sysctl_protected_hardlinks
    
    Link: https://lkml.kernel.org/r/20211129205548.605569-8-mcgrof@kernel.org
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: "J. Bruce Fields" <bfields@fieldses.org>
    Cc: Jeff Layton <jlayton@kernel.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: Stephen Kitt <steve@sk2.org>
    Cc: Xiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    mcgrof authored and broonie committed Dec 15, 2021
  23. fs: move locking sysctls where they are used

    kernel/sysctl.c is a kitchen sink where everyone leaves their dirty
    dishes, this makes it very difficult to maintain.
    
    To help with this maintenance let's start by moving sysctls to places
    where they actually belong.  The proc sysctl maintainers do not want to
    know what sysctl knobs you wish to add for your own piece of code, we just
    care about the core logic.
    
    The locking fs sysctls are only used on fs/locks.c, so move them there.
    
    Link: https://lkml.kernel.org/r/20211129205548.605569-7-mcgrof@kernel.org
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: "J. Bruce Fields" <bfields@fieldses.org>
    Cc: Jeff Layton <jlayton@kernel.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: Stephen Kitt <steve@sk2.org>
    Cc: Xiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    mcgrof authored and broonie committed Dec 15, 2021
  24. fs: move shared sysctls to fs/sysctls.c

    To help with this maintenance let's start by moving sysctls to places
    where they actually belong.  The proc sysctl maintainers do not want to
    know what sysctl knobs you wish to add for your own piece of code, we just
    care about the core logic.
    
    To help with this maintenance let's start by moving sysctls to places
    where they actually belong.  The proc sysctl maintainers do not want to
    know what sysctl knobs you wish to add for your own piece of code, we just
    care about the core logic.
    
    So move sysctls which are shared between filesystems into a common file
    outside of kernel/sysctl.c.
    
    Link: https://lkml.kernel.org/r/20211129205548.605569-6-mcgrof@kernel.org
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: "J. Bruce Fields" <bfields@fieldses.org>
    Cc: Jeff Layton <jlayton@kernel.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: Stephen Kitt <steve@sk2.org>
    Cc: Xiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    mcgrof authored and broonie committed Dec 15, 2021
  25. sysctl: move maxolduid as a sysctl specific const

    The maxolduid value is only shared for sysctl purposes for use on a max
    range.  Just stuff this into our shared const array.
    
    Link: https://lkml.kernel.org/r/20211129205548.605569-5-mcgrof@kernel.org
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: "J. Bruce Fields" <bfields@fieldses.org>
    Cc: Jeff Layton <jlayton@kernel.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: Stephen Kitt <steve@sk2.org>
    Cc: Xiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    mcgrof authored and broonie committed Dec 15, 2021
Older