All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Laura Abbott <labbott@redhat.com>,
	Kees Cook <keescook@chromium.org>,
	Russell King <linux@arm.linux.org.uk>,
	Arnd Bergmann <arnd@arndb.de>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>,
	kernel-hardening@lists.openwall.com,
	linux-arm-kernel@lists.infradead.org,
	Laura Abbott <labbott@fedoraproject.org>
Subject: [kernel-hardening] Re: [PATCH v2] ARM: mm: flip priority of CONFIG_DEBUG_RODATA
Date: Wed, 23 Dec 2015 16:11:22 -0800	[thread overview]
Message-ID: <20151224001121.GS2793@atomide.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1512231637110.3603@knanqh.ubzr>

* Nicolas Pitre <nicolas.pitre@linaro.org> [151223 13:45]:
> On Wed, 23 Dec 2015, Tony Lindgren wrote:
> 
> > Hi,
> > 
> > * Laura Abbott <labbott@redhat.com> [151223 12:31]:
> > > 
> > > Looks like a case similar to Geert's
> > > 
> > >         adr     r7, kick_counter
> > > wait_dll_lock_timed:
> > >         ldr     r4, wait_dll_lock_counter
> > >         add     r4, r4, #1
> > >         str     r4, [r7, #wait_dll_lock_counter - kick_counter]
> > >         ldr     r4, sdrc_dlla_status
> > >         /* Wait 20uS for lock */
> > >         mov     r6, #8
> > > 
> > > 
> > > kick_counter and wait_dll_lock_counter are in the text section which is marked read only.
> > > They need to be moved to the data section along with a few other variables from what I
> > > can tell (maybe those are read only?).
> > 
> > Thanks for looking, yeah so it seem.
> > 
> > > I suspect this is going to be a common issue with suspend/resume code paths since those
> > > are hand written assembly.
> > 
> > Yes I suspect we have quite a few cases like this.
> 
> We fixed a bunch of similar issues where code was located in the .data 
> section for ease of use from assembly code.  See commit b4e61537 and 
> d0776aff for example.

Thanks hey some assembly fun for the holidays :) I also need to check what
all gets relocated to SRAM here.

In any case, seems like the $subject patch is too intrusive for v4.5 at
this point.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: mm: flip priority of CONFIG_DEBUG_RODATA
Date: Wed, 23 Dec 2015 16:11:22 -0800	[thread overview]
Message-ID: <20151224001121.GS2793@atomide.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1512231637110.3603@knanqh.ubzr>

* Nicolas Pitre <nicolas.pitre@linaro.org> [151223 13:45]:
> On Wed, 23 Dec 2015, Tony Lindgren wrote:
> 
> > Hi,
> > 
> > * Laura Abbott <labbott@redhat.com> [151223 12:31]:
> > > 
> > > Looks like a case similar to Geert's
> > > 
> > >         adr     r7, kick_counter
> > > wait_dll_lock_timed:
> > >         ldr     r4, wait_dll_lock_counter
> > >         add     r4, r4, #1
> > >         str     r4, [r7, #wait_dll_lock_counter - kick_counter]
> > >         ldr     r4, sdrc_dlla_status
> > >         /* Wait 20uS for lock */
> > >         mov     r6, #8
> > > 
> > > 
> > > kick_counter and wait_dll_lock_counter are in the text section which is marked read only.
> > > They need to be moved to the data section along with a few other variables from what I
> > > can tell (maybe those are read only?).
> > 
> > Thanks for looking, yeah so it seem.
> > 
> > > I suspect this is going to be a common issue with suspend/resume code paths since those
> > > are hand written assembly.
> > 
> > Yes I suspect we have quite a few cases like this.
> 
> We fixed a bunch of similar issues where code was located in the .data 
> section for ease of use from assembly code.  See commit b4e61537 and 
> d0776aff for example.

Thanks hey some assembly fun for the holidays :) I also need to check what
all gets relocated to SRAM here.

In any case, seems like the $subject patch is too intrusive for v4.5 at
this point.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Laura Abbott <labbott@redhat.com>,
	Kees Cook <keescook@chromium.org>,
	Russell King <linux@arm.linux.org.uk>,
	Arnd Bergmann <arnd@arndb.de>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>,
	kernel-hardening@lists.openwall.com,
	linux-arm-kernel@lists.infradead.org,
	Laura Abbott <labbott@fedoraproject.org>
Subject: Re: [PATCH v2] ARM: mm: flip priority of CONFIG_DEBUG_RODATA
Date: Wed, 23 Dec 2015 16:11:22 -0800	[thread overview]
Message-ID: <20151224001121.GS2793@atomide.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1512231637110.3603@knanqh.ubzr>

* Nicolas Pitre <nicolas.pitre@linaro.org> [151223 13:45]:
> On Wed, 23 Dec 2015, Tony Lindgren wrote:
> 
> > Hi,
> > 
> > * Laura Abbott <labbott@redhat.com> [151223 12:31]:
> > > 
> > > Looks like a case similar to Geert's
> > > 
> > >         adr     r7, kick_counter
> > > wait_dll_lock_timed:
> > >         ldr     r4, wait_dll_lock_counter
> > >         add     r4, r4, #1
> > >         str     r4, [r7, #wait_dll_lock_counter - kick_counter]
> > >         ldr     r4, sdrc_dlla_status
> > >         /* Wait 20uS for lock */
> > >         mov     r6, #8
> > > 
> > > 
> > > kick_counter and wait_dll_lock_counter are in the text section which is marked read only.
> > > They need to be moved to the data section along with a few other variables from what I
> > > can tell (maybe those are read only?).
> > 
> > Thanks for looking, yeah so it seem.
> > 
> > > I suspect this is going to be a common issue with suspend/resume code paths since those
> > > are hand written assembly.
> > 
> > Yes I suspect we have quite a few cases like this.
> 
> We fixed a bunch of similar issues where code was located in the .data 
> section for ease of use from assembly code.  See commit b4e61537 and 
> d0776aff for example.

Thanks hey some assembly fun for the holidays :) I also need to check what
all gets relocated to SRAM here.

In any case, seems like the $subject patch is too intrusive for v4.5 at
this point.

Regards,

Tony

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Laura Abbott <labbott@redhat.com>,
	Kees Cook <keescook@chromium.org>,
	Russell King <linux@arm.linux.org.uk>,
	Arnd Bergmann <arnd@arndb.de>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>,
	kernel-hardening@lists.openwall.com,
	linux-arm-kernel@lists.infradead.org,
	Laura Abbott <labbott@fedoraproject.org>
Subject: Re: [PATCH v2] ARM: mm: flip priority of CONFIG_DEBUG_RODATA
Date: Wed, 23 Dec 2015 16:11:22 -0800	[thread overview]
Message-ID: <20151224001121.GS2793@atomide.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1512231637110.3603@knanqh.ubzr>

* Nicolas Pitre <nicolas.pitre@linaro.org> [151223 13:45]:
> On Wed, 23 Dec 2015, Tony Lindgren wrote:
> 
> > Hi,
> > 
> > * Laura Abbott <labbott@redhat.com> [151223 12:31]:
> > > 
> > > Looks like a case similar to Geert's
> > > 
> > >         adr     r7, kick_counter
> > > wait_dll_lock_timed:
> > >         ldr     r4, wait_dll_lock_counter
> > >         add     r4, r4, #1
> > >         str     r4, [r7, #wait_dll_lock_counter - kick_counter]
> > >         ldr     r4, sdrc_dlla_status
> > >         /* Wait 20uS for lock */
> > >         mov     r6, #8
> > > 
> > > 
> > > kick_counter and wait_dll_lock_counter are in the text section which is marked read only.
> > > They need to be moved to the data section along with a few other variables from what I
> > > can tell (maybe those are read only?).
> > 
> > Thanks for looking, yeah so it seem.
> > 
> > > I suspect this is going to be a common issue with suspend/resume code paths since those
> > > are hand written assembly.
> > 
> > Yes I suspect we have quite a few cases like this.
> 
> We fixed a bunch of similar issues where code was located in the .data 
> section for ease of use from assembly code.  See commit b4e61537 and 
> d0776aff for example.

Thanks hey some assembly fun for the holidays :) I also need to check what
all gets relocated to SRAM here.

In any case, seems like the $subject patch is too intrusive for v4.5 at
this point.

Regards,

Tony

  reply	other threads:[~2015-12-24  0:11 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 20:27 [kernel-hardening] [PATCH v2] ARM: mm: flip priority of CONFIG_DEBUG_RODATA Kees Cook
2015-12-02 20:27 ` Kees Cook
2015-12-02 20:27 ` Kees Cook
2015-12-03  0:05 ` [kernel-hardening] " Laura Abbott
2015-12-03  0:05   ` Laura Abbott
2015-12-03  0:05   ` Laura Abbott
2015-12-03  0:05   ` Laura Abbott
2015-12-22 10:37 ` [kernel-hardening] " Geert Uytterhoeven
2015-12-22 10:37   ` Geert Uytterhoeven
2015-12-22 10:37   ` Geert Uytterhoeven
2015-12-22 10:37   ` Geert Uytterhoeven
2015-12-22 10:37   ` Geert Uytterhoeven
2015-12-23  0:36   ` [kernel-hardening] " Laura Abbott
2015-12-23  0:36     ` Laura Abbott
2015-12-23  0:36     ` Laura Abbott
2015-12-23  0:36     ` Laura Abbott
2015-12-23  0:36     ` Laura Abbott
2015-12-23 19:51 ` [kernel-hardening] " Tony Lindgren
2015-12-23 19:51   ` Tony Lindgren
2015-12-23 19:51   ` Tony Lindgren
2015-12-23 19:51   ` Tony Lindgren
2015-12-23 20:01   ` [kernel-hardening] " Russell King - ARM Linux
2015-12-23 20:01     ` Russell King - ARM Linux
2015-12-23 20:01     ` Russell King - ARM Linux
2015-12-23 20:01     ` Russell King - ARM Linux
2015-12-23 20:18     ` [kernel-hardening] " Tony Lindgren
2015-12-23 20:18       ` Tony Lindgren
2015-12-23 20:18       ` Tony Lindgren
2015-12-23 20:18       ` Tony Lindgren
2015-12-23 20:31   ` [kernel-hardening] " Laura Abbott
2015-12-23 20:31     ` Laura Abbott
2015-12-23 20:31     ` Laura Abbott
2015-12-23 20:31     ` Laura Abbott
2015-12-23 21:29     ` [kernel-hardening] " Tony Lindgren
2015-12-23 21:29       ` Tony Lindgren
2015-12-23 21:29       ` Tony Lindgren
2015-12-23 21:29       ` Tony Lindgren
2015-12-23 21:45       ` [kernel-hardening] " Nicolas Pitre
2015-12-23 21:45         ` Nicolas Pitre
2015-12-23 21:45         ` Nicolas Pitre
2015-12-23 21:45         ` Nicolas Pitre
2015-12-24  0:11         ` Tony Lindgren [this message]
2015-12-24  0:11           ` Tony Lindgren
2015-12-24  0:11           ` Tony Lindgren
2015-12-24  0:11           ` Tony Lindgren
2015-12-24  0:34           ` [kernel-hardening] " Russell King - ARM Linux
2015-12-24  0:34             ` Russell King - ARM Linux
2015-12-24  0:34             ` Russell King - ARM Linux
2015-12-24  0:34             ` Russell King - ARM Linux
2016-01-04 20:34             ` [kernel-hardening] " Kees Cook
2016-01-04 20:34               ` Kees Cook
2016-01-04 20:34               ` Kees Cook
2016-01-04 20:34               ` Kees Cook
2016-01-04 22:07               ` [kernel-hardening] " Russell King - ARM Linux
2016-01-04 22:07                 ` Russell King - ARM Linux
2016-01-04 22:07                 ` Russell King - ARM Linux
2016-01-04 22:07                 ` Russell King - ARM Linux
2016-02-05 21:48                 ` [kernel-hardening] " Kees Cook
2016-02-05 21:48                   ` Kees Cook
2016-02-05 21:48                   ` Kees Cook
2016-02-05 21:48                   ` Kees Cook
2015-12-23 20:15 ` [kernel-hardening] " Russell King - ARM Linux
2015-12-23 20:15   ` Russell King - ARM Linux
2015-12-23 20:15   ` Russell King - ARM Linux
2015-12-23 20:15   ` Russell King - ARM Linux
2015-12-23 21:26   ` [kernel-hardening] " Laura Abbott
2015-12-23 21:26     ` Laura Abbott
2015-12-23 21:26     ` Laura Abbott
2015-12-23 21:26     ` Laura Abbott

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=20151224001121.GS2793@atomide.com \
    --to=tony@atomide.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=labbott@fedoraproject.org \
    --cc=labbott@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nicolas.pitre@linaro.org \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.