From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD62FC433FF for ; Thu, 8 Aug 2019 11:28:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7ED11217F4 for ; Thu, 8 Aug 2019 11:28:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jjq/4S/0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ED11217F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L4amm5jC1RDbLoZ/lmoKYvxJxoryE9ZUekRNZFuqV+M=; b=jjq/4S/0d2feJC aKwtkG4Bc4AQuw7OjTPuzm9VxBwmOyR7cjPHMJcuDZvo9NtonGMYGRBit97iF1D1L9mIJe5l9gDlU hCs9M5Ygjea9txVti9OnuWe39ICCv1EbYMtY6/SQ6unxhRs4UDheoVi8Kow8uUuzB/aaxcDFG0I46 S8m1d3QC/+JetfkjTm9RCLEGKR3ySiAX3JEmXzSFj47tGXG5IP2GcgORcmOt2LeVsA7V3oCU+ygbY sls81l9KQOlmA7D43XGQN/pu+0Zz3Nk5xzFWGtyPpax8I1y3hXoSpZsVP78R2UtIOUBWFKtb1ChMn R+bZNe342Hioaw0788rQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvgao-0005ff-6w; Thu, 08 Aug 2019 11:28:26 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvgal-0005fB-BK for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2019 11:28:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6F53F28; Thu, 8 Aug 2019 04:28:20 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 880083F694; Thu, 8 Aug 2019 04:28:19 -0700 (PDT) Date: Thu, 8 Aug 2019 12:28:17 +0100 From: Dave Martin To: Stefan Agner Subject: Re: Detecting AArch32 support from a AArch64 process in user space Message-ID: <20190808112817.GH10425@arm.com> References: <20190808093522.GG10425@arm.com> <09a5d28f865ef0bd034ba9acbe1b5334@agner.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <09a5d28f865ef0bd034ba9acbe1b5334@agner.ch> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_042823_436039_8A6DB2E3 X-CRM114-Status: GOOD ( 17.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , ynorov@caviumnetworks.com, will.deacon@arm.com, linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 08, 2019 at 12:30:03PM +0200, Stefan Agner wrote: > On 2019-08-08 11:35, Dave Martin wrote: > > On Thu, Aug 08, 2019 at 09:36:42AM +0200, Stefan Agner wrote: > >> [resend this time with the correct mailing list address] > >> > >> Hello, > >> > >> I am trying to detect whether an ARMv8 system running in AArch64 state > >> supports AArch32 state from a user space process. The arm64_features[] > >> in > > > > Why? Is this just for diagnostic purposes, or some programmatic reason? > > The use case I currently have in mind is to decide whether to show > 32-bit ARM Docker images in a UI (or arm32v7 images how it is nowadays > called in Docker land). > > > > > In the latter case, just try to do what ever it is you want to do that > > depends on AArch32: if it fails, you don't have AArch32. > > > Yeah one option I considered was just fetching a minimalistic arm32v7 > container, but still seems a bit excessive. Ah, right. So, I guess trying to set the personality or trying to exec a trivial 32-bit binary would answer that. You could ship a trivial static binary with docker for that: trying to run a whole container is probably overkill. If trying to set the personality is more convenient though, that seems an equally good approach in practice. [...] Cheers ---Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel