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:   Wed, 10 Jun 2020 11:09:30 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Eric Biggers <ebiggers@...nel.org>, tglx@...utronix.de,
        frederic@...nel.org, linux-kernel@...r.kernel.org, x86@...nel.org,
        cai@....pw, mgorman@...hsingularity.net
Subject: Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

On Tue, Jun 09, 2020 at 04:03:19PM -0700, Guenter Roeck wrote:
> On 6/9/20 3:06 PM, Peter Zijlstra wrote:
> > On Tue, Jun 09, 2020 at 02:38:29PM -0700, Eric Biggers wrote:
> >> Does the struct actually have to be named?  How about:
> >>
> >> diff --git a/include/linux/sched.h b/include/linux/sched.h
> >> index c5d96e3e7fff42..14ca25cda19150 100644
> >> --- a/include/linux/sched.h
> >> +++ b/include/linux/sched.h
> >> @@ -653,8 +653,14 @@ struct task_struct {
> >>  	unsigned int			ptrace;
> >>  
> >>  #ifdef CONFIG_SMP
> >> -	struct llist_node		wake_entry;
> >> -	unsigned int			wake_entry_type;
> >> +	/*
> >> +	 * wake_entry_type must follow wake_entry, even when
> >> +	 * CONFIG_GCC_PLUGIN_RANDSTRUCT=y.
> >> +	 */
> >> +	struct {
> >> +		struct llist_node	wake_entry;
> >> +		unsigned int		wake_entry_type;
> >> +	};
> >>  	int				on_cpu;
> >>  #ifdef CONFIG_THREAD_INFO_IN_TASK
> >>  	/* Current CPU: */
> >>
> >>
> >> However, it would be preferable to not rely on different structs sharing the
> >> same field order, but rather write proper C code that uses the same struct
> >> everywhere to encapsulate these 2 fields...
> > 
> > https://lkml.kernel.org/r/20200605093704.GB2948@hirez.programming.kicks-ass.net
> > 
> > And I have more patches on top to clean up some of the anonymous union
> > stuff, that that's quite a lot of frobbing.
> > 
> 
> That is why I tried to keep it simple as hackish fixup patch.

Fair enough; I'll try and get the above variant merged to address the
build fail. Then I can chase down Paul's bug and finisht the cleanup.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ