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

rtc problems with grsecurity patch on hppa



hi,

first of all, thanks for the reactivation.

your patch merges cleanly into a 2.4.20 vanilla and i started to look
forward how far we can get this time.

but then, the first error...

in your config script, you set CONFIG_RTC, which is reserved for the real time clock...

your Config.in says:

./grsecurity/Config.in:  define_bool CONFIG_RTC y

taking a look at this one:
if [ "$CONFIG_GRKERNSEC_IO" = "y" ]; then
  define_bool CONFIG_RTC y
fi

so, i guess, GRKERNSEC_IO needs access to RTC components.

but this is a show stopper on our architecture because the enhanced realtime clock code does (in my experience) not compile on a typical parisc box and all my kernels run without it ;-)
if i remember correctly, something like a PC rtc cannot be accessed in parisc workstations...

so my question is: why do you need the RTC code, can we go without it?

to make it clear, here is the fail log:
stingray:/usr/src/linux-2.4.20# grep -A 2 -B 2 CONFIG_RTC .config
# CONFIG_AMD_PM768 is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
--
CONFIG_GRKERNSEC_KMEM=y
CONFIG_GRKERNSEC_IO=y
CONFIG_RTC=y
CONFIG_GRKERNSEC_PROC_MEMMAP=y

stingray:/usr/src/linux-2.4.20# make dep && make clean && make modules
&& make bzImage

... lots of gcc warnings and compiles rushing through the xterm ...

gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -D__linux__ -pipe -fno-strength-reduce -mno-space-regs -mfast-indirect-calls -mdisable-fpregs -ffunction-sections -march=1.1 -mschedule=7100LC   -nostdinc -iwithprefix include -DKBUILD_BASENAME=console  -DEXPORT_SYMTAB -c console.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -D__linux__ -pipe -fno-strength-reduce -mno-space-regs -mfast-indirect-calls -mdisable-fpregs -ffunction-sections -march=1.1 -mschedule=7100LC   -nostdinc -iwithprefix include -DKBUILD_BASENAME=selection  -DEXPORT_SYMTAB -c selection.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -D__linux__ -pipe -fno-strength-reduce -mno-space-regs -mfast-indirect-calls -mdisable-fpregs -ffunction-sections -march=1.1 -mschedule=7100LC   -nostdinc -iwithprefix include -DKBUILD_BASENAME=serial  -DEXPORT_SYMTAB -c serial.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -D__linux__ -pipe -fno-strength-reduce -mno-space-regs -mfast-indirect-calls -mdisable-fpregs -ffunction-sections -march=1.1 -mschedule=7100LC   -nostdinc -iwithprefix include -DKBUILD_BASENAME=keyboard  -DEXPORT_SYMTAB -c keyboard.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -D__linux__ -pipe -fno-strength-reduce -mno-space-regs -mfast-indirect-calls -mdisable-fpregs -ffunction-sections -march=1.1 -mschedule=7100LC   -nostdinc -iwithprefix include -DKBUILD_BASENAME=defkeymap  -c -o defkeymap.o defkeymap.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -D__linux__ -pipe -fno-strength-reduce -mno-space-regs -mfast-indirect-calls -mdisable-fpregs -ffunction-sections -march=1.1 -mschedule=7100LC   -nostdinc -iwithprefix include -DKBUILD_BASENAME=hp_psaux  -DEXPORT_SYMTAB -c hp_psaux.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -D__linux__ -pipe -fno-strength-reduce -mno-space-regs -mfast-indirect-calls -mdisable-fpregs -ffunction-sections -march=1.1 -mschedule=7100LC   -nostdinc -iwithprefix include -DKBUILD_BASENAME=hp_keyb  -c -o hp_keyb.o hp_keyb.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -D__linux__ -pipe -fno-strength-reduce -mno-space-regs -mfast-indirect-calls -mdisable-fpregs -ffunction-sections -march=1.1 -mschedule=7100LC   -nostdinc -iwithprefix include -DKBUILD_BASENAME=sysrq  -DEXPORT_SYMTAB -c sysrq.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -D__linux__ -pipe -fno-strength-reduce -mno-space-regs -mfast-indirect-calls -mdisable-fpregs -ffunction-sections -march=1.1 -mschedule=7100LC   -nostdinc -iwithprefix include -DKBUILD_BASENAME=rtc  -c -o rtc.o rtc.c
rtc.c: In function `rtc_ioctl':
rtc.c:396: warning: implicit declaration of function `CMOS_READ'
rtc.c:397: `RTC_ALWAYS_BCD' undeclared (first use in this function)
rtc.c:397: (Each undeclared identifier is reported only once
rtc.c:397: for each function it appears in.)
rtc.c:403: warning: implicit declaration of function `CMOS_WRITE'
rtc.c: In function `rtc_init':
rtc.c:758: warning: implicit declaration of function `RTC_PORT'
rtc.c: In function `get_rtc_time':
rtc.c:1056: `RTC_ALWAYS_BCD' undeclared (first use in this function)
rtc.c: In function `get_rtc_alm_time':
rtc.c:1095: `RTC_ALWAYS_BCD' undeclared (first use in this function)
rtc.c: At top level:
rtc.c:86: warning: `rtc_has_irq' defined but not used
rtc.c:99: warning: `rtc_irq_timer' defined but not used
make[3]: *** [rtc.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.20/drivers/char'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.20/drivers/char'
make[1]: *** [_subdir_char] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20/drivers'
make: *** [_dir_drivers] Error 2



stingray:/usr/src/linux-2.4.20# uname -a
Linux stingray 2.4.19 #1 Tue Nov 26 22:32:56 CET 2002 parisc unknown
stingray:/usr/src/linux-2.4.20# cat /proc/cpuinfo
processor       : 0
cpu family      : PA-RISC 2.0
cpu             : PA8200 (PCX-U+)
cpu MHz         : 200.000000
model           : 9000/782/C200+
model name      : Raven U 200 (9000/780/C200)
...




stingray:/usr/src/linux-2.4.20# head Makefile
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 20
EXTRAVERSION = -grsec



the patches are from: http://www.grsecurity.net/download.php

i will forward this message also to the debian hppa list, maybe they know,
if this code will be supported in the future or if it`s impossible, how
we can make it go without the CONFIG_RTC set to yes...


bye,

Alex
-- 
Nothing so needs reforming as other people's habits.
                -- Mark Twain

pub  1024/05E1A80C 2001/12/16 Alexander Gabert (http://nikita.ath.cx) <pappy@nikita.ath.cx>
          Key fingerprint =  2D 84 B0 CB F5 67 8A 22  8D 37 6E 6B 8A 3B 7F D6  05 E1 A8 0C



Reply to: