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: <20161222104046.GI25166@pathway.suse.cz>
Date:   Thu, 22 Dec 2016 11:40:46 +0100
From:   Petr Mladek <pmladek@...e.com>
To:     Valdis Kletnieks <Valdis.Kletnieks@...edu>
Cc:     Jessica Yu <jeyu@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: Patch to include/linux/kernel.h breaks 3rd party modules.

On Wed 2016-12-21 15:42:05, Valdis Kletnieks wrote:
> Yes, I know that usually out-of-tree modules are on their own.
> However, this one may require a rethink..
> 
> (Sorry for not catching this sooner, I hadn't tried to deal with the
> affected module since this patch hit linux-next in next-20161128)
> 
> commit 7fd8329ba502ef76dd91db561c7aed696b2c7720
> Author: Petr Mladek <pmladek@...e.com>
> Date:   Wed Sep 21 13:47:22 2016 +0200
> 
>     taint/module: Clean up global and module taint flags handling
> 
> Contains this chunk:
> 
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -506,6 +506,15 @@ extern enum system_states {
>  #define TAINT_UNSIGNED_MODULE          13
>  #define TAINT_SOFTLOCKUP               14
>  #define TAINT_LIVEPATCH                        15
> +#define TAINT_FLAGS_COUNT              16
> +
> +struct taint_flag {
> +       char true;      /* character printed when tainted */
> +       char false;     /* character printed when not tainted */
> +       bool module;    /* also show as a per-module taint flag */
> +};
> 
> and hilarity ensues when an out-of-tree module has this:
> 
> # ifndef true
> #  define true  (1)
> # endif
> # ifndef false
> #  define false (0)
> # endif
> 
> My proposed fix: change true/false to tainted/untainted.  If this
> is agreeable, I'll code and submit the fix.

Great catch! I did not have a good feeling about the names. But
I did not found this problem and kept them to reduce changes
in the code.

If we change it, I would go even further and make the purpose
clear, e.g. use char_tainted/char_untainted. The names feel
like booleans wihtout the char_ prefix.

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ