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=-6.0 required=3.0 tests=BAYES_00,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 36F61C07E99 for ; Mon, 12 Jul 2021 14:46:51 +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 F2F2C61183 for ; Mon, 12 Jul 2021 14:46:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2F2C61183 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=tHXqtSwGA1vcg3QLVR3U9ngu1fXWEMKFuqoP0YmrlaM=; b=Hub6FMNv0aXQvz XF0mZFqlI5jghq1gWkaEmsgSs7dSNXRb8Q5yXvsa+qNGbMwFlIPAx50LGfgb3vKyukUqos2nHmnNK qxEpLKbedEnLt5gqRvNgz7cNlyad/LMTNOwl3JpNluncAUx+a9yfIendF+bA2k6StVqEA5EhfagsV Opc5EW2qepawU9gPrDyXZLZnmA58kxkAw2ZNulsFLPtAX6bTCiViohtp6ZQqZD7lPKssTbSJH8wjR SRglK+x+Db/yg+lGwTPnItFZw96zpmBP0a/kk+BPkgn3ZCtGC/fmJP4OBlIp50k2Ao7pJokWbjUcq z22mbx8P8KWMEe3zKayg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2xBD-007esY-CZ; Mon, 12 Jul 2021 14:45:07 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2xB7-007er3-JI for linux-arm-kernel@lists.infradead.org; Mon, 12 Jul 2021 14:45:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EB6pq64nXJnPrEFCHroVUkFxPf+D61J6AzYGlTxsJok=; b=ksIprcA9uVFqqagxuFBNbkz/v TxgTlx34RX2TWQrp7WiIzCugWGX2kiTYR1pTPAPCX/AGj9hWIDgiZW+nlAY34IqmpRAe46iwBU5L+ /72leq4Gsl/zQm3ePsqvJp8xvfapl++LvBmw4GhSHOh0b/pEQksj9tqc+fBHvTrNmLTidcv2Mtn3b TlwzSj0AjND4UG3dpm6BT+0mvbwQPu+xud6unscwCf9zTsc+q3vDkp9q1Xz8WkE3FjhDM9Y9Agpne HHGVxzbythLNAE65EyBM3WxuxVMKNK+E2591OKcxtBRjtNSqqG5wyDoU0RicN4dgkmFftIcg4xLcm UhUJ954SA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:46018) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2xAN-0004ua-MH; Mon, 12 Jul 2021 15:44:15 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1m2xAJ-0007r6-1c; Mon, 12 Jul 2021 15:44:11 +0100 Date: Mon, 12 Jul 2021 15:44:11 +0100 From: "Russell King (Oracle)" To: Leo Yan Cc: Arnaldo Carvalho de Melo , Adrian Hunter , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Thomas Gleixner , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Mathieu Poirier , Suzuki K Poulose , Mike Leach , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 11/11] perf auxtrace: Add compat_auxtrace_mmap__{read_head|write_tail} Message-ID: <20210712144410.GE22278@shell.armlinux.org.uk> References: <20210711104105.505728-1-leo.yan@linaro.org> <20210711104105.505728-12-leo.yan@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210711104105.505728-12-leo.yan@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210712_074501_675495_F26EF1A0 X-CRM114-Status: GOOD ( 15.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Jul 11, 2021 at 06:41:05PM +0800, Leo Yan wrote: > When perf runs in compat mode (kernel in 64-bit mode and the perf is in > 32-bit mode), the 64-bit value atomicity in the user space cannot be > assured, E.g. on some architectures, the 64-bit value accessing is split > into two instructions, one is for the low 32-bit word accessing and > another is for the high 32-bit word. Does this apply to 32-bit ARM code on aarch64? I would not have thought it would, as the structure member is a __u64 and compat_auxtrace_mmap__read_head() doesn't seem to be marking anything as packed, so the compiler _should_ be able to use a LDRD instruction to load the value. Is this a problem noticed on non-ARM architectures? Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel