From: Baoquan He <bhe@redhat.com>
To: Alexnader Kuleshov <kuleshovmail@gmail.com>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com,
mingo@redhat.com, x86@kernel.org, keescook@chromium.org,
yinghai@kernel.org, bp@suse.de, thgarnie@google.com,
luto@kernel.org, anderson@redhat.com, dyoung@redhat.com,
xlpang@redhat.com
Subject: Re: [PATCH 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime
Date: Thu, 8 Dec 2016 16:25:29 +0800 [thread overview]
Message-ID: <20161208082529.GA3328@x1> (raw)
In-Reply-To: <20161208081750.GA3998@localhost.localdomain>
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.
next prev parent reply other threads:[~2016-12-08 8:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 7:56 [PATCH 0/2] Determine kernel text mapping size at runtime for x86_64 Baoquan He
2016-12-08 7:56 ` [PATCH 1/2] x86/64: Make kernel text mapping always take one whole page table in early boot code Baoquan He
2016-12-08 8:24 ` Alexnader Kuleshov
2016-12-08 8:40 ` Baoquan He
2016-12-08 7:56 ` [PATCH 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime Baoquan He
2016-12-08 8:17 ` Alexnader Kuleshov
2016-12-08 8:25 ` Baoquan He [this message]
2016-12-08 9:41 ` kbuild test robot
2016-12-08 13:41 ` Baoquan He
2016-12-08 9:41 ` kbuild test robot
2016-12-08 18:31 ` [PATCH 0/2] Determine kernel text mapping size at runtime for x86_64 Kees Cook
2016-12-08 19:00 ` Dave Anderson
2016-12-10 1:32 ` Baoquan He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161208082529.GA3328@x1 \
--to=bhe@redhat.com \
--cc=anderson@redhat.com \
--cc=bp@suse.de \
--cc=dyoung@redhat.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=kuleshovmail@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=thgarnie@google.com \
--cc=x86@kernel.org \
--cc=xlpang@redhat.com \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox