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]
Date:   Thu, 08 Sep 2016 15:35:04 +0930
From:   Rusty Russell <rusty@...tcorp.com.au>
To:     Jessica Yu <jeyu@...hat.com>, Petr Mladek <pmladek@...e.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Jiri Kosina <jkosina@...e.cz>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: module/taint: Automatically increase the buffer size for new taint flags

Jessica Yu <jeyu@...hat.com> writes:
> I liked the enum idea because we got TAINT_FLAGS_COUNT for free :-)
> however I think we need to switch back to the #defines because of the kbuild
> error.
>
> The "Error: invalid operands...for `<<'" messages are related to the
> __WARN_TAINT() macro (arch/arm64/include/asm/bug.h) which emits some assembly
> that relies on the taint values. We don't have access to the enum values
> in the assembler so we start getting things like:
>
>         .short ((1 << 0) | ((TAINT_WARN) << 8))
>
> where TAINT_WARN should have already been preprocessed, and this is where that
> invalid operand error is coming from.

Yech.  They could use asm-offsets hacks to generate the values, but
I think you're right.

But I want a single table for taint flags anyway.  Let's pull the
one out of panic.c, declare it [TAINT_FLAGS_COUNT] so gcc will warn
if someone adds one and it no longer fits, and use it in module.c.

(Also make it indexed by flag, rather than containing the flag in the
struct).

Thanks,
Rusty.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ