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=-5.2 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 280C8C5519F for ; Mon, 16 Nov 2020 13:37:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 C4637208C7 for ; Mon, 16 Nov 2020 13:37:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="D6AOoMIi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4637208C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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=merlin.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=ednuoKkFBFPDL0+U9Gjsh/FelBPyh8Zcp2AFw8Mcy8U=; b=D6AOoMIipyOP0ql3zd4jqY98o 7jDt046RBZ4jQnqyhuATBk7XUEifVYhaW5xrWZD6+d0C/KOAnXycy7az0qqtK/txy4/+32PRVeg/g nufua9bgcJKAipTuWycvf2RDdWlkhGKhm5r8leQwC2w23xawoYVMYU3IiY0lJgBPGOaXLQggMxqXK vWzOo8I/hsS13/n+GL/4032VKAfdz91BpgP/rh+LlqlJnqqa+htpNrLQ+7FVlKrmjx1O0k1PhQikO ioKJvRhJPJ00aainbXxOKUr9NWr1fOvF1ZJtqchZVaciZU/oPeQWeR38VrqkZN9SGsNXKNRvVcVnv 2BI3KidYQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1keeg0-00029m-Ry; Mon, 16 Nov 2020 13:36:12 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1keefx-00029T-Nf for linux-arm-kernel@lists.infradead.org; Mon, 16 Nov 2020 13:36:10 +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 D83C9101E; Mon, 16 Nov 2020 05:36:06 -0800 (PST) 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 D52563F70D; Mon, 16 Nov 2020 05:36:04 -0800 (PST) Date: Mon, 16 Nov 2020 13:36:01 +0000 From: Dave Martin To: "Eric W. Biederman" Subject: Re: [PATCH v16 6/6] arm64: expose FAR_EL1 tag bits in siginfo Message-ID: <20201116133600.GY6882@arm.com> References: <81e1307108ca8ea67aa1060f6f47b34a507410f1.1605235762.git.pcc@google.com> <87ft5an257.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87ft5an257.fsf@x220.int.ebiederm.org> 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-20201116_083609_845671_0E7985EB X-CRM114-Status: GOOD ( 22.19 ) 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: Peter Collingbourne , Catalin Marinas , Helge Deller , Kevin Brodsky , Oleg Nesterov , linux-api@vger.kernel.org, "James E.J. Bottomley" , Kostya Serebryany , Linux ARM , Andrey Konovalov , David Spickett , Vincenzo Frascino , Will Deacon , Evgenii Stepanov 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, Nov 15, 2020 at 08:08:36AM -0600, Eric W. Biederman wrote: > Peter Collingbourne writes: > > > The kernel currently clears the tag bits (i.e. bits 56-63) in the fault > > address exposed via siginfo.si_addr and sigcontext.fault_address. However, > > the tag bits may be needed by tools in order to accurately diagnose > > memory errors, such as HWASan [1] or future tools based on the Memory > > Tagging Extension (MTE). > > > > We should not stop clearing these bits in the existing fault address > > fields, because there may be existing userspace applications that are > > expecting the tag bits to be cleared. Instead, introduce a flag in > > sigaction.sa_flags, SA_EXPOSE_TAGBITS, and only expose the tag bits > > there if the signal handler has this flag set. > > For future architectures that implement something similar does it make > sense that to hide tag bits by default? I think on arm64 this comes from the fact that the tag bits information is not available in all scenarios. To keep things clean, the decision was taken early on to just zero them all the time in si_addr to avoid software getting confused. Possibly other arches do something similar, but that would need digging into. There seems to be debate on whether these bits are part of the address or not. For si_addr I think they probably _should_ be regarded as part of the address in general, and arches that can always report all these bits in si_addr should probably do so IMHO. > I am wondering if SA_EXPOSE_TABGITS might make sense as an architecture > specific sa bit. Perhaps. Peter, do you see other arches masking out bits in si_addr? [...] Cheers ---Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel