2.6.18 (grsec 20060926 1743) compile error

Discuss and suggest new grsecurity features

2.6.18 (grsec 20060926 1743) compile error

Postby Nicon » Wed Sep 27, 2006 5:43 am

Hi!

After applying the 1743 patch on a 2.6.18 I get:

CC init/version.o
LD init/built-in.o
LD vmlinux
arch/i386/mm/built-in.o: In function `boot_ioremap':
: undefined reference to `boot_vaddr_to_pte'
make: *** [vmlinux] Error 1

GCC v4.1.1

For some reason the patch does this:

+++ linux-2.6.18/arch/i386/mm/boot_ioremap.c 2006-09-22 20:45:03.000000000 -0400@@ -7,53 +7,36 @@
...
-#define BOOT_PTE_PTRS (PTRS_PER_PTE*2)
-#define boot_pte_index(address) \
- (((address) >> PAGE_SHIFT) & (BOOT_PTE_PTRS - 1))
-
-static inline boot_pte_t* boot_vaddr_to_pte(void *address)
-{
- boot_pte_t* boot_pg = (boot_pte_t*)pg0;
- return &boot_pg[boot_pte_index((unsigned long)address)];
-}
-

spender? :)
Nicon
 
Posts: 2
Joined: Wed Sep 27, 2006 5:08 am

Re: 2.6.18 (grsec 20060926 1743) compile error

Postby PaX Team » Wed Sep 27, 2006 10:18 am

Nicon wrote:+++ linux-2.6.18/arch/i386/mm/boot_ioremap.c 2006-09-22 20:45:03.000000000 -0400@@ -7,53 +7,36 @@
...
-#define BOOT_PTE_PTRS (PTRS_PER_PTE*2)
-#define boot_pte_index(address) \
- (((address) >> PAGE_SHIFT) & (BOOT_PTE_PTRS - 1))
-
-static inline boot_pte_t* boot_vaddr_to_pte(void *address)
-{
- boot_pte_t* boot_pg = (boot_pte_t*)pg0;
- return &boot_pg[boot_pte_index((unsigned long)address)];
-}
-

spender? :)
that was PaX ;-). are you actually booting with EFI (i'm asking it for another reason, not related to this issue)? disabling EFI or BOOT_IOREMAP would work it around until i fix this.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: 2.6.18 (grsec 20060926 1743) compile error

Postby Nicon » Wed Sep 27, 2006 12:23 pm

PaX Team wrote:
Nicon wrote:+++ linux-2.6.18/arch/i386/mm/boot_ioremap.c 2006-09-22 20:45:03.000000000 -0400@@ -7,53 +7,36 @@
...
-#define BOOT_PTE_PTRS (PTRS_PER_PTE*2)
-#define boot_pte_index(address) \
- (((address) >> PAGE_SHIFT) & (BOOT_PTE_PTRS - 1))
-
-static inline boot_pte_t* boot_vaddr_to_pte(void *address)
-{
- boot_pte_t* boot_pg = (boot_pte_t*)pg0;
- return &boot_pg[boot_pte_index((unsigned long)address)];
-}
-

spender? :)
that was PaX ;-). are you actually booting with EFI (i'm asking it for another reason, not related to this issue)? disabling EFI or BOOT_IOREMAP would work it around until i fix this.


Working as explained above.

No. I don't boot from/with EFI. It's just an option that I (for some odd reason) started to select for my standard kernel run and have been ticking in since as a habit. :) Reading the help page once more I realize I don't need it.

Thanks. Working now.
Nicon
 
Posts: 2
Joined: Wed Sep 27, 2006 5:08 am


Return to grsecurity development