From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Bohan Subject: Re: MT_HIGH_VECTOR mapping set read-only creating illegal access Date: Tue, 19 Apr 2011 15:34:47 -0700 Message-ID: <4DAE0E07.9030806@codeaurora.org> References: <4DA4F170.4020009@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:14208 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197Ab1DSWer (ORCPT ); Tue, 19 Apr 2011 18:34:47 -0400 In-Reply-To: Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Nicolas Pitre Cc: Russell King - ARM Linux , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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