<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>157409</bug_id>
          
          <creation_ts>2006-12-07 01:03 0000</creation_ts>
          <short_desc>hardened-sources-2.6.18-r2 error: &apos;grsec_lock&apos; undeclared when CONFIG_GRKERNSEC_SYSCTL is not set</short_desc>
          <delta_ts>2006-12-17 11:06:58 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>REMIND</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>akborder@gmail.com</reporter>
          <assigned_to>pappy@gentoo.org</assigned_to>
          <cc>atoth@atoth.sote.hu</cc>
    
    <cc>benkoren@gmail.com</cc>
    
    <cc>casta@xwing.info</cc>
    
    <cc>gengor@gentoo.org</cc>
    
    <cc>matteo@fsfe.org</cc>
    
    <cc>phreak@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>akborder@gmail.com</who>
            <bug_when>2006-12-07 01:03:50 0000</bug_when>
            <thetext># 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 &apos;sys_ioperm&apos;:
arch/i386/kernel/ioport.c:71: error: &apos;grsec_lock&apos; 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 &apos;sys_iopl&apos;:
arch/i386/kernel/ioport.c:158: error: &apos;grsec_lock&apos; undeclared (first use in this function)
make[1]: *** [arch/i386/kernel/ioport.o] Error 1
make: *** [arch/i386/kernel] Error 2</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>akborder@gmail.com</who>
            <bug_when>2006-12-07 01:05:46 0000</bug_when>
            <thetext>Created an attachment (id=103523)
Relevant GRSEC options from my .config

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>casta@xwing.info</who>
            <bug_when>2006-12-07 03:36:27 0000</bug_when>
            <thetext>Confirm this error</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pappy@gentoo.org</who>
            <bug_when>2006-12-07 04:26:20 0000</bug_when>
            <thetext>this is mine now.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pappy@gentoo.org</who>
            <bug_when>2006-12-07 04:52:15 0000</bug_when>
            <thetext>  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 &apos;sys_ioperm&apos;:
arch/i386/kernel/ioport.c:71: error: &apos;grsec_lock&apos; 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 &apos;sys_iopl&apos;:
arch/i386/kernel/ioport.c:158: error: &apos;grsec_lock&apos; 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&apos;s a problem with a patch from me.

sorry about that, i will fix that ASAP


Alex</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2006-12-07 17:00:10 0000</bug_when>
            <thetext>*** Bug 157480 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>atoth@atoth.sote.hu</who>
            <bug_when>2006-12-08 08:44:47 0000</bug_when>
            <thetext>Created an attachment (id=103627)
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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>phreak@gentoo.org</who>
            <bug_when>2006-12-10 04:37:23 0000</bug_when>
            <thetext>(In reply to comment #6)
&gt; Created an attachment (id=103627) [edit]
&gt; Adds missing linux/grinternal.h includes
&gt; 
&gt; linux/grinternal.h is required to be included when using grsec_lock.
&gt; Patch adds the necessary header to both files touched by
&gt; 4454_grsec-2.1.9-2.6.18.2-io-kmem-sysctl.patch - without taking into account
&gt; 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.

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>phreak@gentoo.org</who>
            <bug_when>2006-12-10 04:46:14 0000</bug_when>
            <thetext>(In reply to comment #7)
&gt; Thanks to Attila, this should be fixed now. I just commited the changes on this
&gt; bug to subversion, so expect an updated ebuild within the hour.

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

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>phreak@gentoo.org</who>
            <bug_when>2006-12-13 14:11:48 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>matteo@fsfe.org</who>
            <bug_when>2006-12-17 11:06:58 0000</bug_when>
            <thetext>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&apos;:
drivers/char/mem.c:186: error: `grsec_enable_secure_kmem&apos; 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&apos;
drivers/char/mem.c: In function `mmap_mem&apos;:
drivers/char/mem.c:296: error: `grsec_enable_secure_kmem&apos; undeclared (first use in this function)
drivers/char/mem.c:298: warning: implicit declaration of function `gr_handle_mem_mmap&apos;
drivers/char/mem.c: In function `write_kmem&apos;:
drivers/char/mem.c:536: error: `grsec_enable_secure_kmem&apos; undeclared (first use in this function)
drivers/char/mem.c:538: warning: implicit declaration of function `gr_handle_kmem_write&apos;
drivers/char/mem.c: In function `open_port&apos;:
drivers/char/mem.c:850: error: `grsec_enable_secure_kmem&apos; undeclared (first use in this function)
drivers/char/mem.c:852: warning: implicit declaration of function `gr_handle_open_port&apos;
make[2]: *** [drivers/char/mem.o] Error 1
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2
</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>103523</attachid>
            <date>2006-12-07 01:05 0000</date>
            <desc>Relevant GRSEC options from my .config</desc>
            <filename>grsec_options.config</filename>
            <type>text/plain</type>
            <data encoding="base64">Q09ORklHX0dSS0VSTlNFQz15CiMgQ09ORklHX0dSS0VSTlNFQ19MT1cgaXMgbm90IHNldAojIENP
TkZJR19HUktFUk5TRUNfTUVESVVNIGlzIG5vdCBzZXQKIyBDT05GSUdfR1JLRVJOU0VDX0hJR0gg
aXMgbm90IHNldApDT05GSUdfR1JLRVJO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ZJR19HUktFUk5TRUNfRkxPT0RCVVJTVD00Cg==
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>103627</attachid>
            <date>2006-12-08 08:44 0000</date>
            <desc>Adds missing linux/grinternal.h includes</desc>
            <filename>missing-grinternal-includes.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">ZGlmZiAtdXJOIGxpbnV4LTIuNi4xOC1oYXJkZW5lZC1yMi9hcmNoL2kzODYva2VybmVsL2lvcG9y
dC5jIGxpbnV4LTIuNi4xOC1oYXJkZW5lZC1yMi1kd29rZnVyL2FyY2gvaTM4Ni9rZXJuZWwvaW9w
b3J0LmMKLS0tIGxpbnV4LTIuNi4xOC1oYXJkZW5lZC1yMi9hcmNoL2kzODYva2VybmVsL2lvcG9y
dC5jCTIwMDYtMTItMDYgMjM6NTI6NDQuMDAwMDAwMDAwICswMTAwCisrKyBsaW51eC0yLjYuMTgt
aGFyZGVuZWQtcjItZHdva2Z1ci9hcmNoL2kzODYva2VybmVsL2lvcG9ydC5jCTIwMDYtMTItMDgg
MTc6MzM6NTUuMDAwMDAwMDAwICswMTAwCkBAIC0xNyw2ICsxNyw3IEBACiAjaW5jbHVkZSA8bGlu
dXgvc2xhYi5oPgogI2luY2x1ZGUgPGxpbnV4L3RocmVhZF9pbmZvLmg+CiAjaW5jbHVkZSA8bGlu
dXgvZ3JzZWN1cml0eS5oPgorI2luY2x1ZGUgPGxpbnV4L2dyaW50ZXJuYWwuaD4KIAogLyogU2V0
IEVYVEVOVCBiaXRzIHN0YXJ0aW5nIGF0IEJBU0UgaW4gQklUTUFQIHRvIHZhbHVlIFRVUk5fT04u
ICovCiBzdGF0aWMgdm9pZCBzZXRfYml0bWFwKHVuc2lnbmVkIGxvbmcgKmJpdG1hcCwgdW5zaWdu
ZWQgaW50IGJhc2UsIHVuc2lnbmVkIGludCBleHRlbnQsIGludCBuZXdfdmFsdWUpCmRpZmYgLXVy
TiBsaW51eC0yLjYuMT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