lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 20 Jun 2020 09:32:26 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Eric Biggers <ebiggers@...nel.org>, x86 <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>
Subject: Re: [tip: sched/urgent] sched: Fix RANDSTRUCT build fail

On Fri, Jun 19, 2020 at 8:14 PM Kees Cook <keescook@...omium.org> wrote:
>
> On Wed, Jun 10, 2020 at 10:34:16AM -0000, tip-bot2 for Peter Zijlstra wrote:
> > The following commit has been merged into the sched/urgent branch of tip:
> >
> > Commit-ID:     bfb9fbe0f7e70ec5c8e51ee55b6968d4dff14456
> > Gitweb:        https://git.kernel.org/tip/bfb9fbe0f7e70ec5c8e51ee55b6968d4dff14456
> > Author:        Peter Zijlstra <peterz@...radead.org>
> > AuthorDate:    Wed, 10 Jun 2020 12:14:09 +02:00
> > Committer:     Peter Zijlstra <peterz@...radead.org>
> > CommitterDate: Wed, 10 Jun 2020 12:30:19 +02:00
> >
> > sched: Fix RANDSTRUCT build fail
> >
> > As a temporary build fix, the proper cleanup needs more work.
> >
> > Reported-by: Guenter Roeck <linux@...ck-us.net>
> > Reported-by: Eric Biggers <ebiggers@...nel.org>
> > Suggested-by: Eric Biggers <ebiggers@...nel.org>
> > Suggested-by: Kees Cook <keescook@...omium.org>
> > Fixes: a148866489fb ("sched: Replace rq::wake_list")
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
>
> Hi, can this please get sent to Linus before -rc2? With a148866489fb in
> -rc1, all the CI with the GCC plugins installed have been failing their
> all*config builds. This entered -next 9 days ago (and fixed the -next
> builds), but Linus's tree is still failing:

Ugh.

I actually think the problem goes deeper than that.

The code expects the list entries to be of type 'call_single_data_t'

Then they damn well should be that type.

Note how "call_single_data_t" also implies certain alignment rules
that the hack in 'struct task_struct' does *not* have, and while that
doesn't matter on x86, it could matter on other architectures.

So no, I don't think Peter's patch is correct. It may make the build
pass, but that "check the offsets between two fields" is not
sufficient.

Now, if we could create a new

   struct __call_single_list_entry {
        struct llist_node llist;
        unsigned int flags;
   } call_single_list_entry_t;

and use that as part of thecall_single_data_t and only use that for
tyhe traversal of the list, then that would avoid the alignment issue
and the waste of space in struct task_struct.

Hmm?

Peter/Ingo?

                 Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ