[Kgdb-bugreport] [PATCH 3/3] tasklet: Introduce new initialization API

2020-07-16 Thread Kees Cook
will be removed as well. (On 64-bit this does not grow the struct size as the new member fills the hole after atomic_t, which is also "int" sized.) Signed-off-by: Romain Perier Co-developed-by: Allen Pais Signed-off-by: Allen Pais Co-developed-by: Kees Cook Signed-off-by: Kees Cook --

[Kgdb-bugreport] [PATCH 1/3] usb: gadget: udc: Avoid tasklet passing a global

2020-07-16 Thread Kees Cook
There's no reason for the tasklet callback to set an argument since it always uses a global. Instead, use the global directly, in preparation for converting the tasklet subsystem to modern callback conventions. Signed-off-by: Kees Cook --- drivers/usb/gadget/udc/snps_udc_core.c | 6 ++--

[Kgdb-bugreport] [PATCH 2/3] treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()

2020-07-16 Thread Kees Cook
This converts all the existing DECLARE_TASKLET() (and ...DISABLED) macros with DECLARE_TASKLET_OLD() in preparation for refactoring the tasklet callback type. All existing DECLARE_TASKLET() users had a "0" data argument, it has been removed here as well. Signed-off-by: Kees Cook --

[Kgdb-bugreport] [PATCH 0/3] Modernize tasklet callback API

2020-07-16 Thread Kees Cook
lable. The entire tree of changes is here[1] currently, but to split it up by maintainer the infrastructure changes need to be landed first. Review and Acks appreciated! :) Thanks, -Kees [1] https://github.com/allenpais/tasklets/commits/tasklets_V2 Kees Cook (2): usb: gadget: udc: Avoid

Re: [Kgdb-bugreport] [PATCH 0/3] Modernize tasklet callback API

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 09:57:18AM +0200, Peter Zijlstra wrote: > On Wed, Jul 15, 2020 at 08:08:44PM -0700, Kees Cook wrote: > > Hi, > > > > This is the infrastructure changes to prepare the tasklet API for > > conversion to passing the tasklet struct as the callback

Re: [Kgdb-bugreport] [PATCH 2/3] treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 12:29:14PM +0100, Matthew Wilcox wrote: > On Wed, Jul 15, 2020 at 08:08:46PM -0700, Kees Cook wrote: > > This converts all the existing DECLARE_TASKLET() (and ...DISABLED) > > macros with DECLARE_TASKLET_OLD() in preparation for refactoring the > >

Re: [Kgdb-bugreport] [PATCH 3/3] tasklet: Introduce new initialization API

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 04:37:04PM +0100, Matthew Wilcox wrote: > On Wed, Jul 15, 2020 at 08:08:47PM -0700, Kees Cook wrote: > > +#define DECLARE_TASKLET(name, _callback) \ > > +struct tasklet_struct name = { \ > > + .

Re: [Kgdb-bugreport] [PATCH 0/3] Modernize tasklet callback API

2020-07-16 Thread Kees Cook
the tasklet is scheduled from an interrupt handler. So > we could get rid of these tasklets by using threaded IRQs. Perhaps I can add a comment above the tasklet API area in interrupt.h? -- Kees Cook ___ Kgdb-bugreport mailing list Kgdb-bu

Re: [Kgdb-bugreport] [PATCH 1/3] usb: gadget: udc: Avoid tasklet passing a global

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 09:28:23AM +0200, Greg Kroah-Hartman wrote: > On Wed, Jul 15, 2020 at 08:08:45PM -0700, Kees Cook wrote: > > There's no reason for the tasklet callback to set an argument since it > > always uses a global. Instead, use the global directly, in preparatio

Re: [Kgdb-bugreport] [PATCH 0/3] Modernize tasklet callback API

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 01:48:20PM -0700, Dmitry Torokhov wrote: > On Thu, Jul 16, 2020 at 12:14 PM Kees Cook wrote: > > > > On Thu, Jul 16, 2020 at 09:57:18AM +0200, Peter Zijlstra wrote: > > > On Wed, Jul 15, 2020 at 08:08:44PM -0700, Kees Cook wrote: > > >

Re: [Kgdb-bugreport] [PATCH 0/3] Modernize tasklet callback API

2020-07-30 Thread Kees Cook
[heavily trimmed CC list because I think lkml is ignoring this thread...] On Thu, Jul 30, 2020 at 09:03:55AM +0200, Thomas Gleixner wrote: > Kees, > > Kees Cook writes: > > This is the infrastructure changes to prepare the tasklet API for > > conversion to passing the

Re: [Kgdb-bugreport] [PATCH 0/3] Modernize tasklet callback API

2020-08-11 Thread Kees Cook
. Here's for the refactoring: https://github.com/KSPP/linux/issues/30 and here's for the removal: https://github.com/KSPP/linux/issues/94 if you can added details/examples of how they should be removed, that'd help other folks too, if they wanted to jump in. :) -Kees -- Kees Cook

Re: [Kgdb-bugreport] [PATCH next v3 12/15] printk: introduce a kmsg_dump iterator

2021-02-25 Thread Kees Cook
ers/hv/vmbus_drv.c | 7 +-- > drivers/mtd/mtdoops.c | 8 +-- > fs/pstore/platform.c | 8 +-- Reviewed-by: Kees Cook # pstore -Kees > include/linux/kmsg_dump.h | 38 --- > kernel/debug/kdb/kd

Re: [Kgdb-bugreport] [PATCH][next] kgdb: Fix fall-through warning for Clang

2021-06-01 Thread Kees Cook
.com/KSPP/linux/issues/115 > Signed-off-by: Gustavo A. R. Silva > --- > JFYI: We had thousands of these sorts of warnings and now we are down > to just 25 in linux-next. This is one of those last remaining > warnings. So close! :) Reviewed-by: Kees Cook -Kees >

Re: [Kgdb-bugreport] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Kees Cook
h treewide.patch $ split-on-maintainer treewide.patch $ ls 0*.patch If you have a build log before the patch that spits out warnings, the --build-log argument can extract those warnings on a per-file basis, too (though this can be fragile). -- Kees Cook ___

Re: [Kgdb-bugreport] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Kees Cook
onally shadows variables. :) Another way to try to catch misused shadow variables is -Wunused-but-set-varible, but it, too, has tons of false positives. I tried to capture some of the rationale and research here: https://github.com/KSPP/linux/issues/152 -- Kees Cook __

Re: [Kgdb-bugreport] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread Kees Cook
le with Coccinelle) and change them into something like kfree_no_null() and redefine kfree() itself: #define kfree_no_null(x) do { void *__ptr = (x); __kfree(__ptr); } while (0) #define kfree(x) do { __kfree(x); x = NULL; } while (0) -- Kees Cook ___

Re: [Kgdb-bugreport] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread Kees Cook
On Wed, Mar 02, 2022 at 12:18:45PM -0800, Linus Torvalds wrote: > On Wed, Mar 2, 2022 at 12:07 PM Kees Cook wrote: > > > > I've long wanted to change kfree() to explicitly set pointers to NULL on > > free. https://github.com/KSPP/linux/issues/87 > > We've ha

Re: [Kgdb-bugreport] [PATCH 0/5] kallsyms: make kallsym APIs more safe with scnprintf

2022-05-23 Thread Kees Cook
e the much better API here. Also with > the amount of arguments and by reference passing it might be worth > to pass them as a structure while you're at it. Yeah, I agree. It really seems like seq_buf would be nicer. -- Kees Cook ___ Kgdb-

Re: [Kgdb-bugreport] [PATCH] kdb: include header in signal handling code

2023-05-17 Thread Kees Cook
kernel/signal.c:4789:6: error: no previous prototype for 'kdb_send_sig' > [-Werror=missing-prototypes] > > Signed-off-by: Arnd Bergmann Reviewed-by: Kees Cook -- Kees Cook ___ Kgdb-bugreport mailing list Kg