Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1332272 > unrolled thread
| Started by | Russell King - ARM Linux <linux@arm.linux.org.uk> |
|---|---|
| First post | 2016-02-11 19:10 +0100 |
| Last post | 2016-02-15 09:50 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2] ARM: mm: mark section-aligned portion of rodata NX Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-02-11 19:10 +0100
Re: [PATCH v2] ARM: mm: mark section-aligned portion of rodata NX Arnd Bergmann <arnd@arndb.de> - 2016-02-12 10:50 +0100
Re: [PATCH v2] ARM: mm: mark section-aligned portion of rodata NX Geert Uytterhoeven <geert@linux-m68k.org> - 2016-02-15 09:50 +0100
| From | Russell King - ARM Linux <linux@arm.linux.org.uk> |
|---|---|
| Date | 2016-02-11 19:10 +0100 |
| Subject | Re: [PATCH v2] ARM: mm: mark section-aligned portion of rodata NX |
| Message-ID | <r13QJ-3XL-9@gated-at.bofh.it> |
On Fri, Jan 22, 2016 at 01:19:03PM -0800, Kees Cook wrote: > On Tue, Dec 8, 2015 at 10:38 AM, Kees Cook <keescook@chromium.org> wrote: > > On Mon, Dec 7, 2015 at 11:47 PM, Ard Biesheuvel > > <ard.biesheuvel@linaro.org> wrote: > >> On 7 December 2015 at 23:35, Kees Cook <keescook@chromium.org> wrote: > >>> /* > >>> + * Without CONFIG_DEBUG_ALIGN_RODATA, __start_rodata_section_aligned will > >>> + * be the first section-aligned location after __start_rodata. Otherwise, > >>> + * it will be equal to __start_rodata. > >>> + */ > >>> +__start_rodata_section_aligned = ALIGN(__start_rodata, 1 << SECTION_SHIFT); ... I'm afraid this causes build errors on two configurations: ./arch/arm/kernel/vmlinux.lds:701: undefined symbol `SECTION_SHIFT' referenced in expression which I think is down to the new __start_rodata_section_aligned line. Olof's builder errored out with this for both allnoconfig and lpc18xx_defconfig builds. Both probably due to CONFIG_MMU being unset, and hence no definition for SECTION_SHIFT. I think you need to make this conditional on CONFIG_MMU. -- RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-02-12 10:50 +0100 |
| Message-ID | <r1iwq-584-25@gated-at.bofh.it> |
| In reply to | #1332272 |
On Thursday 11 February 2016 18:00:32 Russell King - ARM Linux wrote: > On Fri, Jan 22, 2016 at 01:19:03PM -0800, Kees Cook wrote: > > On Tue, Dec 8, 2015 at 10:38 AM, Kees Cook <keescook@chromium.org> wrote: > > > On Mon, Dec 7, 2015 at 11:47 PM, Ard Biesheuvel > > > <ard.biesheuvel@linaro.org> wrote: > > >> On 7 December 2015 at 23:35, Kees Cook <keescook@chromium.org> wrote: > > >>> /* > > >>> + * Without CONFIG_DEBUG_ALIGN_RODATA, __start_rodata_section_aligned will > > >>> + * be the first section-aligned location after __start_rodata. Otherwise, > > >>> + * it will be equal to __start_rodata. > > >>> + */ > > >>> +__start_rodata_section_aligned = ALIGN(__start_rodata, 1 << SECTION_SHIFT); > ... > > I'm afraid this causes build errors on two configurations: > > ./arch/arm/kernel/vmlinux.lds:701: undefined symbol `SECTION_SHIFT' referenced in expression > > which I think is down to the new __start_rodata_section_aligned line. > > Olof's builder errored out with this for both allnoconfig and > lpc18xx_defconfig builds. Both probably due to CONFIG_MMU being > unset, and hence no definition for SECTION_SHIFT. > > I think you need to make this conditional on CONFIG_MMU. I've hit another problem with this patch, when using XIP_KERNEL, I now see arch/arm/mm/built-in.o:(.data+0x4bc): undefined reference to `__start_rodata_section_aligned' in linux-next, apparently because of the combination with "ARM: 8513/1: xip: Move XIP linking to a separate file". Arnd
[toc] | [prev] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2016-02-15 09:50 +0100 |
| Message-ID | <r2n11-6UV-15@gated-at.bofh.it> |
| In reply to | #1332635 |
On Fri, Feb 12, 2016 at 10:45 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Thursday 11 February 2016 18:00:32 Russell King - ARM Linux wrote:
>> On Fri, Jan 22, 2016 at 01:19:03PM -0800, Kees Cook wrote:
>> > On Tue, Dec 8, 2015 at 10:38 AM, Kees Cook <keescook@chromium.org> wrote:
>> > > On Mon, Dec 7, 2015 at 11:47 PM, Ard Biesheuvel
>> > > <ard.biesheuvel@linaro.org> wrote:
>> > >> On 7 December 2015 at 23:35, Kees Cook <keescook@chromium.org> wrote:
>> > >>> /*
>> > >>> + * Without CONFIG_DEBUG_ALIGN_RODATA, __start_rodata_section_aligned will
>> > >>> + * be the first section-aligned location after __start_rodata. Otherwise,
>> > >>> + * it will be equal to __start_rodata.
>> > >>> + */
>> > >>> +__start_rodata_section_aligned = ALIGN(__start_rodata, 1 << SECTION_SHIFT);
>> ...
>>
>> I'm afraid this causes build errors on two configurations:
>>
>> ./arch/arm/kernel/vmlinux.lds:701: undefined symbol `SECTION_SHIFT' referenced in expression
>>
>> which I think is down to the new __start_rodata_section_aligned line.
>>
>> Olof's builder errored out with this for both allnoconfig and
>> lpc18xx_defconfig builds. Both probably due to CONFIG_MMU being
>> unset, and hence no definition for SECTION_SHIFT.
>>
>> I think you need to make this conditional on CONFIG_MMU.
>
> I've hit another problem with this patch, when using XIP_KERNEL, I now see
>
> arch/arm/mm/built-in.o:(.data+0x4bc): undefined reference to `__start_rodata_section_aligned'
>
> in linux-next, apparently because of the combination with "ARM: 8513/1: xip: Move
> XIP linking to a separate file".
Is this due to the copy not taking into account the recent changes to
vmlinux.lds.S?
"git show 538bf4694898b19e" with copy-rename detection shows:
copy from arch/arm/kernel/vmlinux.lds.S
copy to arch/arm/kernel/vmlinux-xip.lds.S
index a6e395c53a48e045..6f59ef290289e078 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux-xip.lds.S
[...]
@@ -117,7 +114,7 @@ SECTIONS
ARM_CPU_KEEP(PROC_INFO)
}
-#ifdef CONFIG_DEBUG_ALIGN_RODATA
+#ifdef CONFIG_DEBUG_RODATA
. = ALIGN(1<<SECTION_SHIFT);
#endif
RO_DATA(PAGE_SIZE)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web