From: Al Viro <viro@ZenIV.linux.org.uk>
To: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Cc: Petr Mladek <pmladek@suse.com>, Jessica Yu <jeyu@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: Patch to include/linux/kernel.h breaks 3rd party modules.
Date: Thu, 22 Dec 2016 00:53:25 +0000 [thread overview]
Message-ID: <20161222005325.GD1555@ZenIV.linux.org.uk> (raw)
In-Reply-To: <30992.1482352925@turing-police.cc.vt.edu>
On Wed, Dec 21, 2016 at 03:42:05PM -0500, 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@suse.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.
That certainly makes sense, but this kind of macros really ought to be
killed off. In-tree there are only two such places - arch/powerpc/boot/types.h
(no idea what's the environment there, but seeing that it starts with
#include <stdbool.h>...) and fs/cifs/smbencrypt.c.
BTW, looking at arch/powerpc/boot/types.h... How does it manage to survive,
anyway? gcc stdbool.h has #define bool _Bool, so that typedef int bool; in
there would turn into typedef int _Bool, which should *not* be accepted by
any C compiler. Or does it define __stdcplusplus somehow? Confused...
next prev parent reply other threads:[~2016-12-22 0:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-21 20:42 Patch to include/linux/kernel.h breaks 3rd party modules Valdis Kletnieks
2016-12-21 21:23 ` Jessica Yu
2016-12-22 0:53 ` Al Viro [this message]
2016-12-22 6:29 ` Christoph Hellwig
2016-12-22 10:40 ` Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161222005325.GD1555@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=Valdis.Kletnieks@vt.edu \
--cc=jeyu@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).