Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp140560pxb; Wed, 3 Nov 2021 01:22:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/sZZNCSC6y8KyVtbwpCEDZ2gVVeSbbOK4ZroznhqAfv53LKqgDq3JCmdZIpmE6GKwZbi/ X-Received: by 2002:a05:6e02:b24:: with SMTP id e4mr6192902ilu.17.1635927772709; Wed, 03 Nov 2021 01:22:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635927772; cv=none; d=google.com; s=arc-20160816; b=xd7BSFtrZrOBBR/WqMGEGQ+6Z+0ysAVZFhHeCLSG9WczRzrn4tX7UdWmSAza+0IcBr 4ReNyUlac9dv3akfVH0qGVrPFZ+XZ4h8y3B1Z/yicBMlg5JrtqJzIzQj1zZP95rLtlbQ DpfggtSk49M2PGpuEinQqFGoxORsXUCmF250eOxlTIMtxiRE27DKI0BALDX0vsCSJS/F ScUOTnO3D0c63ywVF5p0rRA6U9FDk1FYeyGq+mfnWmsJGWq7DkDL+Hf4DhUMAB2L69j2 dEHGKzddzNRqcNeJMOEv9X+qxDg4dqwrufYho7jVbaANmoR/KbKmr3lrswi90inY5u1z pijw== 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=8huLmD98SSL+mzJ3Jm1lG9FgiQpVwJXnN0kffx8m9Zc=; b=s4QpGBPg6EomVKkpePpFMcgkmGlzM2JolugfOut8VWqJV/dLixZwGh+bwxX/YWLoul wvHO+rXdO5zh7ykdOGuhfk1RNasW0UHFx9Y5RiSoPotRqJWw+7VWZR2j6PjLJ0+KrQZP nbSsDmC6Xs2+Y7ZpeKtM+AMs//0ZlmR7UDKptuPYr/cP0ogkGhAxHuD4ZRPWRaJR0NNj FPcjzACire4uWMx+dpQXRQ1J2uAVx0UB728PIEN99jjLaiiA/8Gsc1OlLRL5RpQ9UjLs vYri4uQtuM7EPrHbLOoVAq8tJq2Zu3UYZebOZ7SUVEAIjgvzdCwOpXBQ/lCPZXUbLMCg Uf7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ejv5Lm02; 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 x8si2939094ilu.60.2021.11.03.01.22.40; Wed, 03 Nov 2021 01:22:52 -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=casper.20170209 header.b=ejv5Lm02; 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 S231254AbhKCIYR (ORCPT + 99 others); Wed, 3 Nov 2021 04:24:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230025AbhKCIYQ (ORCPT ); Wed, 3 Nov 2021 04:24:16 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 933CFC061714 for ; Wed, 3 Nov 2021 01:21:40 -0700 (PDT) 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=8huLmD98SSL+mzJ3Jm1lG9FgiQpVwJXnN0kffx8m9Zc=; b=ejv5Lm027thQy32eIITKEnby8p UqZZ85rHOSGSW9ivQzOncgNh33mvw3J9khqB5XoVctP6MvF0qfI96C1yHartbZtMXYhc6CXUj84GC ymIcRDHREX3UKQDpUbhBVyFuusHtN4VyabX06n0ufOVfV4Dz0e/+RvF+Vtpwa1Szu7m5FQRScHRfr MyzgrC8GYwAx+nEBD8cvqq7i5Z8lbU86vJWLs1la/s8KpUs1paC2VbCSmAt/Yw7a+Vv3b9mTbuVYi 3AKoUM4GG6ZB+uql8XT02HEkL3h3tKu9g3dTCE0qpTeAqZml6MrvS697yHnwKhuGgBvVB5ZB9Kcgr cIPyzgFw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1miBUe-0054WQ-4b; Wed, 03 Nov 2021 08:19:54 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 61F2D986378; Wed, 3 Nov 2021 09:19:35 +0100 (CET) Date: Wed, 3 Nov 2021 09:19:35 +0100 From: Peter Zijlstra To: Alexander Popov Cc: Linus Torvalds , Thomas Gleixner , Josh Poimboeuf , Linux Kernel Mailing List , the arch/x86 maintainers Subject: Re: Stackleak vs noinstr (Was: [GIT pull] objtool/core for v5.16-rc1) Message-ID: <20211103081935.GA174703@worktop.programming.kicks-ass.net> 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 Wed, Nov 03, 2021 at 10:18:22AM +0300, Alexander Popov wrote: > Yes, this is a correct approach. > > But I'm not sure about removing NOKPROBE_SYMBOL and notrace for > stackleak_erase. Does the code in noinstr.text disable all those? Yes, noinstr implies all those and more. Both kprobe and tracing are a form of instrumentation, and hence noinstr must disallow it.