linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Bohan <mbohan@codeaurora.org>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: MT_HIGH_VECTOR mapping set read-only creating illegal access
Date: Tue, 19 Apr 2011 15:34:47 -0700	[thread overview]
Message-ID: <4DAE0E07.9030806@codeaurora.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1104122308400.28032@xanadu.home>

On 4/12/2011 8:31 PM, Nicolas Pitre wrote:
> On Tue, 12 Apr 2011, Michael Bohan wrote:
> If set_tls() writes to 0xffff0ff0 in your case, then you must have an
> ARM core which is prior ARMv6k.

Actually, no, but for historical reasons we were not using the hwreg TLS 
support for all configurations. Our libc expected the data at this address.

>> Is there a reason this mapping must be read-only?
>
> It is read-only for user space to prevent user space from messing with
> the vector table.
>
> In the kernel, it is read-only _only_ when CONFIG_CPU_USE_DOMAINS is not
> enabled which may happen with ARMv6k and above.  Otherwise, if you are
> pre ARMv6k, you do use domains, and then the vector page is read-write
> for the kernel.

Yes, this seems to be the the key. In previous versions the kernel was 
given this privilege unconditionally in arch/arm/mm/proc-macros.S.

>> Perhaps we could apply write
>> access for these special cases only?
>
> I'd rather suggest you investigate what changes you did to your kernel
> tree that would explain the apparent inconsistency in your kernel
> config.

Yes, the inconsistency was on our end. We will revert all hacks and 
mandate that our libc do things correctly.

Thanks,
Mike

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

  reply	other threads:[~2011-04-19 22:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13  0:42 MT_HIGH_VECTOR mapping set read-only creating illegal access Michael Bohan
2011-04-13  3:31 ` Nicolas Pitre
2011-04-19 22:34   ` Michael Bohan [this message]
2011-04-20  0:21     ` Nicolas Pitre
2011-04-20  1:44       ` Michael Bohan
2011-04-20  3:01         ` Nicolas Pitre
2011-04-20  3:26           ` Colin Cross
2011-04-13  7:26 ` Russell King - ARM Linux

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=4DAE0E07.9030806@codeaurora.org \
    --to=mbohan@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nico@fluxnic.net \
    /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;
as well as URLs for NNTP newsgroup(s).