From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754663AbcBVLhq (ORCPT ); Mon, 22 Feb 2016 06:37:46 -0500 Received: from foss.arm.com ([217.140.101.70]:56062 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752488AbcBVLhp (ORCPT ); Mon, 22 Feb 2016 06:37:45 -0500 Subject: Re: [PATCH 6/6] arm64: compat: Check for AArch32 state To: Will Deacon References: <1453980737-6126-1-git-send-email-suzuki.poulose@arm.com> <1453980737-6126-7-git-send-email-suzuki.poulose@arm.com> <20160209173606.GX22874@arm.com> Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, mark.rutland@arm.com, ynorov@caviumnetworks.com, linux-kernel@vger.kernel.org From: "Suzuki K. Poulose" Message-ID: <56CAF306.1060102@arm.com> Date: Mon, 22 Feb 2016 11:37:42 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20160209173606.GX22874@arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/02/16 17:36, Will Deacon wrote: > On Thu, Jan 28, 2016 at 11:32:17AM +0000, Suzuki K Poulose wrote: >> Make sure we have AArch32 state available for running COMPAT binaries. >> */ >> seq_puts(m, "Features\t:"); >> - if (personality(current->personality) == PER_LINUX32) { >> + if (system_supports_32bit_el0() && >> + personality(current->personality) == PER_LINUX32) { > > Wouldn't it be better to prevent tasks changing to the PER_LINUX32 > personality on systems that don't support AArch32 at EL0? Yes, thats the ideal solution. I took a look at it and it requires us to hook in arm64 wrapper for the personality syscall. I will take a look. Thanks Suzuki