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] [day] [month] [year] [list]
Message-ID: <20201022073816.GQ2628@hirez.programming.kicks-ass.net>
Date:   Thu, 22 Oct 2020 09:38:16 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Jakub Jelinek <jakub@...hat.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        kernel test robot <lkp@...el.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        LKML <linux-kernel@...r.kernel.org>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        LKP <lkp@...ts.01.org>, Kees Cook <keescook@...omium.org>,
        "H.J. Lu" <hjl.tools@...il.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        linux-toolchains@...r.kernel.org,
        Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Subject: Re: GCC section alignment, and GCC-4.9 being a weird one

On Wed, Oct 21, 2020 at 10:42:01AM -0700, Nick Desaulniers wrote:
> On Wed, Oct 21, 2020 at 6:45 AM Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > Ah, thanks!
> >
> > In that case something like the below ought to make it good.
> >
> > I'll go feed it to the robots, see if anything falls over.
> >
> > ---
> >  kernel/sched/deadline.c  | 4 +++-
> >  kernel/sched/fair.c      | 4 +++-
> >  kernel/sched/idle.c      | 4 +++-
> >  kernel/sched/rt.c        | 4 +++-
> >  kernel/sched/sched.h     | 3 +--
> >  kernel/sched/stop_task.c | 3 ++-
> >  6 files changed, 15 insertions(+), 7 deletions(-)
> >
> > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> > index 6d93f4518734..f4855203143d 100644
> > --- a/kernel/sched/deadline.c
> > +++ b/kernel/sched/deadline.c
> > @@ -2504,7 +2504,9 @@ static void prio_changed_dl(struct rq *rq, struct task_struct *p,
> >  }
> >
> >  const struct sched_class dl_sched_class
> > -       __attribute__((section("__dl_sched_class"))) = {
> > +       __attribute__((section("__dl_sched_class")))
> > +       __attribute__((aligned(__alignof__(struct sched_class)))) = {
> 
> If you used some of the macros from
> include/linux/compiler_attributes.h like __section and __aligned, I
> would prefer it.  Please consider spelling out __attribute__(()) an
> antipattern.

Feh, and then suffer more patches because someone doesn't like how
__section uses # :/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ