Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752886AbcDZJU6 (ORCPT ); Tue, 26 Apr 2016 05:20:58 -0400 Received: from foss.arm.com ([217.140.101.70]:52733 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751834AbcDZJUz (ORCPT ); Tue, 26 Apr 2016 05:20:55 -0400 Subject: Re: [PATCH] arm64: fix /proc/cpuinfo for elf32 To: "Zengtao (B)" , Catalin Marinas References: <1461555453-60440-1-git-send-email-prime.zeng@huawei.com> <20160425091239.GB9614@e104818-lin.cambridge.arm.com> <678F3D1BB717D949B966B68EAEB446ED0A6E6FB7@SZXEMA509-MBX.china.huawei.com> Cc: "will.deacon@arm.com" , "mark.rutland@arm.com" , "yang.shi@linaro.org" , "linux-kernel@vger.kernel.org" , "james.morse@arm.com" , "linux-arm-kernel@lists.infradead.org" From: Suzuki K Poulose Message-ID: <571F32F3.7080005@arm.com> Date: Tue, 26 Apr 2016 10:20:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <678F3D1BB717D949B966B68EAEB446ED0A6E6FB7@SZXEMA509-MBX.china.huawei.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 Content-Length: 509 Lines: 15 On 26/04/16 03:21, Zengtao (B) wrote: > > So you mean the 64-bit grep should see the same cpuinfo as its father process > which is 32-bit? > > For 32-bit process running on 64-bit kernel, we have to explicitly call the personality > syscall to get the right cpuinfo, but how to deal with the old 32-bit binaries? Yes, you could use the syscall to switch the personality. Alternately, you could run "linux32" command to switch the personality to PER_LINUX32 and then execute 64/32 bit applications. Suzuki