Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3998299pxb; Tue, 2 Nov 2021 02:11:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzo1ZPoZ+XWJDr72kdlVcFr4aDyI5bwhK6V0fCq3raOV/dPHGqyAVGYctKOzEeBeaY/FlXa X-Received: by 2002:a17:906:5811:: with SMTP id m17mr43918121ejq.289.1635844299927; Tue, 02 Nov 2021 02:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635844299; cv=none; d=google.com; s=arc-20160816; b=FoL6f0aJqjRQmO0dtxyfiqHLJpBFQ4DWdZttUKPW4CazeSrHVLaGu88IVBKRMIVadw HIJ7Bzo8Ocp+IsUk6Ur+JRfNacIW5vA2NRaePUji3KQCuvgXyzaoEa+/m5waQIdu8iLH 7xKn60lmGG55FrBVm4PGkKQHnfv6XIReUvGgmJJ7qaXCWigagBBgSej1DRuT2e6gBnZz FUfWlMa1uKE6gn42NIKG6IR4T2dZzeq2V46Fi7v/4SZp4Z5u2uHZAS1N0JHW3YguEAYt EmoUOg+jkBOV/e8ITHXH1ED7aVhSbvAhkj5an7MacvarLl27FgyBcYKeEJz+jpV1NKXS XPZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=t5NNARZCESkBMHbSFDkU2uCQli76k4Fpys6MwbkQNlo=; b=ceeAx6gAzB6wARsMfkNOvCZ9lpJ7XNRyEASmZ3uExJuUYHZFsEJILiRTDNKNfkx8m0 PW0dsb4MPG9JZnqHyhEe1BaqBvwnBQvKOxYtWo2fSc1HizZMfuLlMSflcbV0FYSITmJR GdK5hIyg4Gk2F5A3G/sZ5j+vf93si6TXsdqH7sfKsEHKfKun9dt+AURtuR6DMYRw6E7D x8k0lbeK2pGRpFqjH/rtqfm3q4Z+vWOHPMJVR1uJgHPXb47TkAoKs3eNhhfAJeViUqr1 UpYTdd3Qsq/qZYgg4vfBWhIMOqdvP6T6HLgHcDaUCOaibO5w+ymoswhlOH2uuKKTkxx9 cJOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=mSQ2ZFse; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hq30si16874331ejc.87.2021.11.02.02.11.03; Tue, 02 Nov 2021 02:11:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=mSQ2ZFse; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229813AbhKBJIh (ORCPT + 99 others); Tue, 2 Nov 2021 05:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbhKBJIh (ORCPT ); Tue, 2 Nov 2021 05:08:37 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A69D4C061714 for ; Tue, 2 Nov 2021 02:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=t5NNARZCESkBMHbSFDkU2uCQli76k4Fpys6MwbkQNlo=; b=mSQ2ZFseLavWzq0jedg7nLp2UV zjZuZR/r/S4Xu2qHwUi51oGatHYNHlYSK98Z7QrgzNukrlAVxxFHoe8Ig92/rKA4/hd1W3vxgwp7d fAlBDfArWqZhgUZOA2A2nadUpkFy0YdJ1n57vrUZGZO6l1VL6hUjZQuqqRXawOEZfdU0VUUs3fdot 7shBeHxjO0xURBIbiumt6BPkrfr1pOg3iFhQX6c8PpnThDuz/1mhmVZOoqFoln5NpsssIQ7exLZ/j zFUVI3zHvNXaCRnze6bupk38Mk4StB7tVotrqqRQlYQQSBHei21Q853ZweFbyPkMkbECmihpv9iqL 8NzWmdvA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhpjt-00DjBb-1H; Tue, 02 Nov 2021 09:05:53 +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 9FF1E30022C; Tue, 2 Nov 2021 10:05:50 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 88106202732EF; Tue, 2 Nov 2021 10:05:50 +0100 (CET) Date: Tue, 2 Nov 2021 10:05:50 +0100 From: Peter Zijlstra To: Linus Torvalds Cc: Thomas Gleixner , Josh Poimboeuf , Linux Kernel Mailing List , the arch/x86 maintainers , Alexander Popov Subject: Stackleak vs noinstr (Was: [GIT pull] objtool/core for v5.16-rc1) Message-ID: References: <163572864256.3357115.931779940195622047.tglx@xen13> <163572864563.3357115.8793939214537874196.tglx@xen13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 02, 2021 at 09:00:36AM +0100, Peter Zijlstra wrote: > On Mon, Nov 01, 2021 at 01:44:39PM -0700, Linus Torvalds wrote: > > do_machine_check()+0x27: call to stackleak_track_stack ... > > do_syscall_64()+0x9: call to stackleak_track_stack ... > > do_int80_syscall_32()+0x9: call to stackleak_track_stack ... > > exc_general_protection()+0x22: call to stackleak_track_stack ... > > fixup_bad_iret()+0x20: call to stackleak_track_stack ... > > .entry.text+0x10e6: call to stackleak_erase ... > > .entry.text+0x143: call to stackleak_erase ... > > .entry.text+0x17d9: call to stackleak_erase ... > > > > most seem to be about the stackleak thing, > > Right, I recently ran into this and hacen't yet had time to look into > it. I suspect my normal build box doesn't have the GCC plugin crud > enabled or somesuch. > > I think the GCC stackleak plugin needs fixing, specifically it needs a > function attribute such that it will not emit instrumentation in noinstr > functions. I'll go chase down the developer of that thing. Alexander, is there any way to make this plugin grow a function attribute which we can add to noinstr ? There's a strict requirement the compiler doesn't add extra code to noinstr functions these days. We'll 'soon' be running noinstr C code before switching to kernel page tables even.