more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patch)

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patch)

Postby x14sg1 » Sat Aug 13, 2011 11:09 pm

Hello,

With the latest patch, I still have two problems:

# make -j 8 -k modules
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CC [M] drivers/staging/ath6kl/os/linux/ar6000_drv.o
drivers/staging/ath6kl/os/linux/ar6000_drv.c: In function 'ar6000_avail_ev':
drivers/staging/ath6kl/os/linux/ar6000_drv.c:1796:9: error: assignment of read-only variable 'ar6000_netdev_ops'
drivers/staging/ath6kl/os/linux/ar6000_drv.c: In function 'register_pal_cb':
drivers/staging/ath6kl/os/linux/ar6000_drv.c:4803:3: error: assignment of read-only variable 'ar6k_pal_config_g'
make[3]: *** [drivers/staging/ath6kl/os/linux/ar6000_drv.o] Error 1
make[3]: Target `__build' not remade because of errors.
make[2]: *** [drivers/staging/ath6kl] Error 2
make[2]: Target `__build' not remade because of errors.
make[1]: *** [drivers/staging] Error 2
make[1]: Target `__build' not remade because of errors.
make: *** [drivers] Error 2
make: Target `modules' not remade because of errors.

Thanks

Tim
x14sg1
 
Posts: 137
Joined: Sun Aug 23, 2009 7:47 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby spender » Sun Aug 14, 2011 12:58 pm

All staging driver errors should be fixed in the latest patch I just uploaded.

-Brad
spender
 
Posts: 2185
Joined: Wed Feb 20, 2002 8:00 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby simonbcn » Sun Aug 14, 2011 6:16 pm

With last patch (grsecurity-2.2.2-2.6.39.4-201108141242.patch) I can't compile the kernel:
Code: Select all
# make
Makefile:648: "WARNING: Appending $KCPPFLAGS (-march=native -mtune=native -O2 -pipe -w -fomit-frame-pointer) from environment to kernel $CPPFLAGS"
Makefile:656: "WARNING: Appending $KCFLAGS (-march=native -mtune=native -O2 -pipe -w -fomit-frame-pointer) from environment to kernel $CFLAGS"
Makefile:648: "WARNING: Appending $KCPPFLAGS (-march=native -mtune=native -O2 -pipe -w -fomit-frame-pointer) from environment to kernel $CPPFLAGS"
Makefile:656: "WARNING: Appending $KCFLAGS (-march=native -mtune=native -O2 -pipe -w -fomit-frame-pointer) from environment to kernel $CFLAGS"
In file included from /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/plugin/include/rtl.h:28:0,
                 from tools/gcc/stackleak_plugin.c:31:
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/plugin/include/real.h:27:18: fatal error: mpfr.h: No such file or directory
compilation terminated.
make[1]: *** [tools/gcc/stackleak_plugin.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [gcc-plugins] Error 2
make: *** Waiting for unfinished jobs....
simonbcn
 
Posts: 30
Joined: Mon Apr 18, 2011 7:23 am

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby x14sg1 » Sun Aug 14, 2011 7:20 pm

That fixed my compile issue but I have another one.

This patch (and at least the previous one) yield these errors when I try to build NVIDIA-Linux-x86-280.13.

The errors are also readonly errors (about 15 lines from the bottom) and didn't happen with grsecurity-2.2.2-2.6.39.3-* and this NVIDIA driver.

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Sun Aug 14 17:13:43 2011
installer version: 280.13

PATH:
/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/li
b/java/bin:/usr/lib/java/jre/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.

option status:
license pre-accepted : true
update : false
force update : false
expert : false
uninstall : false
driver info : false
precompiled interfaces : false
no ncurses color : false
query latest version : false
no questions : true
silent : true
no recursion : false
no backup : false
kernel module only : true
sanity : false
add this kernel : false
no runlevel check : false
no network : true
no ABI note : false
no RPMs : false
no kernel module : false
force SELinux : default
no X server check : true
no cc version check : true
run distro scripts : true
no nouveau check : false
run nvidia-xconfig : false
sigwinch work around : true
force tls : (not specified)
X install prefix : (not specified)
X library install path : (not specified)
X module install path : (not specified)
OpenGL install prefix : (not specified)
OpenGL install libdir : (not specified)
utility install prefix : (not specified)
utility install libdir : (not specified)
installer prefix : (not specified)
doc install prefix : (not specified)
kernel name : 2.6.39.4-grsec-smp
kernel include path : (not specified)
kernel source path : (not specified)
kernel output path : (not specified)
kernel install path : (not specified)
precompiled kernel interfaces path : (not specified)
precompiled kernel interfaces url : (not specified)
proc mount point : /proc
ui : none
tmpdir : /tmp
ftp mirror : ftp://download.nvidia.com
RPM file list : (not specified)
selinux chcon type : (not specified)

Using built-in stream user interface
-> Only installing a kernel module for a non-running kernel; skipping the "is
an X server running?" test.
-> Only installing a kernel module for a non-running kernel; skipping the "is
an NVIDIA kernel module loaded?" test.
-> License accepted by command line option.
-> Installing NVIDIA driver version 280.13.
-> Not probing for precompiled kernel interfaces.
-> Performing CC sanity check with CC="cc".
-> Kernel source path: '/lib/modules/2.6.39.4-grsec-smp/source'
-> Kernel output path: '/lib/modules/2.6.39.4-grsec-smp/build'
-> Performing rivafb check.
-> Performing nvidiafb check.
-> Performing Xen check.
-> Cleaning kernel module build directory.
executing: 'cd ./kernel; make clean'...
-> Building kernel module:
executing: 'cd ./kernel; make module SYSSRC=/lib/modules/2.6.39.4-grsec-smp/
source SYSOUT=/lib/modules/2.6.39.4-grsec-smp/build'...
NVIDIA: calling KBUILD...
make -C /lib/modules/2.6.39.4-grsec-smp/build \
KBUILD_SRC=/slackware/linux-2.6.39.4-grsec-smp \
KBUILD_EXTMOD="/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel" -f /slackwar
e/linux-2.6.39.4-grsec-smp/Makefile \
modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/generated/autoconf.h or include/config/auto.conf are
missing.";\
echo " Run 'make oldconfig && make prepare' on kernel src to fix it.
"; \
echo; \
/bin/false)
mkdir -p /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/.tmp_versions ; rm
-f /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/.tmp_versions/*
make -f /slackware/linux-2.6.39.4-grsec-smp/scripts/Makefile.build obj=/tmp/
selfgz22986/NVIDIA-Linux-x86-280.13/kernel
cc -Wp,-MD,/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/.nv.o.d -nostd
inc -isystem /usr/lib/gcc/i486-slackware-linux/4.5.3/include -I/slackware/li
nux-2.6.39.4-grsec-smp/arch/x86/include -Iinclude -I/slackware/linux-2.6.39
.4-grsec-smp/include -include include/generated/autoconf.h -I/tmp/selfgz22
986/NVIDIA-Linux-x86-280.13/kernel -D__KERNEL__ -Wall -Wundef -Wstrict-proto
types -Wno-trigraphs -W -Wno-unused-parameter -Wno-missing-field-initializer
s -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wn
o-format-security -fno-delete-null-pointer-checks -Wno-empty-body -O2 -fplug
in=/slackware/linux-2.6.39.4-grsec-smp/tools/gcc/constify_plugin.so -m32 -ms
oft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -marc
h=i686 -mtune=pentium3 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=
generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -D
CONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-ta
bles -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-stack-protector -fno-omit-f
rame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -
Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_
HAVE_ASM_GOTO -I/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel -Wall -MD
-Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_V
ERSION_STRING=\"280.13\" -Wno-unused-function -UDEBUG -U_DEBUG -DNDEBUG -DM
ODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)" -D"KBUILD_MO
DNAME=KBUILD_STR(nvidia)" -c -o /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/ker
nel/nv.o /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv.c
In file included from include/linux/kernel.h:17:0,
from include/linux/sched.h:55,
from include/linux/utsname.h:35,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:39,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv.c:1
3:
include/linux/bitops.h: In function 'hweight_long':
include/linux/bitops.h:49:26: warning: signed and unsigned type in condition
al expression
In file included from /slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/a
sm/mmzone.h:2:0,
from include/linux/mmzone.h:792,
from include/linux/topology.h:32,
from include/linux/sched.h:78,
from include/linux/utsname.h:35,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:39,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv.c:1
3:
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/mmzone_32.h: In fun
ction 'pfn_valid':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/mmzone_32.h:87:15:
warning: comparison between signed and unsigned integer expressions
In file included from /slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/a
sm/uaccess.h:633:0,
from include/linux/poll.h:14,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:98,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv.c:1
3:
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h: In fu
nction 'copy_to_user':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:248:6:
warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:250:11
: warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h: In fu
nction 'copy_from_user':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:276:6:
warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:278:11
: warning: comparison between signed and unsigned integer expressions
if [ "-pg" = "-pg" ]; then if [ /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/k
ernel/nv.o != "scripts/mod/empty.o" ]; then /slackware/linux-2.6.39.4-grsec-
smp/scripts/recordmcount "/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv
.o"; fi; fi;
cc -Wp,-MD,/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/.nv-chrdev.o.d
-nostdinc -isystem /usr/lib/gcc/i486-slackware-linux/4.5.3/include -I/slackw
are/linux-2.6.39.4-grsec-smp/arch/x86/include -Iinclude -I/slackware/linux-
2.6.39.4-grsec-smp/include -include include/generated/autoconf.h -I/tmp/se
lfgz22986/NVIDIA-Linux-x86-280.13/kernel -D__KERNEL__ -Wall -Wundef -Wstrict
-prototypes -Wno-trigraphs -W -Wno-unused-parameter -Wno-missing-field-initi
alizers -fno-strict-aliasing -fno-common -Werror-implicit-function-declarati
on -Wno-format-security -fno-delete-null-pointer-checks -Wno-empty-body -O2
-fplugin=/slackware/linux-2.6.39.4-grsec-smp/tools/gcc/constify_plugin.so -m
32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2
-march=i686 -mtune=pentium3 -mtune=generic -maccumulate-outgoing-args -Wa,-m
tune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME
=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwi
nd-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-stack-protector -fno-o
mit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statem
ent -Wno-pointer-sign -fno-stric
t-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -I/tmp/selfgz22986/NVIDIA-L
inux-x86-280.13/kernel -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D
__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"280.13\" -Wno-unused-functi
on -UDEBUG -U_DEBUG -DNDEBUG -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASEN
AME=KBUILD_STR(nv_chrdev)" -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /tmp
/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-chrdev.o /tmp/selfgz22986/NVI
DIA-Linux-x86-280.13/kernel/nv-chrdev.c
In file included from include/linux/kernel.h:17:0,
from include/linux/sched.h:55,
from include/linux/utsname.h:35,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:39,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-chr
dev.c:15:
include/linux/bitops.h: In function 'hweight_long':
include/linux/bitops.h:49:26: warning: signed and unsigned type in condition
al expression
In file included from /slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/a
sm/mmzone.h:2:0,
from include/linux/mmzone.h:792,
from include/linux/topology.h:32,
from include/linux/sched.h:78,
from include/linux/utsname.h:35,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:39,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-chr
dev.c:15:
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/mmzone_32.h: In fun
ction 'pfn_valid':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/mmzone_32.h:87:15:
warning: comparison between signed and unsigned integer expressions
In file included from /slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/a
sm/uaccess.h:633:0,
from include/linux/poll.h:14,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:98,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-chr
dev.c:15:
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h: In fu
nction 'copy_to_user':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:248:6:
warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:250:11
: warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h: In fu
nction 'copy_from_user':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:276:6:
warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:278:11
: warning: comparison between signed and unsigned integer expressions
if [ "-pg" = "-pg" ]; then if [ /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/k
ernel/nv-chrdev.o != "scripts/mod/empty.o" ]; then /slackware/linux-2.6.39.4
-grsec-smp/scripts/recordmcount "/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/ke
rnel/nv-chrdev.o"; fi; fi;
cc -Wp,-MD,/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/.nv-mlock.o.d
-nostdinc -isystem /usr/lib/gcc/i486-slackware-linux/4.5.3/include -I/slackw
are/linux-2.6.39.4-grsec-smp/arch/x86/include -Iinclude -I/slackware/linux-
2.6.39.4-grsec-smp/include -include include/generated/autoconf.h -I/tmp/se
lfgz22986/NVIDIA-Linux-x86-280.13/kernel -D__KERNEL__ -Wall -Wundef -Wstrict
-prototypes -Wno-trigraphs -W -Wno-unused-parameter -Wno-missing-field-initi
alizers -fno-strict-aliasing -fno-common -Werror-implicit-function-declarati
on -Wno-format-security -fno-delete-null-pointer-checks -Wno-empty-body -O2
-fplugin=/slackware/linux-2.6.39.4-grsec-smp/tools/gcc/constify_plugin.so -m
32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2
-march=i686 -mtune=pentium3 -mtune=generic -maccumulate-outgoing-args -Wa,-m
tune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME
=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwi
nd-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-stack-protector -fno-o
mit-frame-pointer -f
no-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sig
n -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -I/tmp/selfgz22
986/NVIDIA-Linux-x86-280.13/kernel -Wall -MD -Wsign-compare -Wno-cast-qual -
Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"280.13\" -Wno-u
nused-function -UDEBUG -U_DEBUG -DNDEBUG -DMODULE -D"KBUILD_STR(s)=#s" -D"
KBUILD_BASENAME=KBUILD_STR(nv_mlock)" -D"KBUILD_MODNAME=KBUILD_STR(nvidia)"
-c -o /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-mlock.o /tmp/selfgz
22986/NVIDIA-Linux-x86-280.13/kernel/nv-mlock.c
In file included from include/linux/kernel.h:17:0,
from include/linux/sched.h:55,
from include/linux/utsname.h:35,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:39,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-mlo
ck.c:15:
include/linux/bitops.h: In function 'hweight_long':
include/linux/bitops.h:49:26: warning: signed and unsigned type in condition
al expression
In file included from /slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/a
sm/mmzone.h:2:0,
from include/linux/mmzone.h:792,
from include/linux/topology.h:32,
from include/linux/sched.h:78,
from include/linux/utsname.h:35,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:39,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-mlo
ck.c:15:
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/mmzone_32.h: In fun
ction 'pfn_valid':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/mmzone_32.h:87:15:
warning: comparison between signed and unsigned integer expressions
In file included from /slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/a
sm/uaccess.h:633:0,
from include/linux/poll.h:14,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:98,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-mlo
ck.c:15:
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h: In fu
nction 'copy_to_user':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:248:6:
warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:250:11
: warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h: In fu
nction 'copy_from_user':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:276:6:
warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:278:11
: warning: comparison between signed and unsigned integer expressions
if [ "-pg" = "-pg" ]; then if [ /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/k
ernel/nv-mlock.o != "scripts/mod/empty.o" ]; then /slackware/linux-2.6.39.4-
grsec-smp/scripts/recordmcount "/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/ker
nel/nv-mlock.o"; fi; fi;
cc -Wp,-MD,/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/.nv-procfs.o.d
-nostdinc -isystem /usr/lib/gcc/i486-slackware-linux/4.5.3/include -I/slackw
are/linux-2.6.39.4-grsec-smp/arch/x86/include -Iinclude -I/slackware/linux-
2.6.39.4-grsec-smp/include -include include/generated/autoconf.h -I/tmp/se
lfgz22986/NVIDIA-Linux-x86-280.13/kernel -D__KERNEL__ -Wall -Wundef -Wstrict
-prototypes -Wno-trigraphs -W -Wno-unused-parameter -Wno-missing-field-initi
alizers -fno-strict-aliasing -fno-common -Werror-implicit-function-declarati
on -Wno-format-security -fno-delete-null-pointer-checks -Wno-empty-body -O2
-fplugin=/slackware/linux-2.6.39.4-grsec-smp/tools/gcc/constify_plugin.so -m
32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2
-march=i686 -mtune=pentium3 -mtune=generic -maccumulate-outgoing-args -Wa,-m
tune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME
=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwi
nd-tables -mno-
sse -mno-mmx -mno-sse2 -mno-3dnow -fno-stack-protector -fno-omit-frame-point
er -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointe
r-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -I/tmp/sel
fgz22986/NVIDIA-Linux-x86-280.13/kernel -Wall -MD -Wsign-compare -Wno-cast-q
ual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"280.13\" -
Wno-unused-function -UDEBUG -U_DEBUG -DNDEBUG -DMODULE -D"KBUILD_STR(s)=#s
" -D"KBUILD_BASENAME=KBUILD_STR(nv_procfs)" -D"KBUILD_MODNAME=KBUILD_STR(nv
idia)" -c -o /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-procfs.o /tm
p/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-procfs.c
In file included from include/linux/kernel.h:17:0,
from include/linux/sched.h:55,
from include/linux/utsname.h:35,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:39,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-pro
cfs.c:15:
include/linux/bitops.h: In function 'hweight_long':
include/linux/bitops.h:49:26: warning: signed and unsigned type in condition
al expression
In file included from /slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/a
sm/mmzone.h:2:0,
from include/linux/mmzone.h:792,
from include/linux/topology.h:32,
from include/linux/sched.h:78,
from include/linux/utsname.h:35,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:39,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-pro
cfs.c:15:
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/mmzone_32.h: In fun
ction 'pfn_valid':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/mmzone_32.h:87:15:
warning: comparison between signed and unsigned integer expressions
In file included from /slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/a
sm/uaccess.h:633:0,
from include/linux/poll.h:14,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-lin
ux.h:98,
from /tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-pro
cfs.c:15:
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h: In fu
nction 'copy_to_user':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:248:6:
warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:250:11
: warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h: In fu
nction 'copy_from_user':
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:276:6:
warning: comparison between signed and unsigned integer expressions
/slackware/linux-2.6.39.4-grsec-smp/arch/x86/include/asm/uaccess_32.h:278:11
: warning: comparison between signed and unsigned integer expressions
/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-procfs.c: In function 'nv
_register_procfs':
/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-procfs.c:710:5: error: as
signment of read-only variable 'nv_procfs_registry_fops'
/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-procfs.c:711:5: error: as
signment of read-only variable 'nv_procfs_registry_fops'
make[4]: *** [/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel/nv-procfs.o] E
rror 1
make[3]: *** [_module_/tmp/selfgz22986/NVIDIA-Linux-x86-280.13/kernel] Error
2
make[2]: *** [sub-make] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [module] Error 1
make: *** [module] Error 2
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed. Please see the file
'/var/log/nvidia-installer.log' for details. You may find suggestions
on fixing installation problems in the README available on the Linux
driver download page at www.nvidia.com.
x14sg1
 
Posts: 137
Joined: Sun Aug 23, 2009 7:47 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby PaX Team » Mon Aug 15, 2011 5:16 am

simonbcn wrote:In file included from /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/plugin/include/rtl.h:28:0,
from tools/gcc/stackleak_plugin.c:31:
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/plugin/include/real.h:27:18: fatal error: mpfr.h: No such file or directory
compilation terminated.
make[1]: *** [tools/gcc/stackleak_plugin.o] Error 1
for gcc plugin support you'll need more packages installed, probably mpfr (or mpfr-dev if it exists) first but if there're more failures afterwards, install others as well and also report this to your distro maintainers so that they can fix up the package dependencies.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby PaX Team » Mon Aug 15, 2011 5:26 am

x14sg1 wrote:This patch (and at least the previous one) yield these errors when I try to build NVIDIA-Linux-x86-280.13.

The errors are also readonly errors (about 15 lines from the bottom) and didn't happen with grsecurity-2.2.2-2.6.39.3-* and this NVIDIA driver.
i uploaded a fix for the nvidia driver into my test dir, can you check it out? it's for 275.19 but it'll probably apply to your version as well.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby simonbcn » Mon Aug 15, 2011 6:58 am

PaX Team wrote:
simonbcn wrote:In file included from /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/plugin/include/rtl.h:28:0,
from tools/gcc/stackleak_plugin.c:31:
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/plugin/include/real.h:27:18: fatal error: mpfr.h: No such file or directory
compilation terminated.
make[1]: *** [tools/gcc/stackleak_plugin.o] Error 1
for gcc plugin support you'll need more packages installed, probably mpfr (or mpfr-dev if it exists) first but if there're more failures afterwards, install others as well and also report this to your distro maintainers so that they can fix up the package dependencies.

But I haven't activated any gcc plugin support. I have compiled my kernel with the same options that previous kernel and grsecurity="medium". Where is that option "gcc plugin support"?
Regards
simonbcn
 
Posts: 30
Joined: Mon Apr 18, 2011 7:23 am

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby PaX Team » Mon Aug 15, 2011 2:16 pm

simonbcn wrote:But I haven't activated any gcc plugin support. I have compiled my kernel with the same options that previous kernel and grsecurity="medium". Where is that option "gcc plugin support"?
Regards
the gcc plugins are used automatically if the host build system supports them (except properly detecting this fact is somewhat challenging for now as it's unexplored territory), so you can't turn it off (well, you can manually patch the main Makefile but i'd rather fix the problem properly, so please be patient while we work this out).
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby simonbcn » Mon Aug 15, 2011 6:37 pm

PaX Team wrote:
simonbcn wrote:But I haven't activated any gcc plugin support. I have compiled my kernel with the same options that previous kernel and grsecurity="medium". Where is that option "gcc plugin support"?
Regards
the gcc plugins are used automatically if the host build system supports them (except properly detecting this fact is somewhat challenging for now as it's unexplored territory), so you can't turn it off (well, you can manually patch the main Makefile but i'd rather fix the problem properly, so please be patient while we work this out).

Well, I've installed libmpc-dev, libmpfr-dev, and gcc-4.5-plugin-dev but:
Code: Select all
# make
Makefile:648: "WARNING: Appending $KCPPFLAGS (-march=native -mtune=native -O2 -pipe -w -fomit-frame-pointer) from environment to kernel $CPPFLAGS"
Makefile:656: "WARNING: Appending $KCFLAGS (-march=native -mtune=native -O2 -pipe -w -fomit-frame-pointer) from environment to kernel $CFLAGS"
scripts/mod/file2alias.c: In function ‘do_usb_entry_multi’:
scripts/mod/file2alias.c:219:29: warning: comparison between signed and unsigned integer expressions
WARNING: modpost: Found 4732 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
init/built-in.o: In function `name_to_dev_t':
(.text+0x4bd): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `mount_block_root':
(.init.text+0xc6a): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `change_floppy':
(.init.text+0xe0a): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `rd_load_image':
(.init.text+0x169a): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `md_setup_drive':
do_mounts_md.c:(.init.text+0x220b): undefined reference to `__stack_chk_fail'
init/built-in.o:initramfs.c:(.init.text+0x2ee1): more undefined references to `__stack_chk_fail' follow
make: *** [.tmp_vmlinux1] Error 1
simonbcn
 
Posts: 30
Joined: Mon Apr 18, 2011 7:23 am

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby x14sg1 » Mon Aug 15, 2011 7:31 pm

Hello,

The patch fixes my const problem but I had to remove the pax calls as they are not defined .

Thanks

Tim
x14sg1
 
Posts: 137
Joined: Sun Aug 23, 2009 7:47 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby x14sg1 » Mon Aug 15, 2011 11:28 pm

Hmm ...

How did you build NVIDIA such that the PAX calls worked?
x14sg1
 
Posts: 137
Joined: Sun Aug 23, 2009 7:47 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby PaX Team » Tue Aug 16, 2011 7:41 am

x14sg1 wrote:The patch fixes my const problem but I had to remove the pax calls as they are not defined .
what errors did you get exactly? the patch worked fine for me (i used gentoo's ebuild system but i doubt it does anything special with kernel module compilation).
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby PaX Team » Tue Aug 16, 2011 7:44 am

simonbcn wrote:
Code: Select all
# make
Makefile:648: "WARNING: Appending $KCPPFLAGS (-march=native -mtune=native -O2 -pipe -w -fomit-frame-pointer) from environment to kernel $CPPFLAGS"
Makefile:656: "WARNING: Appending $KCFLAGS (-march=native -mtune=native -O2 -pipe -w -fomit-frame-pointer) from environment to kernel $CFLAGS"
what are these variables and where do they come from?
Code: Select all
init/built-in.o: In function `name_to_dev_t':
(.text+0x4bd): undefined reference to `__stack_chk_fail'
looks like some object files were compiled with SSP (did you enable it in your config?), try to disable that option and recompile them.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby simonbcn » Tue Aug 16, 2011 12:25 pm

PaX Team wrote:
simonbcn wrote:
Code: Select all
# make
Makefile:648: "WARNING: Appending $KCPPFLAGS (-march=native -mtune=native -O2 -pipe -w -fomit-frame-pointer) from environment to kernel $CPPFLAGS"
Makefile:656: "WARNING: Appending $KCFLAGS (-march=native -mtune=native -O2 -pipe -w -fomit-frame-pointer) from environment to kernel $CFLAGS"
what are these variables and where do they come from?

From my environment. Why?

PaX Team wrote:
Code: Select all
init/built-in.o: In function `name_to_dev_t':
(.text+0x4bd): undefined reference to `__stack_chk_fail'
looks like some object files were compiled with SSP (did you enable it in your config?), try to disable that option and recompile them.

SSP? What is this? "grep SSP .config" shows nothing.
simonbcn
 
Posts: 30
Joined: Mon Apr 18, 2011 7:23 am

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby x14sg1 » Wed Aug 17, 2011 2:12 am

I tried to delete this msg but couldn't - sorry
Last edited by x14sg1 on Wed Aug 17, 2011 2:41 am, edited 1 time in total.
x14sg1
 
Posts: 137
Joined: Sun Aug 23, 2009 7:47 pm

Next

Return to grsecurity support