lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161208082529.GA3328@x1>
Date:   Thu, 8 Dec 2016 16:25:29 +0800
From:   Baoquan He <bhe@...hat.com>
To:     Alexnader Kuleshov <kuleshovmail@...il.com>
Cc:     linux-kernel@...r.kernel.org, tglx@...utronix.de, hpa@...or.com,
        mingo@...hat.com, x86@...nel.org, keescook@...omium.org,
        yinghai@...nel.org, bp@...e.de, thgarnie@...gle.com,
        luto@...nel.org, anderson@...hat.com, dyoung@...hat.com,
        xlpang@...hat.com
Subject: Re: [PATCH 2/2] x86/KASLR/64: Determine kernel text mapping size at
 runtime

On 12/08/16 at 02:17pm, Alexnader Kuleshov wrote:
> Hello,
> 
> On 12-08-16, Baoquan He wrote:
> >  #define KERNEL_MAPPING_SIZE_EXT	(1024 * 1024 * 1024)
> > -#if defined(CONFIG_RANDOMIZE_BASE)
> > -#define KERNEL_IMAGE_SIZE	KERNEL_MAPPING_SIZE_EXT
> > -#else
> > -#define KERNEL_IMAGE_SIZE	(512 * 1024 * 1024)
> > -#endif
> > +#define KERNEL_MAPPING_SIZE	kernel_mapping_size

Thanks for telling. I forget testing this case. Checking.

> 
> After applying these patches I'm getting:
> 
>   CC      arch/x86/kernel/setup.o
> In file included from ./arch/x86/include/asm/page_types.h:47:0,
>                  from ./arch/x86/include/asm/page.h:8,
>                  from ./arch/x86/include/asm/thread_info.h:11,
>                  from ./include/linux/thread_info.h:58,
>                  from ./arch/x86/include/asm/preempt.h:6,
>                  from ./include/linux/preempt.h:59,
>                  from ./include/linux/spinlock.h:50,
>                  from ./include/linux/seqlock.h:35,
>                  from ./include/linux/time.h:5,
>                  from ./include/uapi/linux/timex.h:56,
>                  from ./include/linux/timex.h:56,
>                  from ./include/linux/sched.h:19,
>                  from arch/x86/kernel/setup.c:24:
> arch/x86/kernel/setup.c: In function ‘dump_kernel_offset’:
> ./arch/x86/include/asm/page_64_types.h:67:29: error: ‘kernel_mapping_size’ undeclared (first use in this function)
>  #define KERNEL_MAPPING_SIZE kernel_mapping_size
>                              ^
> ./arch/x86/include/asm/pgtable_64_types.h:69:48: note: in expansion of macro ‘KERNEL_MAPPING_SIZE’
>  #define MODULES_VADDR    (__START_KERNEL_map + KERNEL_MAPPING_SIZE)
>                                                 ^~~~~~~~~~~~~~~~~~~
> ./include/linux/printk.h:271:35: note: in expansion of macro ‘MODULES_VADDR’
>   printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
>                                    ^~~~~~~~~~~
> arch/x86/kernel/setup.c:826:3: note: in expansion of macro ‘pr_emerg’
>    pr_emerg("Kernel Offset: 0x%lx from 0x%lx (relocation range: 0x%lx-0x%lx)\n",
>    ^~~~~~~~
> ./arch/x86/include/asm/page_64_types.h:67:29: note: each undeclared identifier is reported only once for each function it appears in
>  #define KERNEL_MAPPING_SIZE kernel_mapping_size
>                              ^
> ./arch/x86/include/asm/pgtable_64_types.h:69:48: note: in expansion of macro ‘KERNEL_MAPPING_SIZE’
>  #define MODULES_VADDR    (__START_KERNEL_map + KERNEL_MAPPING_SIZE)
>                                                 ^~~~~~~~~~~~~~~~~~~
> ./include/linux/printk.h:271:35: note: in expansion of macro ‘MODULES_VADDR’
>   printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
>                                    ^~~~~~~~~~~
> arch/x86/kernel/setup.c:826:3: note: in expansion of macro ‘pr_emerg’
>    pr_emerg("Kernel Offset: 0x%lx from 0x%lx (relocation range: 0x%lx-0x%lx)\n",
>    ^~~~~~~~
> scripts/Makefile.build:293: recipe for target 'arch/x86/kernel/setup.o' failed
> make[2]: *** [arch/x86/kernel/setup.o] Error 1
> scripts/Makefile.build:544: recipe for target 'arch/x86/kernel' failed
> make[1]: *** [arch/x86/kernel] Error 2
> Makefile:988: recipe for target 'arch/x86' failed
> make: *** [arch/x86] Error 2
> 
> here with disabled CONFIG_RANDOMIZE_MEMORY.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ