[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#865153: reportbug: please include kernel taint flags



On Sun, Jun 17, 2018 at 03:17:38PM -0400, Sandro Tosi wrote:
> On Mon, Jun 19, 2017 at 12:48 PM Adam Borowski <kilobyte@angband.pl> wrote:
> > [Add kernel taint state to reportbug]

> > The state can be read via /proc/sys/kernel/tainted which provides a decimal
> > integer value, with bits meaning the following:
> >
> >        'P',    /* TAINT_PROPRIETARY_MODULE */
> >        'F',    /* TAINT_FORCED_MODULE */
> >        'S',    /* TAINT_CPU_OUT_OF_SPEC */
> > [...]
> 
> this seems to be defined at
> https://github.com/torvalds/linux/blob/master/include/linux/kernel.h#L549
> which saw 2 lines added 2 months ago, and one 7 months ago (ok it's
> not much, as previous changes were 4 years ago, but still since you
> can install a custom kernel in stable, it means reportbug will not be
> able to report correct information). i'm kinda at uneasy to add the
> decoding of the bit string in reportbug if this will change often.

You can show unknown flags as bit numbers, that's somewhat unsightly but
conveys all required information.  I'd say the benefit of showing known
flags (ie, the vast majority of cases) is worth having to update the list
from time to time.
 
> i think it would be ok to have an external tool that could produce the
> tainted information parsing the header files and the tainted file, and
> then include this tool output in reportbug systems information
> section.

If you mean trying to get data from the locally installed kernel, this is
not going to work.  The mapping of bits to letters comes from a file that's
not exported in the headers -- and even if it was, unless you use dkms,
there's little point in installing headers for the exact kernel you have.

If you mean parsing the kernel's source at build time, that would work.
You need actual kernel source rather than just headers, though.

> adding debian-kernel@l.d.o to gather some of their insight on the matter too

I asked on OFTC/#kernelnewbies, was told that manual updates require so
little work that it's a waste to write any complex automated machinery.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ There's an easy way to tell toy operating systems from real ones.
⣾⠁⢰⠒⠀⣿⡁ Just look at how their shipped fonts display U+1F52B, this makes
⢿⡄⠘⠷⠚⠋⠀ the intended audience obvious.  It's also interesting to see OSes
⠈⠳⣄⠀⠀⠀⠀ go back and forth wrt their intended target.


Reply to: