Re: [PATCH 1/8] apparmor: just use vfs_kern_mount to make .null

2020-04-16 Thread Luis Chamberlain
On Tue, Apr 14, 2020 at 02:42:55PM +0200, Emanuele Giuseppe Esposito wrote: > aa_mk_null_file is using simple_pin_fs/simple_release_fs with local > variables as arguments, for what would amount to a simple > vfs_kern_mount/mntput pair if everything was inlined. Just use > the normal filesystem API

Re: [PATCH 2/8] fs: extract simple_pin/release_fs to separate files

2020-04-16 Thread Luis Chamberlain
On Tue, Apr 14, 2020 at 02:42:56PM +0200, Emanuele Giuseppe Esposito wrote: > We will augment this family of functions with inode management. To avoid > littering include/linux/fs.h and fs/libfs.c, move them to a separate header, > with a Kconfig symbol to enable them. If there are no functional

Re: [PATCH 0/8] Simplefs: group and simplify linux fs code

2020-04-16 Thread Luis Chamberlain
On Tue, Apr 14, 2020 at 02:42:54PM +0200, Emanuele Giuseppe Esposito wrote: > This series of patches introduce wrappers for functions, > arguments simplification in functions calls and most importantly > groups duplicated code in a single header, simplefs, to avoid redundancy > in the linux fs, esp

Re: [PATCH v2 0/8] sysctl: Remove sentinel elements from arch

2023-09-20 Thread Luis Chamberlain
On Wed, Sep 13, 2023 at 11:10:54AM +0200, Joel Granados via B4 Relay wrote: > V2: > * Added clarification both in the commit messages and the coverletter as > to why this patch is safe to apply. > * Added {Acked,Reviewed,Tested}-by from list > * Link to v1: > https://lore.kernel.org/r/20230906-j

Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch

2023-10-10 Thread Luis Chamberlain
On Mon, Oct 02, 2023 at 01:30:35PM +0200, Joel Granados via B4 Relay wrote: > V3: > * Removed the ia64 patch to avoid conflicts with the ia64 removal > * Rebased onto v6.6-rc4 > * Kept/added the trailing comma for the ctl_table arrays. This was a comment > that we received "drivers/*" patch set.

Re: [PATCH v2 00/15] sysctl: Remove sentinel elements from drivers

2023-10-10 Thread Luis Chamberlain
On Mon, Oct 02, 2023 at 10:55:17AM +0200, Joel Granados via B4 Relay wrote: > Changes in v2: > - Left the dangling comma in the ctl_table arrays. > - Link to v1: > https://lore.kernel.org/r/20230928-jag-sysctl_remove_empty_elem_drivers-v1-0-e59120fca...@samsung.com Thanks! Pushed onto sysctl-next

Re: [PATCH 2/3] modpost: Extended modversion support

2023-11-16 Thread Luis Chamberlain
On Wed, Nov 15, 2023 at 06:50:10PM +, Matthew Maurer wrote: > Adds a new format for modversions which stores each field in a separate > elf section. The "why" is critical and not mentioned. And I'd like to also see documented this with foresight, if Rust needed could this be used in the future

Re: [PATCH 01/79] fs: add ctime accessors infrastructure

2023-06-30 Thread Luis Chamberlain
t; them. In order to do that safely though, we'll need to eradicate raw > accesses of the inode->i_ctime field from the kernel. > > Add new accessor functions for the ctime that we can use to replace them. > > Signed-off-by: Jeff Layton Reviewed-by: Luis Chamberlain Luis

Re: [PATCH 00/79] fs: new accessors for inode->i_ctime

2023-06-30 Thread Luis Chamberlain
On Wed, Jun 21, 2023 at 03:21:41PM -0400, Steven Rostedt wrote: > On Wed, 21 Jun 2023 10:45:05 -0400 > Jeff Layton wrote: > > > Most of this conversion was done via coccinelle, with a few of the more > > non-standard accesses done by hand. There should be no behavioral > > changes with this set.

Re: [PATCH v2 3/5] mmu_notifiers: Call invalidate_range() when invalidating TLBs

2023-07-24 Thread Luis Chamberlain
lush_tlb_info(); > put_cpu(); > - mmu_notifier_arch_invalidate_secondary_tlbs(current->mm, 0, -1UL); > } > > /* This patch also fixes a regression introduced on linux-next, the same crash on arch_tlbbatch_flush() is reproducible with fstests generic/176 on XFS. This patch fixes that regression [0]. This should also close out the syzbot crash too [1] [0] https://gist.github.com/mcgrof/b37fc8cf7e6e1b3935242681de1a83e2 [1] https://lore.kernel.org/all/3afcb4060135a...@google.com/ Tested-by: Luis Chamberlain Luis

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-29 Thread Luis Chamberlain
On Thu, Dec 21, 2023 at 10:02:46AM +0100, Christophe Leroy wrote: > Declaring rodata_enabled and mark_rodata_ro() at all time > helps removing related #ifdefery in C files. > > Signed-off-by: Christophe Leroy Very nice cleanup, thanks!, applied and pushed Luis

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-30 Thread Luis Chamberlain
;> pourquoi ceci est important ? > >> https://aka.ms/LearnAboutSenderIdentification ] > >> > >> On Mon, Jan 29, 2024 at 12:09:50PM -0800, Luis Chamberlain wrote: > >>> On Thu, Dec 21, 2023 at 10:02:46AM +0100, Christophe Leroy wrote: > >>>>

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-31 Thread Luis Chamberlain
On Wed, Jan 31, 2024 at 06:53:13AM +, Christophe Leroy wrote: > The problem being identified in commit 677bfb9db8a3 ("module: Don't > ignore errors from set_memory_XX()"), you can keep/re-apply the series > [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time. Sure, queu

[PATCH 1/2] ppc: simplify one-level sysctl registration for powersave_nap_ctl_table

2023-03-10 Thread Luis Chamberlain
There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain --- arch/powerpc/kernel/idle.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions

[PATCH 2/2] ppc: simplify one-level sysctl registration for nmi_wd_lpm_factor_ctl_table

2023-03-10 Thread Luis Chamberlain
There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain --- arch/powerpc/platforms/pseries/mobility.c | 10 +- 1 file changed, 1 insertion

[PATCH 0/2] ppc: simplify sysctl registration

2023-03-10 Thread Luis Chamberlain
We can simplify the way we do sysctl registration both by reducing the number of lines and also avoiding calllers which could do recursion. The docs are being updated to help reflect this better [0]. [0] https://lore.kernel.org/all/20230310223947.3917711-1-mcg...@kernel.org/T/#u Luis

Re: [PATCH] driver core: class: mark the struct class for sysfs callbacks as constant

2023-03-27 Thread Luis Chamberlain
Greg Kroah-Hartman Reviewed-by: Luis Chamberlain Luis

Re: [PATCH v4 05/15] mm: introduce execmem_alloc() and execmem_free()

2024-04-11 Thread Luis Chamberlain
On Thu, Apr 11, 2024 at 07:00:41PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > module_alloc() is used everywhere as a mean to allocate memory for code. > > Beside being semantically wrong, this unnecessarily ties all subsystems > that need to allocate code, such as ftrace, kpro

Re: [PATCH v4 00/15] mm: jit/text allocator

2024-04-11 Thread Luis Chamberlain
On Thu, Apr 11, 2024 at 07:00:36PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Hi, > > Since v3 I looked into making execmem more of an utility toolbox, as we > discussed at LPC with Mark Rutland, but it was getting more hairier than > having a struct describing architecture co

Re: [PATCH v3 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers

2024-04-23 Thread Luis Chamberlain
onst-sysctl-v2-0-7a5060b11...@weissschuh.net/ > > Signed-off-by: Thomas Weißschuh Cover letters don't need SOBS we only use them for patches. But anyway: Reviewed-by: Luis Chamberlain Luis

Re: [PATCH v5 00/15] mm: jit/text allocator

2024-04-23 Thread Luis Chamberlain
On Mon, Apr 22, 2024 at 12:44:21PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > (something went wrong with the prevois posting, sorry for the noise) > > Hi, > > Since v3 I looked into making execmem more of an utility toolbox, as we > discussed at LPC with Mark Rutland, but it

Re: [PATCH v6 00/16] mm: jit/text allocator

2024-04-26 Thread Luis Chamberlain
On Fri, Apr 26, 2024 at 11:28:38AM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Hi, > > The patches are also available in git: > https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/log/?h=execmem/v6 > > v6 changes: > * restore patch "arm64: extend execmem_info for ge

Re: [PATCH v7 00/16] mm: jit/text allocator

2024-04-29 Thread Luis Chamberlain
On Mon, Apr 29, 2024 at 03:16:04PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Hi, > > The patches are also available in git: > https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/log/?h=execmem/v7 > > v7 changes: > * define MODULE_{VADDR,END} for riscv32 to fix the

Re: [PATCH v7 00/16] mm: jit/text allocator

2024-05-02 Thread Luis Chamberlain
On Thu, May 02, 2024 at 11:50:36PM +0100, Liviu Dudau wrote: > On Mon, Apr 29, 2024 at 09:29:20AM -0700, Luis Chamberlain wrote: > > On Mon, Apr 29, 2024 at 03:16:04PM +0300, Mike Rapoport wrote: > > > From: "Mike Rapoport (IBM)" > > > > > > Hi, >

Re: [PATCH RESEND v8 00/16] mm: jit/text allocator

2024-05-05 Thread Luis Chamberlain
On Sun, May 05, 2024 at 07:06:12PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Hi, > > The patches are also available in git: > https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/log/?h=execmem/v8 > > v8: > * fix intialization of default_execmem_info Thanks, appli

Re: [PATCH v5 1/2] module: add module_elf_check_arch for module-specific checks

2022-11-02 Thread Luis Chamberlain
> Add a weak module_elf_check_arch() that defaults to true, and call it > from elf_validity_check(). > > Cc: Michael Ellerman > Signed-off-by: Jessica Yu > [np: added changelog, adjust name, rebase] > Signed-off-by: Nicholas Piggin Acked-by: Luis Chamberlain Luis

Re: [PATCH v5 0/2] powerpc module arch checks

2022-11-02 Thread Luis Chamberlain
On Mon, Oct 31, 2022 at 10:07:31PM +1000, Nicholas Piggin wrote: > Luis if you would be okay for patch 1 to be merged via powerpc or > prefer to take it in the module tree (or maybe you object to the > code in the first place). Looks good to me, and nothing on my radar which would cause a conflict

Re: [PATCH] kallsyms: Fix scheduling with interrupts disabled in self-test

2023-01-12 Thread Luis Chamberlain
On Thu, Jan 12, 2023 at 08:54:26PM +1000, Nicholas Piggin wrote: > kallsyms_on_each* may schedule so must not be called with interrupts > disabled. The iteration function could disable interrupts, but this > also changes lookup_symbol() to match the change to the other timing > code. > > Reported-

Re: [PATCH] kallsyms: Fix scheduling with interrupts disabled in self-test

2023-01-13 Thread Luis Chamberlain
On Fri, Jan 13, 2023 at 09:44:35AM +0100, Petr Mladek wrote: > On Thu 2023-01-12 10:24:43, Luis Chamberlain wrote: > > On Thu, Jan 12, 2023 at 08:54:26PM +1000, Nicholas Piggin wrote: > > > kallsyms_on_each* may schedule so must not be called with interrupts > > > disab

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Luis Chamberlain
On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > diff --git a/include/linux/panic_notifier.h b/include/linux/panic_notifier.h > new file mode 100644 > index ..41e32483d7a7 > --- /dev/null > +++ b/include/linux/panic_notifier.h > @@ -0,0 +1,12 @@ > +/* SPDX-License-Iden

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-07 Thread Luis Chamberlain
On Wed, Apr 07, 2021 at 10:33:44AM +0300, Andy Shevchenko wrote: > On Wed, Apr 7, 2021 at 10:25 AM Luis Chamberlain wrote: > > > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > > > diff --git a/include/linux/panic_notifier.h > > > b/include

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-07 Thread Luis Chamberlain
On Wed, Apr 07, 2021 at 05:59:19PM +0300, Andy Shevchenko wrote: > On Wed, Apr 7, 2021 at 5:30 PM Luis Chamberlain wrote: > > On Wed, Apr 07, 2021 at 10:33:44AM +0300, Andy Shevchenko wrote: > > > On Wed, Apr 7, 2021 at 10:25 AM Luis Chamberlain > > > wrote: > &g

Re: [PATCH v2 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Luis Chamberlain
u > Acked-by: Rasmus Villemoes > Signed-off-by: Andrew Morton Acked-by: Luis Chamberlain Luis

Re: [PATCH v6 0/6] Allocate module text and data separately

2022-03-22 Thread Luis Chamberlain
On Wed, Feb 23, 2022 at 01:02:10PM +0100, Christophe Leroy wrote: > This series applies on top of my series "miscellanuous cleanups" v4. Queued onto modules-testing! BTW I just had to rebase the change with the kdb changes, it was a trivial change. Luis

Re: request_module DoS

2022-05-07 Thread Luis Chamberlain
On Sat, May 07, 2022 at 07:10:23AM +, Christophe Leroy wrote: > > There are some code paths in the kernel where you can reliably > > trigger a request_module of a non-existant module. For example, > > if you attempt to load a non-existent crypto algorithm, or create > > a socket of a non-exist

Re: request_module DoS

2022-05-07 Thread Luis Chamberlain
On Sat, May 07, 2022 at 01:02:20AM -0700, Luis Chamberlain wrote: > You can try to reproduce by using adding a new test type for crypto-aegis256 > on lib/test_kmod.c. These tests however can try something similar but other > modules. > > /tools/testing/selftests/kmod/kmod.sh -

Re: request_module DoS

2022-05-08 Thread Luis Chamberlain
On Sat, May 07, 2022 at 12:14:47PM -0700, Luis Chamberlain wrote: > On Sat, May 07, 2022 at 01:02:20AM -0700, Luis Chamberlain wrote: > > You can try to reproduce by using adding a new test type for crypto-aegis256 > > on lib/test_kmod.c. These tests however can try something si

Re: request_module DoS

2022-05-09 Thread Luis Chamberlain
On Mon, May 09, 2022 at 09:23:39PM +1000, Michael Ellerman wrote: > Herbert Xu writes: > > Hi: > > > > There are some code paths in the kernel where you can reliably > > trigger a request_module of a non-existant module. For example, > > if you attempt to load a non-existent crypto algorithm, or

Re: request_module DoS

2022-05-11 Thread Luis Chamberlain
On Mon, May 09, 2022 at 09:13:03AM -0700, Luis Chamberlain wrote: > On Mon, May 09, 2022 at 09:23:39PM +1000, Michael Ellerman wrote: > > Herbert Xu writes: > > > Hi: > > > > > > There are some code paths in the kernel where you can reliably > > > trig

Re: request_module DoS

2022-05-12 Thread Luis Chamberlain
On Thu, May 12, 2022 at 10:07:26PM +1000, Michael Ellerman wrote: > Michael Ellerman writes: > > Luis Chamberlain writes: > ... > > > >> Can someone try this on ppc64le system? At this point I am not convinced > >> this issue is generic. > > >

Re: [dm-devel] [PATCH 01/26] block: refactor device number setup in __device_add_disk

2021-05-21 Thread Luis Chamberlain
t; + } else { > + err = blk_alloc_ext_minor(); > + if (err < 0) > + goto out_put; > + devt = MKDEV(BLOCK_EXT_MAJOR, err); > + } > pdev->devt = devt; > > /* delay uevent until 'holders' subdir is created */ ... and why we only add this here now. Other than that, this looks like a super nice cleanup! Reviewed-by: Luis Chamberlain Luis

Re: [dm-devel] [PATCH 02/26] block: move the DISK_MAX_PARTS sanity check into __device_add_disk

2021-05-21 Thread Luis Chamberlain
On Fri, May 21, 2021 at 07:50:52AM +0200, Christoph Hellwig wrote: > Keep this together with the first place that actually looks at > ->minors and prepare for not passing a minors argument to > alloc_disk. > > Signed-off-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Luis

Re: [dm-devel] [PATCH 03/26] block: automatically enable GENHD_FL_EXT_DEVT

2021-05-21 Thread Luis Chamberlain
> > Signed-off-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Luis

Re: [dm-devel] [PATCH 04/26] block: add a flag to make put_disk on partially initalized disks safer

2021-05-21 Thread Luis Chamberlain
gt; a lot of drivers did get wrong or still do. > > Signed-off-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Luis

Re: [dm-devel] [PATCH 05/26] block: add blk_alloc_disk and blk_cleanup_disk APIs

2021-05-21 Thread Luis Chamberlain
On Fri, May 21, 2021 at 07:50:55AM +0200, Christoph Hellwig wrote: > Add two new APIs to allocate and free a gendisk including the > request_queue for use with BIO based drivers. This is to avoid > boilerplate code in drivers. > > Signed-off-by: Christoph Hellwig > --- > block/genhd.c |

Re: [PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites

2020-07-07 Thread Luis Chamberlain
On Fri, Jun 26, 2020 at 02:22:11PM -0700, Brendan Higgins wrote: > On Fri, Jun 26, 2020 at 2:20 PM Kees Cook wrote: > > > > On Fri, Jun 26, 2020 at 02:09:06PM -0700, Brendan Higgins wrote: > > > Add a linker section where KUnit can put references to its test suites. > > > This patch is the first s

Re: [PATCH v5 08/12] init: main: add KUnit to kernel init

2020-07-07 Thread Luis Chamberlain
Brendan Higgins > Reviewed-by: Stephen Boyd Other than that: Reviewed-by: Luis Chamberlain Luis

[PATCH 06/10] block/rsxx: add error handling support for add_disk()

2021-09-01 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/rsxx/core.c | 4 +++- drivers/block/rsxx/dev.c | 12 +--- 2 files changed, 12 insertions(+), 4

[PATCH 03/10] ps3disk: add error handling support for add_disk()

2021-09-01 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/ps3disk.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/block/ps3disk.c b

[PATCH 10/10] mtd/ubi/block: add error handling support for add_disk()

2021-09-01 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/mtd/ubi/block.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/ubi/block.c b

[PATCH 07/10] block/sunvdc: add error handling support for add_disk()

2021-09-01 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. We re-use the same free tag call, so we also add a label for that as well. Signed-off-by: Luis Chamberlain --- drivers/block/sunvdc.c | 14 +++--- 1 file

[PATCH 05/10] rnbd: add error handling support for add_disk()

2021-09-01 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/rnbd/rnbd-clt.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/block

[PATCH 09/10] pf: add error handling support for add_disk()

2021-09-01 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/paride/pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block/paride/pf.c b

[PATCH 08/10] block/sx8: add error handling support for add_disk()

2021-09-01 Thread Luis Chamberlain
shared cleanup function. The tags are shared and so are hanlded later for the driver already. Signed-off-by: Luis Chamberlain --- drivers/block/sx8.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index 420cd952ddc4

[PATCH 00/10] block: fourth batch of add_disk() error handling conversions

2021-09-01 Thread Luis Chamberlain
The full set of changes can be found on my branch titled 20210901-for-axboe-add-disk-error-handling [0] which is now based on axboe/master. [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20210901-for-axboe-add-disk-error-handling Luis Chamberlain (10

[PATCH 01/10] mtip32xx: add error handling support for add_disk()

2021-09-01 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. The read_capacity_error error label already does what we need, so just re-use that. Signed-off-by: Luis Chamberlain --- drivers/block/mtip32xx/mtip32xx.c | 4

[PATCH 02/10] pktcdvd: add error handling support for add_disk()

2021-09-01 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. The out_mem2 error label already does what we need so re-use that. Signed-off-by: Luis Chamberlain --- drivers/block/pktcdvd.c | 4 +++- 1 file changed, 3

[PATCH 04/10] ps3vram: add error handling support for add_disk()

2021-09-01 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/ps3vram.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/block/ps3vram.c b

[PATCH v2 03/10] ps3disk: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/ps3disk.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/block/ps3disk.c b

[PATCH v2 10/10] mtd/ubi/block: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/mtd/ubi/block.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/ubi/block.c b

[PATCH v2 05/10] rnbd: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Acked-by: Jack Wang Signed-off-by: Luis Chamberlain --- drivers/block/rnbd/rnbd-clt.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff

[PATCH v2 00/10] block: fourth batch of add_disk() error handling conversions

2021-09-27 Thread Luis Chamberlain
this patch set: - rebased onto linux-next tag 20210927 - added the only reviewed-by tag for this series for rnbd Jack Wang [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20210927-for-axboe-add-disk-error-handling Luis Chamberlain (10): mtip32xx: add error

[PATCH v2 06/10] block/rsxx: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/rsxx/core.c | 4 +++- drivers/block/rsxx/dev.c | 12 +--- 2 files changed, 12 insertions(+), 4

[PATCH v2 09/10] pf: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/paride/pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block/paride/pf.c b

[PATCH v2 01/10] mtip32xx: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. The read_capacity_error error label already does what we need, so just re-use that. Signed-off-by: Luis Chamberlain --- drivers/block/mtip32xx/mtip32xx.c | 4

[PATCH v2 04/10] ps3vram: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/ps3vram.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/block/ps3vram.c b

[PATCH v2 07/10] block/sunvdc: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. We re-use the same free tag call, so we also add a label for that as well. Signed-off-by: Luis Chamberlain --- drivers/block/sunvdc.c | 14 +++--- 1 file

[PATCH v2 02/10] pktcdvd: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. The out_mem2 error label already does what we need so re-use that. Signed-off-by: Luis Chamberlain --- drivers/block/pktcdvd.c | 4 +++- 1 file changed, 3

[PATCH v2 08/10] block/sx8: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
shared cleanup function. The tags are shared and so are hanlded later for the driver already. Signed-off-by: Luis Chamberlain --- drivers/block/sx8.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index 420cd952ddc4

[PATCH 12/13] block/sunvdc: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. We re-use the same free tag call, so we also add a label for that as well. Signed-off-by: Luis Chamberlain --- drivers/block/sunvdc.c | 14 +++--- 1 file

[PATCH 04/13] nvdimm/btt: use goto error labels on btt_blk_init()

2021-10-15 Thread Luis Chamberlain
This will make it easier to share common error paths. Signed-off-by: Luis Chamberlain --- drivers/nvdimm/btt.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 29cc7325e890..23ee8c005db5 100644 --- a

[PATCH 01/13] block/brd: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/brd.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/block/brd.c b/drivers

[PATCH 07/13] nvdimm/blk: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
not be called unless the disk was already added via add_disk(). The probably of that issue happening is low though, like OOM while calling devm_add_action(), so the fix is minor. We manually unwind in case of add_disk() failure prior to the devm registration. Signed-off-by: Luis Chamberlain

[PATCH 00/13] block: add_disk() error handling stragglers

2021-10-15 Thread Luis Chamberlain
or if you want Jens to take it, that'd be great too. Luis Chamberlain (13): block/brd: add error handling support for add_disk() nvme-multipath: add error handling support for add_disk() nvdimm/btt: do not call del_gendisk() if not needed nvdimm/btt: use goto error labels on btt_blk

[PATCH 02/13] nvme-multipath: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
the cleanup is done elsewhere. We take care and use test_and_set_bit() because it is protects against two nvme paths simultaneously calling device_add_disk() on the same namespace head. Signed-off-by: Luis Chamberlain --- drivers/nvme/host/multipath.c | 14 -- 1 file changed, 12

[PATCH 03/13] nvdimm/btt: do not call del_gendisk() if not needed

2021-10-15 Thread Luis Chamberlain
We know we don't need del_gendisk() if we haven't added the disk, so just skip it. This should fix a bug on older kernels, as del_gendisk() became able to deal with disks not added only recently, after the patch titled "block: add flag for add_disk() completion notation".

[PATCH 10/13] ps3disk: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/ps3disk.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/block/ps3disk.c b

[PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-10-15 Thread Luis Chamberlain
uld fix calling del_gendisk() if nd_integrity_init() fails. I only spotted this issue through code inspection. It does not fix any real world bug. Signed-off-by: Luis Chamberlain --- drivers/nvdimm/blk.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH 09/13] z2ram: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Only the disk is cleaned up inside z2ram_register_disk() as the caller deals with the rest. Signed-off-by: Luis Chamberlain --- drivers/block/z2ram.c | 7

[PATCH 13/13] mtd/ubi/block: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/mtd/ubi/block.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/ubi/block.c b

[PATCH 05/13] nvdimm/btt: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/nvdimm/btt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nvdimm/btt.c b/drivers

[PATCH 11/13] ps3vram: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/ps3vram.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/block/ps3vram.c b

[PATCH 08/13] zram: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/zram/zram_drv.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/block/zram

Re: [PATCH 00/13] block: add_disk() error handling stragglers

2021-10-18 Thread Luis Chamberlain
On Sun, Oct 17, 2021 at 08:26:33AM -0700, Geoff Levand wrote: > Hi Luis, > > On 10/15/21 4:52 PM, Luis Chamberlain wrote: > > This patch set consists of al the straggler drivers for which we have > > have no patch reviews done for yet. I'd like to ask for folks to plea

Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-10-19 Thread Luis Chamberlain
On Fri, Oct 15, 2021 at 05:13:48PM -0700, Dan Williams wrote: > On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain wrote: > > > > If nd_integrity_init() fails we'd get del_gendisk() called, > > but that's not correct as we should only call that if we're > >

Re: [PATCH 00/13] block: add_disk() error handling stragglers

2021-10-25 Thread Luis Chamberlain
On Thu, Oct 21, 2021 at 08:10:49PM -0700, Geoff Levand wrote: > Hi Luis, > > On 10/18/21 9:15 AM, Luis Chamberlain wrote: > > On Sun, Oct 17, 2021 at 08:26:33AM -0700, Geoff Levand wrote: > >> Hi Luis, > >> > >> On 10/15/21 4:52 PM, Luis Chamberlain wrot

Re: [PATCH 03/13] nvdimm/btt: do not call del_gendisk() if not needed

2021-11-02 Thread Luis Chamberlain
On Sun, Oct 31, 2021 at 10:47:22AM -0700, Dan Williams wrote: > On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain wrote: > > > > We know we don't need del_gendisk() if we haven't added > > the disk, so just skip it. This should fix a bug on older > > kernels,

Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-11-02 Thread Luis Chamberlain
On Fri, Oct 15, 2021 at 05:13:48PM -0700, Dan Williams wrote: > On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain wrote: > > > > If nd_integrity_init() fails we'd get del_gendisk() called, > > but that's not correct as we should only call that if we're > >

Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-11-03 Thread Luis Chamberlain
On Tue, Nov 02, 2021 at 05:49:12PM -0700, Dan Williams wrote: > On Tue, Nov 2, 2021 at 5:10 PM Luis Chamberlain wrote: > > > > On Fri, Oct 15, 2021 at 05:13:48PM -0700, Dan Williams wrote: > > > On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain > > > wrote: >

Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-11-03 Thread Luis Chamberlain
On Tue, Nov 02, 2021 at 07:28:02PM -0600, Jens Axboe wrote: > On 11/2/21 6:49 PM, Dan Williams wrote: > > On Tue, Nov 2, 2021 at 5:10 PM Luis Chamberlain wrote: > >> > >> On Fri, Oct 15, 2021 at 05:13:48PM -0700, Dan Williams wrote: > >>> On Fri, O

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

2021-11-16 Thread Luis Chamberlain
On Fri, May 29, 2020 at 08:03:02AM -0500, Eric W. Biederman wrote: > 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

[PATCH v2 4/8] ocfs2: simplify subdirectory registration with register_sysctl()

2021-11-23 Thread Luis Chamberlain
2.base; identifier c3.header; fresh identifier E3 = script:python(E2, E1) { make_my_fresh_expression(E2, E1) }; @@ header = -register_sysctl_table(base); +register_sysctl(E3, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- fs/ocfs2/stackglue.c | 25 + 1

[PATCH v2 3/8] macintosh/mac_hid.c: simplify subdirectory registration with register_sysctl()

2021-11-23 Thread Luis Chamberlain
2.base; identifier c3.header; fresh identifier E3 = script:python(E2, E1) { make_my_fresh_expression(E2, E1) }; @@ header = -register_sysctl_table(base); +register_sysctl(E3, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- drivers/macintosh/mac_hid.c | 24 +---

[PATCH v2 7/8] cdrom: simplify subdirectory registration with register_sysctl()

2021-11-23 Thread Luis Chamberlain
2.base; identifier c3.header; fresh identifier E3 = script:python(E2, E1) { make_my_fresh_expression(E2, E1) }; @@ header = -register_sysctl_table(base); +register_sysctl(E3, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- drivers/cdrom/cdrom.c | 23 +--

[PATCH v2 1/8] hpet: simplify subdirectory registration with register_sysctl()

2021-11-23 Thread Luis Chamberlain
E2; identifier c2.base; identifier c3.header; fresh identifier E3 = script:python(E2, E1) { make_my_fresh_expression(E2, E1) }; @@ header = -register_sysctl_table(base); +register_sysctl(E3, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- drivers/char/hpet.c | 22 +-

[PATCH v2 8/8] eventpoll: simplify sysctl declaration with register_sysctl()

2021-11-23 Thread Luis Chamberlain
what sysctl knobs you wish to add for your own piece of code, we just care about the core logic. So move the epoll_table sysctl to fs/eventpoll.c and use use register_sysctl(). Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- fs/eventpoll.c | 10 +- include/linux/p

[PATCH v2 5/8] test_sysctl: simplify subdirectory registration with register_sysctl()

2021-11-23 Thread Luis Chamberlain
E2; identifier c2.base; identifier c3.header; fresh identifier E3 = script:python(E2, E1) { make_my_fresh_expression(E2, E1) }; @@ header = -register_sysctl_table(base); +register_sysctl(E3, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- lib/test_sysctl.c | 22 +-

[PATCH v2 6/8] inotify: simplify subdirectory registration with register_sysctl()

2021-11-23 Thread Luis Chamberlain
utter from kernel/sysctl.c. Signed-off-by: Xiaoming Ni [mcgrof: update commit log to reflect new path we decided to take] Signed-off-by: Luis Chamberlain --- fs/notify/inotify/inotify_user.c | 11 ++- include/linux/inotify.h | 3 --- kernel/sysctl.c

[PATCH v2 0/8] sysctl: second set of kernel/sysctl cleanups

2021-11-23 Thread Luis Chamberlain
ested by Eric W. Biederman I dropped the subdir new call and just used the register_sysctl() by specifying the parent directory. * 0-day cleanups, commit log enhancements * Updated the coccinelle patch with register_sysctl() Luis Chamberlain (6): hpet: simplify subdirectory registration

[PATCH v2 2/8] i915: simplify subdirectory registration with register_sysctl()

2021-11-23 Thread Luis Chamberlain
2.base; identifier c3.header; fresh identifier E3 = script:python(E2, E1) { make_my_fresh_expression(E2, E1) }; @@ header = -register_sysctl_table(base); +register_sysctl(E3, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- drivers/gpu/drm/i915/i915_perf.c | 22 +

  1   2   >