Re: [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 = { \ > > + .count = ATOMIC_INIT(0),

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

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

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

2020-07-16 Thread Greg Kroah-Hartman
On Wed, Jul 15, 2020 at 08:08:47PM -0700, Kees Cook wrote: > From: Romain Perier > > Nowadays, modern kernel subsystems that use callbacks pass the data > structure associated with a given callback as argument to the callback. > The tasklet subsystem remains one which passes an arbitrary

[PATCH 3/3] tasklet: Introduce new initialization API

2020-07-15 Thread Kees Cook
From: Romain Perier Nowadays, modern kernel subsystems that use callbacks pass the data structure associated with a given callback as argument to the callback. The tasklet subsystem remains one which passes an arbitrary unsigned long to the callback function. This has several problems: - This