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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 12 Feb 2021 07:55:15 -0800
From:   Jason Gerecke <killertofu@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Jason Baron <jbaron@...mai.com>,
        Jason Gerecke <jason.gerecke@...om.com>,
        Ard Biesheuvel <ardb@...nel.org>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH] RFC: x86/jump_label: Mark arguments as const to satisfy
 asm constraints

On Fri, Feb 12, 2021 at 7:27 AM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Fri, Feb 12, 2021 at 09:40:59AM -0500, Steven Rostedt wrote:
> > On Thu, 11 Feb 2021 13:48:48 -0800
> > Jason Gerecke <killertofu@...il.com> wrote:
> >
> > > When compiling an external kernel module with `-O0` or `-O1`, the following
> > > compile error may be reported:
> > >
> > >     ./arch/x86/include/asm/jump_label.h:25:2: error: impossible constraint in ‘asm’
> > >        25 |  asm_volatile_goto("1:"
> > >           |  ^~~~~~~~~~~~~~~~~
> > >
> > > It appears that these lower optimization levels prevent GCC from detecting
> > > that the key/branch arguments can be treated as constants and used as
> > > immediate operands. To work around this, explicitly add the `const` label.
> >
> > Yes this makes sense. The "i" constraint needs to be a constant.
>
> Right, using -O[01] seems a little daft though. But yeah, that patch is
> correct and won't cause harm.
>
> I've queued it for after the next merge window.

Thanks. Only reason I even tried compiling at those levels was to play
around with GCC's new static analyzer options. They seem to be
ineffective at more normal optimization levels.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ