ppc64le and 32-bit LE userland compatibility

2020-05-29 Thread Will Springer
Hey all, a couple of us over in #talos-workstation on freenode have been working on an effort to bring up a Linux PowerPC userland that runs in 32-bit little-endian mode, aka ppcle. As far as we can tell, no ABI has ever been designated for this (unless you count the patchset from a decade ago [1])

Re: [PATCH v3 5/7] powerpc/pmem/of_pmem: Update of_pmem to use the new barrier instruction.

2020-05-29 Thread kbuild test robot
Hi "Aneesh, I love your patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.7-rc7] [cannot apply to next-20200529] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest t

Re: [PATCH v3 3/7] powerpc/pmem: Add flush routines using new pmem store and sync instruction

2020-05-29 Thread kbuild test robot
Hi "Aneesh, I love your patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.7-rc7 next-20200529] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base&

Re: [PATCH net] drivers/net/ibmvnic: Update VNIC protocol version reporting

2020-05-29 Thread David Miller
From: Thomas Falcon Date: Thu, 28 May 2020 11:19:17 -0500 > VNIC protocol version is reported in big-endian format, but it > is not byteswapped before logging. Fix that, and remove version > comparison as only one protocol version exists at this time. > > Signed-off-by: Thomas Falcon Applied,

Re: [RFC][PATCH v3 1/5] sparc64: Fix asm/percpu.h build error

2020-05-29 Thread David Miller
From: Peter Zijlstra Date: Fri, 29 May 2020 23:35:51 +0200 > ../arch/sparc/include/asm/percpu_64.h:7:24: warning: call-clobbered register > used for global register variable > register unsigned long __local_per_cpu_offset asm("g5"); The "-ffixed-g5" option on the command line tells gcc that we

[powerpc:next-test 160/198] arch/powerpc/platforms/powernv/pci-ioda.c:1889:13: warning: function 'pnv_ioda_setup_bus_dma' is not needed and will not be emitted

2020-05-29 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test head: e376ca093587eafd840bb0f9df04090e2a54249c commit: dc3d8f85bb571c3640ebba24b82a527cf2cb3f24 [160/198] powerpc/powernv/pci: Re-work bus PE configuration config: powerpc64-randconfig-r024-20200529 (attached

[PATCH v9 2/5] seq_buf: Export seq_buf_printf

2020-05-29 Thread Vaibhav Jain
'seq_buf' provides a very useful abstraction for writing to a string buffer without needing to worry about it over-flowing. However even though the API has been stable for couple of years now its still not exported to kernel loadable modules limiting its usage. Hence this patch proposes update to

[PATCH v9 5/5] powerpc/papr_scm: Implement support for PAPR_PDSM_HEALTH

2020-05-29 Thread Vaibhav Jain
This patch implements support for PDSM request 'PAPR_PDSM_HEALTH' that returns a newly introduced 'struct nd_papr_pdsm_health' instance containing dimm health information back to user space in response to ND_CMD_CALL. This functionality is implemented in newly introduced papr_pdsm_health() that que

[PATCH v9 4/5] ndctl/papr_scm, uapi: Add support for PAPR nvdimm specific methods

2020-05-29 Thread Vaibhav Jain
Introduce support for PAPR NVDIMM Specific Methods (PDSM) in papr_scm module and add the command family NVDIMM_FAMILY_PAPR to the white list of NVDIMM command sets. Also advertise support for ND_CMD_CALL for the nvdimm command mask and implement necessary scaffolding in the module to handle ND_CMD_

[PATCH v9 3/5] powerpc/papr_scm: Fetch nvdimm health information from PHYP

2020-05-29 Thread Vaibhav Jain
Implement support for fetching nvdimm health information via H_SCM_HEALTH hcall as documented in Ref[1]. The hcall returns a pair of 64-bit bitmap, bitwise-and of which is then stored in 'struct papr_scm_priv' and subsequently partially exposed to user-space via newly introduced dimm specific attri

[PATCH v9 1/5] powerpc: Document details on H_SCM_HEALTH hcall

2020-05-29 Thread Vaibhav Jain
Add documentation to 'papr_hcalls.rst' describing the bitmap flags that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM specification. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Signed-off-by: Vaibhav Jain --- Changelog: v8..v9: * s/SCM/PMEM device.

[PATCH v9 0/5] powerpc/papr_scm: Add support for reporting nvdimm health

2020-05-29 Thread Vaibhav Jain
Changes since v8 [1]: * Updated proposed changes to remove usage of term 'SCM' due to ambiguity with 'PMEM' and 'NVDIMM'. [ Dan Williams ] * Replaced the usage of term 'SCM' with 'PMEM' in most contexts. [ Aneesh ] * Renamed NVDIMM health defines from PAPR_SCM_DIMM_* to PAPR_PMEM_* . * Updates

[PATCH v3 0/5] lockdep: Change IRQ state tracking to use per-cpu variables

2020-05-29 Thread Peter Zijlstra
Ahmed and Sebastian wanted additional lockdep_assert*() macros and ran into header hell. Move the IRQ state into per-cpu variables, which removes the dependency on task_struct, which is what generated the header-hell. These patches are intended to go on top of: https://lkml.kernel.org/r/2020052

[PATCH v3 2/5] powerpc64: Break asm/percpu.h vs spinlock_types.h dependency

2020-05-29 Thread Peter Zijlstra
In order to use in lockdep.h, we need to make sure asm/percpu.h does not itself depend on lockdep. The below seems to make that so and builds powerpc64-defconfig + PROVE_LOCKING. Signed-off-by: Peter Zijlstra (Intel) --- arch/powerpc/include/asm/dtl.h | 52 +++

[RFC][PATCH v3 1/5] sparc64: Fix asm/percpu.h build error

2020-05-29 Thread Peter Zijlstra
In order to break a header dependency between lockdep and task_struct, I need per-cpu stuff from lockdep. Including from lockdep.h gives a build error, this patch cures that, but results in the following warning: ../arch/sparc/include/asm/percpu_64.h:7:24: warning: call-clobbered register used

[PATCH v3 5/5] lockdep: Remove lockdep_hardirq{s_enabled, _context}() argument

2020-05-29 Thread Peter Zijlstra
Now that the macros use per-cpu data, we no longer need the argument. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/entry/common.c|2 +- include/linux/irqflags.h |8 include/linux/lockdep.h|2 +- kernel/locking/lockdep.c | 30 ++

[PATCH v3 4/5] lockdep: Change hardirq{s_enabled, _context} to per-cpu variables

2020-05-29 Thread Peter Zijlstra
Currently all IRQ-tracking state is in task_struct, this means that task_struct needs to be defined before we use it. Especially for lockdep_assert_irq*() this can lead to header-hell. Move the hardirq state into per-cpu variables to avoid the task_struct dependency. Signed-off-by: Peter Zijlstr

[PATCH v3 3/5] s390: Break cyclic percpu include

2020-05-29 Thread Peter Zijlstra
In order to use in irqflags.h, we need to make sure asm/percpu.h does not itself depend on irqflags.h Signed-off-by: Peter Zijlstra (Intel) --- arch/s390/include/asm/smp.h |1 + arch/s390/include/asm/thread_info.h |1 - 2 files changed, 1 insertion(+), 1 deletion(-) --- a/arch/

Re: [musl] ppc64le and 32-bit LE userland compatibility

2020-05-29 Thread Rich Felker
On Fri, May 29, 2020 at 07:03:48PM +, Will Springer wrote: > The next problem concerns the ABI more directly. The failure mode was `file` > surfacing EINVAL from pread64 when invoked on an ELF; pread64 was passed a > garbage value for `pos`, which didn't appear to be caused by anything in > `f

Re: [RFC PATCH 1/2] libnvdimm: Add prctl control for disabling synchronous fault support.

2020-05-29 Thread Dan Williams
On Fri, May 29, 2020 at 3:55 AM Aneesh Kumar K.V wrote: > > On 5/29/20 3:22 PM, Jan Kara wrote: > > Hi! > > > > On Fri 29-05-20 15:07:31, Aneesh Kumar K.V wrote: > >> Thanks Michal. I also missed Jeff in this email thread. > > > > And I think you'll also need some of the sched maintainers for the

Re: [PATCH v8 0/8] powerpc: switch VDSO to C implementation

2020-05-29 Thread Christophe Leroy
Hi Michael, Le 28/04/2020 à 15:16, Christophe Leroy a écrit : This is the seventh version of a series to switch powerpc VDSO to generic C implementation. Main changes since v7 are: - Added gettime64 on PPC32 This series applies on today's powerpc/merge branch. See the last patches for details

Re: [PATCH] powerpc/32s: Fix another build failure with CONFIG_PPC_KUAP_DEBUG

2020-05-29 Thread Christophe Leroy
Le 29/05/2020 à 20:50, Christophe Leroy a écrit : From: Christophe Leroy 'thread' doesn't exist in kuap_check() macro. Use 'current' instead. Fixes: a68c31fc01ef ("powerpc/32s: Implement Kernel Userspace Access Protection") Signed-off-by: Christophe Leroy Argh, can you drop this line ?

Re: [PATCH] powerpc/nvram: Replace kmalloc with kzalloc in the error message

2020-05-29 Thread Markus Elfring
> Please just remove the message instead, it's a tiny allocation that's > unlikely to ever fail, and the caller will print an error anyway. How do you think about to take another look at a previous update suggestion like the following? powerpc/nvram: Delete three error messages for a failed memor

[PATCH] powerpc/32s: Fix another build failure with CONFIG_PPC_KUAP_DEBUG

2020-05-29 Thread Christophe Leroy
From: Christophe Leroy 'thread' doesn't exist in kuap_check() macro. Use 'current' instead. Fixes: a68c31fc01ef ("powerpc/32s: Implement Kernel Userspace Access Protection") Signed-off-by: Christophe Leroy Cc: sta...@vger.kernel.org Signed-off-by: Christophe Leroy --- arch/powerpc/include/a

Re: [PATCH] ASoC: fsl_asrc_dma: Fix dma_chan leak when config DMA channel failed

2020-05-29 Thread Mark Brown
On Mon, 25 May 2020 22:12:46 +0800, Xiyu Yang wrote: > fsl_asrc_dma_hw_params() invokes dma_request_channel() or > fsl_asrc_get_dma_channel(), which returns a reference of the specified > dma_chan object to "pair->dma_chan[dir]" with increased refcnt. > > The reference counting issue happens in on

Re: [Intel-gfx] [PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Kees Cook
On Fri, May 29, 2020 at 11:49:12AM +, Luis Chamberlain wrote: > Yikes, sense, you're right. Nope, I left the random config tests to > 0day. Will fix, thanks! Yeah, I do the same for randconfig, but I always do an "allmodconfig" build before sending stuff. It's a good smoke test. -- Kees Cook

Re: [PATCH 12/13] sysctl: add helper to register empty subdir

2020-05-29 Thread Eric W. Biederman
Luis Chamberlain writes: > The way to create a subdirectory from the base set of directories > is a bit obscure, so provide a helper which makes this clear, and > also helps remove boiler plate code required to do this work. I agreee calling: register_sysctl("fs/binfmt_misc", sysctl_mount_point)

Re: [PATCH 02/13] cdrom: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Eric W. Biederman
Luis Chamberlain writes: > This simplifies the code considerably. The following coccinelle With register_sysctl the code would read: cdrom_sysctl_header = register_sysctl("dev/cdrom", cdrom_table); Please go that direction. Thank you. Eric

Re: [PATCH 01/13] sysctl: add new register_sysctl_subdir() helper

2020-05-29 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: > Luis Chamberlain writes: > >> Often enough all we need to do is create a subdirectory so that >> we can stuff sysctls underneath it. However, *if* that directory >> was already created early on the boot sequence we really have no >> need to use

Re: [PATCH 01/13] sysctl: add new register_sysctl_subdir() helper

2020-05-29 Thread Eric W. Biederman
Luis Chamberlain writes: > Often enough all we need to do is create a subdirectory so that > we can stuff sysctls underneath it. However, *if* that directory > was already created early on the boot sequence we really have no > need to use the full boiler plate code for it, we can just use > local

Re: [PATCH v3 3/3] arch, scripts: Add script to check relocations at compile time

2020-05-29 Thread Anup Patel
On Sun, May 24, 2020 at 2:26 PM Alexandre Ghiti wrote: > > Relocating kernel at runtime is done very early in the boot process, so > it is not convenient to check for relocations there and react in case a > relocation was not expected. > > Powerpc architecture has a script that allows to check at

Re: [PATCH v3 2/3] riscv: Introduce CONFIG_RELOCATABLE

2020-05-29 Thread Anup Patel
On Sun, May 24, 2020 at 2:25 PM Alexandre Ghiti wrote: > > This config allows to compile the kernel as PIE and to relocate it at > any virtual address at runtime: this paves the way to KASLR and to 4-level > page table folding at runtime. Runtime relocation is possible since > relocation metadata

Re: [PATCH 11/13] random: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Xiaoming Ni
On 2020/5/29 18:26, Greg KH wrote: On Fri, May 29, 2020 at 07:41:06AM +, Luis Chamberlain wrote: From: Xiaoming Ni Move random_table sysctl from kernel/sysctl.c to drivers/char/random.c and use register_sysctl_subdir() to help remove the clutter out of kernel/sysctl.c. Signed-off-by: Xiao

Re: [PATCH 01/13] sysctl: add new register_sysctl_subdir() helper

2020-05-29 Thread Luis Chamberlain
On Fri, May 29, 2020 at 11:13:21AM +0300, Jani Nikula wrote: > On Fri, 29 May 2020, Luis Chamberlain wrote: > > Often enough all we need to do is create a subdirectory so that > > we can stuff sysctls underneath it. However, *if* that directory > > was already created early on the boot sequence we

Re: [PATCH 09/13] firmware_loader: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Xiaoming Ni
On 2020/5/29 18:26, Greg KH wrote: On Fri, May 29, 2020 at 07:41:04AM +, Luis Chamberlain wrote: From: Xiaoming Ni Move the firmware config sysctl table to fallback_table.c and use the new register_sysctl_subdir() helper. This removes the clutter from kernel/sysctl.c. Signed-off-by: Xiaom

Re: [PATCH 09/13] firmware_loader: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
On Fri, May 29, 2020 at 12:26:13PM +0200, Greg KH wrote: > On Fri, May 29, 2020 at 07:41:04AM +, Luis Chamberlain wrote: > > From: Xiaoming Ni > > > > Move the firmware config sysctl table to fallback_table.c and use the > > new register_sysctl_subdir() helper. This removes the clutter from >

Re: [Intel-gfx] [PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
On Fri, May 29, 2020 at 01:23:19AM -0700, Kees Cook wrote: > On Fri, May 29, 2020 at 07:41:01AM +, Luis Chamberlain wrote: > > This simplifies the code considerably. The following coccinelle > > SmPL grammar rule was used to transform this code. > > > > // pycocci sysctl-subdir.cocci fs/ocfs2/

Re: [PATCH] powerpc/64/syscall: Disable sanitisers for C syscall entry/exit code

2020-05-29 Thread Michael Ellerman
Andrew Donnellan writes: > On 29/5/20 4:14 pm, Daniel Axtens wrote: >> syzkaller is picking up a bunch of crashes that look like this: >> >> Unrecoverable exception 380 at c037ed60 (msr=80001031) >> Oops: Unrecoverable exception, sig: 6 [#1] >> LE PAGE_SIZE=64K MMU=Hash SMP NR_CPU

Re: [RFC PATCH 1/2] libnvdimm: Add prctl control for disabling synchronous fault support.

2020-05-29 Thread Aneesh Kumar K.V
On 5/29/20 3:22 PM, Jan Kara wrote: Hi! On Fri 29-05-20 15:07:31, Aneesh Kumar K.V wrote: Thanks Michal. I also missed Jeff in this email thread. And I think you'll also need some of the sched maintainers for the prctl bits... On 5/29/20 3:03 PM, Michal Suchánek wrote: Adding Jan On Fri,

Re: [PATCH 11/13] random: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Greg KH
On Fri, May 29, 2020 at 07:41:06AM +, Luis Chamberlain wrote: > From: Xiaoming Ni > > Move random_table sysctl from kernel/sysctl.c to drivers/char/random.c > and use register_sysctl_subdir() to help remove the clutter out of > kernel/sysctl.c. > > Signed-off-by: Xiaoming Ni > Signed-off-by

Re: [PATCH 09/13] firmware_loader: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Greg KH
On Fri, May 29, 2020 at 07:41:04AM +, Luis Chamberlain wrote: > From: Xiaoming Ni > > Move the firmware config sysctl table to fallback_table.c and use the > new register_sysctl_subdir() helper. This removes the clutter from > kernel/sysctl.c. > > Signed-off-by: Xiaoming Ni > Signed-off-by:

Re: [RFC PATCH 1/2] libnvdimm: Add prctl control for disabling synchronous fault support.

2020-05-29 Thread Jan Kara
Hi! On Fri 29-05-20 15:07:31, Aneesh Kumar K.V wrote: > Thanks Michal. I also missed Jeff in this email thread. And I think you'll also need some of the sched maintainers for the prctl bits... > On 5/29/20 3:03 PM, Michal Suchánek wrote: > > Adding Jan > > > > On Fri, May 29, 2020 at 11:11:39AM

Re: [PATCH v4 6/7] KVM: MIPS: clean up redundant 'kvm_run' parameters

2020-05-29 Thread Paolo Bonzini
On 27/05/20 08:24, Tianjia Zhang wrote: >>> >>> > > Hi Huacai, > > These two patches(6/7 and 7/7) should be merged into the tree of the > mips architecture separately. At present, there seems to be no good way > to merge the whole architecture patchs. > > For this series of patches, some archite

Re: [RFC PATCH 1/2] libnvdimm: Add prctl control for disabling synchronous fault support.

2020-05-29 Thread Aneesh Kumar K.V
Hi, Thanks Michal. I also missed Jeff in this email thread. -aneesh On 5/29/20 3:03 PM, Michal Suchánek wrote: Adding Jan On Fri, May 29, 2020 at 11:11:39AM +0530, Aneesh Kumar K.V wrote: With POWER10, architecture is adding new pmem flush and sync instructions. The kernel should prevent th

Re: [RFC PATCH 1/2] libnvdimm: Add prctl control for disabling synchronous fault support.

2020-05-29 Thread Michal Suchánek
Adding Jan On Fri, May 29, 2020 at 11:11:39AM +0530, Aneesh Kumar K.V wrote: > With POWER10, architecture is adding new pmem flush and sync instructions. > The kernel should prevent the usage of MAP_SYNC if applications are not using > the new instructions on newer hardware. > > This patch adds a

Re: [PATCH] powerpc/64/syscall: Disable sanitisers for C syscall entry/exit code

2020-05-29 Thread Andrew Donnellan
On 29/5/20 4:14 pm, Daniel Axtens wrote: syzkaller is picking up a bunch of crashes that look like this: Unrecoverable exception 380 at c037ed60 (msr=80001031) Oops: Unrecoverable exception, sig: 6 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: CP

Re: [PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Kees Cook
On Fri, May 29, 2020 at 07:41:01AM +, Luis Chamberlain wrote: > This simplifies the code considerably. The following coccinelle > SmPL grammar rule was used to transform this code. > > // pycocci sysctl-subdir.cocci fs/ocfs2/stackglue.c > > @c1@ > expression E1; > identifier subdir, sysctls;

Re: [PATCH 12/13] sysctl: add helper to register empty subdir

2020-05-29 Thread Kees Cook
On Fri, May 29, 2020 at 07:41:07AM +, Luis Chamberlain wrote: > The way to create a subdirectory from the base set of directories > is a bit obscure, so provide a helper which makes this clear, and > also helps remove boiler plate code required to do this work. > > Signed-off-by: Luis Chamberl

Re: [PATCH 13/13] fs: move binfmt_misc sysctl to its own file

2020-05-29 Thread Kees Cook
On Fri, May 29, 2020 at 07:41:08AM +, Luis Chamberlain wrote: > This moves the binfmt_misc sysctl to its own file to help remove > clutter from kernel/sysctl.c. > > Signed-off-by: Luis Chamberlain > --- > fs/binfmt_misc.c | 1 + > kernel/sysctl.c | 7 --- > 2 files changed, 1 insertion(

Re: [PATCH 01/13] sysctl: add new register_sysctl_subdir() helper

2020-05-29 Thread Jani Nikula
On Fri, 29 May 2020, Luis Chamberlain wrote: > Often enough all we need to do is create a subdirectory so that > we can stuff sysctls underneath it. However, *if* that directory > was already created early on the boot sequence we really have no > need to use the full boiler plate code for it, we c

[PATCH 13/13] fs: move binfmt_misc sysctl to its own file

2020-05-29 Thread Luis Chamberlain
This moves the binfmt_misc sysctl to its own file to help remove clutter from kernel/sysctl.c. Signed-off-by: Luis Chamberlain --- fs/binfmt_misc.c | 1 + kernel/sysctl.c | 7 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index f69a043

[PATCH 12/13] sysctl: add helper to register empty subdir

2020-05-29 Thread Luis Chamberlain
The way to create a subdirectory from the base set of directories is a bit obscure, so provide a helper which makes this clear, and also helps remove boiler plate code required to do this work. Signed-off-by: Luis Chamberlain --- include/linux/sysctl.h | 7 +++ kernel/sysctl.c| 16 +

[PATCH 09/13] firmware_loader: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni Move the firmware config sysctl table to fallback_table.c and use the new register_sysctl_subdir() helper. This removes the clutter from kernel/sysctl.c. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- drivers/base/firmware_loader/fallback.c | 4 d

[PATCH 11/13] random: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni Move random_table sysctl from kernel/sysctl.c to drivers/char/random.c and use register_sysctl_subdir() to help remove the clutter out of kernel/sysctl.c. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- drivers/char/random.c | 14 -- include/linux

[PATCH 10/13] eventpoll: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni Move epoll_table sysctl to fs/eventpoll.c and remove the clutter out of kernel/sysctl.c by using register_sysctl_subdir().. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- fs/eventpoll.c | 10 +- include/linux/poll.h | 2 -- include/linux/sy

[PATCH 07/13] test_sysctl: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci lib/test_sysctl.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .procname = E1,

[PATCH 08/13] inotify: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni move inotify_user sysctl to inotify_user.c and use the new register_sysctl_subdir() helper. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- fs/notify/inotify/inotify_user.c | 11 ++- include/linux/inotify.h | 3 --- kernel/sysctl.c

[PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci fs/ocfs2/stackglue.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .procname = E1,

[PATCH 01/13] sysctl: add new register_sysctl_subdir() helper

2020-05-29 Thread Luis Chamberlain
Often enough all we need to do is create a subdirectory so that we can stuff sysctls underneath it. However, *if* that directory was already created early on the boot sequence we really have no need to use the full boiler plate code for it, we can just use local variables to help us guide sysctl to

[PATCH 05/13] macintosh/mac_hid.c: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci drivers/macintosh/mac_hid.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .procnam

[PATCH 04/13] i915: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci drivers/gpu/drm/i915/i915_perf.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .pr

[PATCH 02/13] cdrom: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci drivers/cdrom/cdrom.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .procname = E1

[PATCH 03/13] hpet: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci drivers/char/hpet.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .procname = E1,

[PATCH 00/13] sysctl: spring cleaning

2020-05-29 Thread Luis Chamberlain
Me and Xiaoming are working on some kernel/sysctl.c spring cleaning. During a recent linux-next merge conflict it became clear that the kitchen sink on kernel/sysctl.c creates too many conflicts, and so we need to do away with stuffing everyone's knobs on this one file. This is part of that work.