Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 157409 - hardened-sources-2.6.18-r2 error: 'grsec_lock' undeclared when CONFIG_GRKERNSEC_SYSCTL is not set
Summary: hardened-sources-2.6.18-r2 error: 'grsec_lock' undeclared when CONFIG_GRKERNS...
Status: RESOLVED REMIND
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alexander Gabert (RETIRED)
URL:
Whiteboard:
Keywords:
: 157480 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-07 01:03 UTC by Anakim Border
Modified: 2006-12-17 11:06 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Relevant GRSEC options from my .config (grsec_options.config,1.71 KB, text/plain)
2006-12-07 01:05 UTC, Anakim Border
Details
Adds missing linux/grinternal.h includes (missing-grinternal-includes.patch,1.06 KB, patch)
2006-12-08 08:44 UTC, Attila Tóth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anakim Border 2006-12-07 01:03:50 UTC
# make
...
  CC      arch/i386/kernel/ptrace.o
  CC      arch/i386/kernel/time.o
  CC      arch/i386/kernel/ioport.o
arch/i386/kernel/ioport.c: In function 'sys_ioperm':
arch/i386/kernel/ioport.c:71: error: 'grsec_lock' undeclared (first use in this function)
arch/i386/kernel/ioport.c:71: error: (Each undeclared identifier is reported only once
arch/i386/kernel/ioport.c:71: error: for each function it appears in.)
arch/i386/kernel/ioport.c: In function 'sys_iopl':
arch/i386/kernel/ioport.c:158: error: 'grsec_lock' undeclared (first use in this function)
make[1]: *** [arch/i386/kernel/ioport.o] Error 1
make: *** [arch/i386/kernel] Error 2
Comment 1 Anakim Border 2006-12-07 01:05:46 UTC
Created attachment 103523 [details]
Relevant GRSEC options from my .config
Comment 2 Guillaume Castagnino 2006-12-07 03:36:27 UTC
Confirm this error
Comment 3 Alexander Gabert (RETIRED) gentoo-dev 2006-12-07 04:26:20 UTC
this is mine now.
Comment 4 Alexander Gabert (RETIRED) gentoo-dev 2006-12-07 04:52:15 UTC
  LD      init/built-in.o
  HOSTCC  usr/gen_init_cpio
  GEN     usr/initramfs_data.cpio.gz
  AS      usr/initramfs_data.o
  LD      usr/built-in.o
  CC      arch/i386/kernel/process.o
  CC      arch/i386/kernel/semaphore.o
  CC      arch/i386/kernel/signal.o
  AS      arch/i386/kernel/entry.o
  CC      arch/i386/kernel/traps.o
  CC      arch/i386/kernel/irq.o
  CC      arch/i386/kernel/ptrace.o
  CC      arch/i386/kernel/time.o
  CC      arch/i386/kernel/ioport.o
arch/i386/kernel/ioport.c: In function 'sys_ioperm':
arch/i386/kernel/ioport.c:71: error: 'grsec_lock' undeclared (first use in this function)
arch/i386/kernel/ioport.c:71: error: (Each undeclared identifier is reported only once
arch/i386/kernel/ioport.c:71: error: for each function it appears in.)
arch/i386/kernel/ioport.c: In function 'sys_iopl':
arch/i386/kernel/ioport.c:158: error: 'grsec_lock' undeclared (first use in this function)
make[1]: *** [arch/i386/kernel/ioport.o] Error 1
make: *** [arch/i386/kernel] Error 2
apocalypse linux-2.6.18-hardened-r2 # 


error confirmed, it's a problem with a patch from me.

sorry about that, i will fix that ASAP


Alex
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-12-07 17:00:10 UTC
*** Bug 157480 has been marked as a duplicate of this bug. ***
Comment 6 Attila Tóth 2006-12-08 08:44:47 UTC
Created attachment 103627 [details, diff]
Adds missing linux/grinternal.h includes

linux/grinternal.h is required to be included when using grsec_lock.
Patch adds the necessary header to both files touched by 4454_grsec-2.1.9-2.6.18.2-io-kmem-sysctl.patch - without taking into account kernel configuration options.
Comment 7 Christian Heim (RETIRED) gentoo-dev 2006-12-10 04:37:23 UTC
(In reply to comment #6)
> Created an attachment (id=103627) [edit]
> Adds missing linux/grinternal.h includes
> 
> linux/grinternal.h is required to be included when using grsec_lock.
> Patch adds the necessary header to both files touched by
> 4454_grsec-2.1.9-2.6.18.2-io-kmem-sysctl.patch - without taking into account
> kernel configuration options.

Thanks to Attila, this should be fixed now. I just commited the changes on this bug to subversion, so expect an updated ebuild within the hour.

Comment 8 Christian Heim (RETIRED) gentoo-dev 2006-12-10 04:46:14 UTC
(In reply to comment #7)
> Thanks to Attila, this should be fixed now. I just commited the changes on this
> bug to subversion, so expect an updated ebuild within the hour.

Or not, looks like I should check stuff before I make such statements.

Comment 9 Christian Heim (RETIRED) gentoo-dev 2006-12-13 14:11:48 UTC
Closing this bug for now, Alexander promised to work on a revised patch once he settles his school related stuff.

Anyway I just commited an updated ebuild, which excludes the patch. That gives you the possibility to merge and compile the package successfully, and gives Alexander the possibility to work on it.
Comment 10 Matteo Spreafico 2006-12-17 11:06:58 UTC
I have similar problem in linux-2.6.19-hardened-r1

  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CHK     include/linux/compile.h
  CC      drivers/char/mem.o
drivers/char/mem.c: In function `write_mem':
drivers/char/mem.c:186: error: `grsec_enable_secure_kmem' undeclared (first use in this function)
drivers/char/mem.c:186: error: (Each undeclared identifier is reported only once
drivers/char/mem.c:186: error: for each function it appears in.)
drivers/char/mem.c:188: warning: implicit declaration of function `gr_handle_mem_write'
drivers/char/mem.c: In function `mmap_mem':
drivers/char/mem.c:296: error: `grsec_enable_secure_kmem' undeclared (first use in this function)
drivers/char/mem.c:298: warning: implicit declaration of function `gr_handle_mem_mmap'
drivers/char/mem.c: In function `write_kmem':
drivers/char/mem.c:536: error: `grsec_enable_secure_kmem' undeclared (first use in this function)
drivers/char/mem.c:538: warning: implicit declaration of function `gr_handle_kmem_write'
drivers/char/mem.c: In function `open_port':
drivers/char/mem.c:850: error: `grsec_enable_secure_kmem' undeclared (first use in this function)
drivers/char/mem.c:852: warning: implicit declaration of function `gr_handle_open_port'
make[2]: *** [drivers/char/mem.o] Error 1
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2