From: Peter Zijlstra <peterz@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>,
Guenter Roeck <linux@roeck-us.net>,
Eric Biggers <ebiggers@kernel.org>, x86 <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [tip: sched/urgent] sched: Fix RANDSTRUCT build fail
Date: Mon, 22 Jun 2020 10:16:35 +0200 [thread overview]
Message-ID: <20200622081635.GC577403@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20200622081027.GM576888@hirez.programming.kicks-ass.net>
On Mon, Jun 22, 2020 at 10:10:27AM +0200, Peter Zijlstra wrote:
> Instead of relying on BUG_ON() to ensure the various data structures
> line up, use a bunch of horrible unions.
> struct irq_work {
> + union {
> + struct __call_single_node node;
> + struct {
> + struct llist_node llnode;
> + atomic_t flags;
> + };
> + };
> void (*func)(struct irq_work *);
> };
> struct __call_single_data {
> + union {
> + struct __call_single_node node;
> + struct {
> + struct llist_node llist;
> + unsigned int flags;
> + };
> + };
> smp_call_func_t func;
> void *info;
> };
FWIW, I have 2 further patches, one for each of these structures to get
rid of the horrible union. They are somewhat larger and I was planning
to hold on to them for next round, but if you want them now, I can
certainly do that.
next prev parent reply other threads:[~2020-06-22 8:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 10:34 [tip: sched/urgent] sched: Fix RANDSTRUCT build fail tip-bot2 for Peter Zijlstra
2020-06-20 3:13 ` Kees Cook
2020-06-20 16:32 ` Linus Torvalds
2020-06-22 8:10 ` Peter Zijlstra
2020-06-22 8:16 ` Peter Zijlstra [this message]
2020-06-22 8:18 ` Peter Zijlstra
2020-06-22 14:36 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200622081635.GC577403@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ebiggers@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mingo@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox