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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45F38C433EF for ; Wed, 29 Sep 2021 10:02:49 +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 0C90160C41 for ; Wed, 29 Sep 2021 10:02:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0C90160C41 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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=tUMtfSGMB1dV/XEGCoZjCdnopcNKYYxx+LGtTxrqLds=; b=3nRygE7crwoO1v iFr9Q51oiUlLBKuqBrsSSY8f8Nx+CFxRWxQVYCgVaIL1jF/chpM8/GWJ8oiDOmrBWAnu8mH3RzIo0 ozwpyOAIvAqoMLbh4It4i0rhQ/ObaZSnAIGnsIgSH21nmOOz2aDH3faIP/Gma07CNadxg7uPdYAHw CAHYqCrMJPa4FkyQb19UkMO8Maz04gzWNafbXuH304LhXA4I/hTAFR6mbo7Bk7A6SrIu99lm+blal i6AG41ECXBOAxQtsoqYGsrrIR5F150xqLJFN2OhoJPhmn4OoFTJGt6PzOupHamu31heyWP3R8vcE2 Wx+8GoDrqANQNKGQgJSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVWOY-00Af5V-Mv; Wed, 29 Sep 2021 10:00:58 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVWOW-00Af52-NP for linux-arm-kernel@bombadil.infradead.org; Wed, 29 Sep 2021 10:00:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=y/myciqa/Ii7kvQkDckQ0UnF342MIwILYQStokAXlmk=; b=Ap1iixLQB+oxVlqgXgINkzdr20 SaXiRwb42MeC84kvZqqpWg8wVxSk+JRxrUx4dZCyMO92h+r/76LCYH7ksq4/DDTojdIBPJgQJIfM2 no+6xg5HiSXno/JHm5PZQJbpDWxa4XRRQC7rqWqZK5KzRA6yadi1KuZQMSJRKnGosMmA47J4qEnuG RvL/2V0eDkwdN7K2DXfp/q4GTCNVKPiMizvxyeu+wQvVmeelUom7G5aS3u+YZAQ2VbtSYkwFduwDL lrxgn55TgBQjtQK3UrchFF1wiqBQf2CHz/h7BPHP3zeuy3gNPTF4KAbpAFChYDpCiwKrIYQ5DW+aA hej3ItRg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVWNU-00Bi8j-H6; Wed, 29 Sep 2021 10:00:00 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 12908300056; Wed, 29 Sep 2021 11:59:51 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C1B5D2DC92D0B; Wed, 29 Sep 2021 11:59:51 +0200 (CEST) Date: Wed, 29 Sep 2021 11:59:51 +0200 From: Peter Zijlstra To: Mark Rutland Cc: Josh Poimboeuf , Dmitry Vyukov , syzbot , Linux ARM , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, viro@zeniv.linux.org.uk, will@kernel.org, x86@kernel.org Subject: Re: [syzbot] upstream test error: KASAN: invalid-access Read in __entry_tramp_text_end Message-ID: References: <20210921165134.GE35846@C02TD0UTHF1T.local> <20210927170122.GA9201@C02TD0UTHF1T.local> <20210927171812.GB9201@C02TD0UTHF1T.local> <20210928103543.GF1924@C02TD0UTHF1T.local> <20210929013637.bcarm56e4mqo3ndt@treble> <20210929085035.GA33284@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210929085035.GA33284@C02TD0UTHF1T.local> 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 Wed, Sep 29, 2021 at 09:50:45AM +0100, Mark Rutland wrote: > On Wed, Sep 29, 2021 at 09:39:47AM +0200, Peter Zijlstra wrote: > > On Tue, Sep 28, 2021 at 06:36:37PM -0700, Josh Poimboeuf wrote: > > > + asm volatile("417: rdmsr\n" > > > + : EAX_EDX_RET(val, low, high) > > > + : "c" (msr)); > > > + asm_volatile_goto(_ASM_EXTABLE(417b, %l[Efault]) :::: Efault); > > > > That's terrible :-) Could probably do with a comment, but might just > > work.. > > The compiler is well within its rights to spill/restore/copy/shuffle > registers or modify memory between the two asm blocks (which it's liable > to do that when optimizing this after a few layers of inlining), and > skipping that would cause all sorts of undefined behaviour. Ah, but in this case it'll work irrespective of that (which is why we needs a comment!). This is because _ASM_EXTABLE only generates data for another section. There doesn't need to be code continuity between these two asm statements. As I said, this is terrible :-) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel