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 18:44:46 -0700 Message-ID: <4DAE3A8E.1000903@codeaurora.org> References: <4DA4F170.4020009@codeaurora.org> <4DAE0E07.9030806@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from wolverine02.qualcomm.com ([199.106.114.251]:6634 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751933Ab1DTBoq (ORCPT ); Tue, 19 Apr 2011 21:44:46 -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/19/2011 5:21 PM, Nicolas Pitre wrote: > Are you saying that your user space libc was reading at 0xffff0ff0 > directly? I hope not, because if you did so, you clearly abused the > interface and the contract between user space and the kernel. Here's > what I wrote in the comment right above the related code: > > * These are segment of kernel provided user code reachable from user space > * at a fixed address in kernel memory. This is used to provide user space > * with some operations which require kernel help because of unimplemented > * native feature and/or instructions in many ARM CPUs. The idea is for > * this code to be executed directly in user mode for best efficiency but > * which is too intimate with the kernel counter part to be left to user > * libraries. In fact this code might even differ from one CPU to another > * depending on the available instruction set and restrictions like on > * SMP systems. In other words, the kernel reserves the right to change > * this code as needed without warning. Only the entry points and their > * results are guaranteed to be stable. > > This has been there since April 29th 2005 i.e. 6 years ago. Yes, unfortunately Android appears to do this as an 'optimization' in the case of dynamically linked execs. That is, it skips the helper code all together. Mike -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum