kernel-hardening.lists.openwall.com archive mirror
 help / color / mirror / Atom feed
* Clarification about the series to modernize the tasklet api
@ 2020-07-11 17:42 Oscar Carter
  2020-07-13  9:25 ` Allen
  0 siblings, 1 reply; 18+ messages in thread
From: Oscar Carter @ 2020-07-11 17:42 UTC (permalink / raw)
  To: Kees Cook; +Cc: kernel-hardening, Oscar Carter

Hi Kees,

I'm working to modernize the tasklet api but I don't understand the reply
to the patch 12/16 [1] of the patch series of Romain Perier [2].

If this patch is combined with the first one, and the function prototypes
are not changed accordingly and these functions don't use the from_tasklet()
helper, all the users that use the DECLARE_TASKLET macro don't pass the
correct argument to the .data field.

 #define DECLARE_TASKLET(name, func, data) \
-struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data }
+struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), (TASKLET_FUNC_TYPE)func, (TASKLET_DATA_TYPE)&name }

The data argument is lost.

If this patch is splitted in two, the first part will build correctly since
there are casts protecting the arguments, but it will not run correctly until
we apply the second part.

Is it correct? Or am I wrong?

The only imperative to apply a patch in a series is that it compiles correctly?
And I suppose that the next ones fix this situation.

At this moment I'm very confused. A bit of light about this will help me a lot.
And sorry if this is a trivial question.

[1] https://lore.kernel.org/kernel-hardening/201909301538.CEA6C827@keescook/
[2] https://lore.kernel.org/kernel-hardening/20190929163028.9665-1-romain.perier@gmail.com/

Thanks in advance,
Oscar Carter

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-07-18 12:35 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-11 17:42 Clarification about the series to modernize the tasklet api Oscar Carter
2020-07-13  9:25 ` Allen
2020-07-13 10:24   ` Allen
2020-07-13 16:27     ` Kees Cook
2020-07-14  5:09       ` Allen
2020-07-18 12:34       ` Oscar Carter
2020-07-14  0:02     ` Kees Cook
2020-07-14  5:12       ` Allen
2020-07-14 14:27         ` Allen
2020-07-14 23:20           ` Kees Cook
2020-07-15  7:34             ` Allen
2020-07-15 14:51               ` Allen
2020-07-15 15:14                 ` Kees Cook
2020-07-15 15:21                   ` Allen
2020-07-15 15:29                     ` Kees Cook
2020-07-15 15:33                       ` Allen
2020-07-13 16:16   ` Kees Cook
2020-07-18 12:21     ` Oscar Carter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).