Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1789579pxk; Tue, 1 Sep 2020 07:53:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbRJWrgMC1k3k1bwQoJbgrqU7jvdj0jr0TBSBoe1wozCjBeA05QzPpofcXh6yYUCJF7Dnl X-Received: by 2002:aa7:d7ca:: with SMTP id e10mr1935325eds.191.1598971988264; Tue, 01 Sep 2020 07:53:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598971988; cv=none; d=google.com; s=arc-20160816; b=vySwSOLQ/T4YdlziyU0JEm5r01b2c8DdUFa14H2D1EUtvmFDzNI/tHbFqxgTHwqE+g auLZICf2a38cLAeMiZ6QNL4PqH+8ZHN7KRCu+US1oThvTNSHs6blGBpH/jsrXIUQmJ1D PqFCfldFWB2jSy5KpcTToABAM4K9utdiroyGJUxcdW+8kVlobOw3wKPT3KZ5fCmmOo/z jBdQr/57CUjXRtpt/Y/r9/j/nN5H9gGc0iNFak9NFnwS+Ym9aAkXWwjAMFoZQI4kyDxQ tP5DfAJSU5+OIGXopzLRvYOb5hJ9H0lNQTtxskRZd3qnLaLaTMO/cyYp8AVuqCKsGwAx cEXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:dkim-signature :dkim-signature:date; bh=dqX1DJ93ypmdQacngw88cyyZgMtx+C7YS/Ea8KuhB0o=; b=tF3NdtwZznQYuFcE7Wo/b55NW1XvUWW7R0hJqzBXmCiFpVD7ooSxIi6ZabXYubjneg eLssZBlkbC6uUMzrUnmoq6FqItnXsxw8URNZmGziKjyFZa9Xnc8KPUXddR/qRh02eUi0 gRdZgtJRQX75Ms0eNQ1MKZt+2KOo2d7O7aKWJVvqAbtF8CGiLfG3uoGClP9DhY8suz/7 0zW6r/HudUn5aSX6GikB8Gr7BQgAQmhNpOpTA/0j8ebLv4PPgO5FLxxadTtn/4dphtco mOhbPifL5yiRHH3eQ8o0mkJNoBurgU1EfknDHdNPnm6jkXEjrZbYU7QLPhKq4ZHWUJIy sWww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=HHKuANEC; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si743346eji.301.2020.09.01.07.52.43; Tue, 01 Sep 2020 07:53:08 -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=fail header.i=@linutronix.de header.s=2020 header.b=HHKuANEC; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727986AbgIAOuD (ORCPT + 99 others); Tue, 1 Sep 2020 10:50:03 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:39440 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727803AbgIALs1 (ORCPT ); Tue, 1 Sep 2020 07:48:27 -0400 Date: Tue, 01 Sep 2020 11:47:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1598960874; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dqX1DJ93ypmdQacngw88cyyZgMtx+C7YS/Ea8KuhB0o=; b=HHKuANECbLS4y6mGG6rYC4l/BPb5FCO7oGJ9w4XiNDpSEamIPpzuBC6Jdy7o3hgQSa1stX hlTQH1MQzFSx5UN8H4Tfk12sBq86+AOiwciqLV0jm09x2Y1Sj8d2W/DWdE21nQQguzHXGu /dneyVxv0e4+NmX9/lXF2NqDopHQA6kpI5gMnDOKIYb0PWEOjM5gMPHaKGgZT/czuXqvHz ydgoDtoxT8iaXpID5lyZcd4AGmAlUPQv4fjc+m8xYcJ86sEBsA+aMOmzEtkYJqwH+D0M7A DU0l6rIptJfAmrc7E0YOuD1yn4wVjClKHugGEyc3Bo/MkqqM4E9UW07eD697Eg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1598960874; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dqX1DJ93ypmdQacngw88cyyZgMtx+C7YS/Ea8KuhB0o=; b=eReN3eVCWHNguW0IXbDvWWmOjIUwTgtnEclUmWf+ny5RguyOgIfEW3YRQIS9/K84iKY1a8 +RSjHqfVvHaHuwCw== From: "tip-bot2 for Kees Cook" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: core/build] x86/asm: Avoid generating unused kprobe sections Cc: Kees Cook , Ingo Molnar , x86 , LKML In-Reply-To: <20200821194310.3089815-23-keescook@chromium.org> References: <20200821194310.3089815-23-keescook@chromium.org> MIME-Version: 1.0 Message-ID: <159896087422.20229.4981553506787808707.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the core/build branch of tip: Commit-ID: a850958c072404f75dd41782cb4ff34b8625b47d Gitweb: https://git.kernel.org/tip/a850958c072404f75dd41782cb4ff34b8625b47d Author: Kees Cook AuthorDate: Fri, 21 Aug 2020 12:43:03 -07:00 Committer: Ingo Molnar CommitterDate: Tue, 01 Sep 2020 10:03:18 +02:00 x86/asm: Avoid generating unused kprobe sections When !CONFIG_KPROBES, do not generate kprobe sections. This makes sure there are no unexpected sections encountered by the linker scripts. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200821194310.3089815-23-keescook@chromium.org --- arch/x86/include/asm/asm.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h index 5c15f95..4712206 100644 --- a/arch/x86/include/asm/asm.h +++ b/arch/x86/include/asm/asm.h @@ -138,11 +138,15 @@ # define _ASM_EXTABLE_FAULT(from, to) \ _ASM_EXTABLE_HANDLE(from, to, ex_handler_fault) -# define _ASM_NOKPROBE(entry) \ +# ifdef CONFIG_KPROBES +# define _ASM_NOKPROBE(entry) \ .pushsection "_kprobe_blacklist","aw" ; \ _ASM_ALIGN ; \ _ASM_PTR (entry); \ .popsection +# else +# define _ASM_NOKPROBE(entry) +# endif #else /* ! __ASSEMBLY__ */ # define _EXPAND_EXTABLE_HANDLE(x) #x