Bug#983436: i386-cpuinfo.h missing in gcc-10-plugin-dev

2022-01-04 Thread Trent W. Buck
This bug means I cannot enable Linux kernel hardening features,
when using Debian 11's gcc and backport kernel.

GCC_PLUGIN_RANDSTRUCT "Randomize layout of sensitive kernel structures"

https://github.com/torvalds/linux/blob/master/scripts/gcc-plugins/Kconfig#L49

GCC_PLUGIN_STACKLEAK "Poison kernel stack before returning from syscalls"

https://github.com/torvalds/linux/blob/master/security/Kconfig.hardening#L152

GCC_PLUGIN_STRUCTLEAK
https://github.com/torvalds/linux/blob/master/security/Kconfig.hardening#L4

The specific kernel I tested was


https://snapshot.debian.org/archive/debian/20211015T150402Z/pool/main/l/linux/linux_5.14.9-2%7Ebpo11%2B1.dsc



Bug#983436: i386-cpuinfo.h missing in gcc-10-plugin-dev

2021-02-23 Thread Boris Kolpackov
Package: gcc-10-plugin-dev
Version: 10.2.1-6

After upgrading from GCC 10.1 to 10.2 I now get the following error
when building a program that relies on the GCC plugin API:

g++-10 -I/tmp/build/odb-2.5.0-b.20.20201208151514.398c7ad035b4 
-I/tmp/build/odb-2.5.0-b.20.20201208151514.398c7ad035b4 
-I/usr/lib/gcc/x86_64-linux-gnu/10/plugin/include -DODB_GXX_NAME="g++-10" 
-DODB_BUILD2 -I/tmp/build/libcutl-1.11.0-b.8.20200801112455.4c8104756b92 
-I/tmp/build/libcutl-1.11.0-b.8.20200801112455.4c8104756b92 -DLIBCUTL_BUILD2 
-DLIBCUTL_SHARED -I/tmp/build/libstudxml-1.1.0-b.9.20210202082911.e729667b0f34 
-I/tmp/build/libstudxml-1.1.0-b.9.20210202082911.e729667b0f34 
-DLIBSTUDXML_SHARED -Wall -Werror -fPIC -std=c++2a -o 
odb-2.5.0-b.20.20201208151514.398c7ad035b4/odb/pragma.so.o -c -x c++ 
/tmp/build/odb-2.5.0-b.20.20201208151514.398c7ad035b4/odb/pragma.cxx

In file included from /usr/lib/gcc/x86_64-linux-gnu/10/plugin/include/tm.h:26,
 from 
/usr/lib/gcc/x86_64-linux-gnu/10/plugin/include/backend.h:28,
 from 
/usr/lib/gcc/x86_64-linux-gnu/10/plugin/include/gcc-plugin.h:30,
 from 
/tmp/build/odb-2.5.0-b.20.20201208151514.398c7ad035b4/odb/gcc.hxx:47,
 from 
/tmp/build/odb-2.5.0-b.20.20201208151514.398c7ad035b4/odb/pragma.cxx:4:
/usr/lib/gcc/x86_64-linux-gnu/10/plugin/include/config/i386/i386.h:2500:10: 
fatal error: common/config/i386/i386-cpuinfo.h: No such file or directory
 2500 | #include "common/config/i386/i386-cpuinfo.h"

I see this has already been fixed in 10.2.1-20 that is currently only
available in experimental. It would be helpful if this fix is
propagated to testing (and to the final stable version) despite the
freeze since currently plugin support is unusable.