From patchwork Tue Sep 29 21:46:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 11807137 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B4B9618 for ; Tue, 29 Sep 2020 21:48:44 +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 AB56320774 for ; Tue, 29 Sep 2020 21:48:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KqD5hhkp"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PS3XkE9y"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="ZTQa+nx+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB56320774 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=37YmiudHCNYKPC3eec9cio2mhkbaUz6caw8Mc/fpgL0=; b=KqD5hhkp3Ik4hE4vUvsHsWh+v qpKV1bQeAVbpZ6pqcJQT10FvFfTtTB/vPOCB6Es/VNZrPT1mhrIeBcoF4yLxxY7y1USFL2jDKpnbh 05Adr7DSYEf+SBBRbpqzebT32wmg8s3F6ruC9KLA/UbUrUFaL7fH4nc+EC+s3Ho00CHY656Ca0atH Ds/EUVNh/YiQaVIJ4H2fOScpVdF/OOAtk9m959ylqhxiVMR8b0CN8Fb2wDAHivNYIp/iN3Ok4aO6y qJzkFgoT7m4qKCfFZLfIfo1UrTM3ve/f/fc7vc2ywl4idsN3HhzMxSxQ2i7BXSM/QO5HQJjzLI5/X Xzs9xXDKg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNNU3-0001C6-Vt; Tue, 29 Sep 2020 21:48:28 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNNSa-0000TU-79 for linux-arm-kernel@merlin.infradead.org; Tue, 29 Sep 2020 21:46:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:Cc:To:From:Subject: References:Mime-Version:Message-Id:In-Reply-To:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wzTjCzGg3xaEC7ll/kCd4uRGsOqMFFvk2QDCKEKZJPs=; b=PS3XkE9yIUZtEaI5KsSCIw831R 00PJREu94GtCHI+xIk+ygLJgrZ+11kED3QSNboqhkyXPwnkihgCGWkJ91wRuXAJR4Y2Sjxu7bXFGj eXhQXxzqquLdeGaxOUlJU9GIu7rCTBd+dEGHWnP/oft0nqbwfNajLEZ1GcTm8o4HywyD1sxbqeN92 62pkkoCEsdQXfpQB5eWVQebd+1ZrHzPQyterpCRlNchhMi1grWzTPlqX82w6QR6AA2+m85wcZN7Qz VyS1zF8Mt+a+BPq2OoTmSiaWuVmVwVsgIevZOPOJJyPRS0OKXQzCq5mHoJsp+0MDEWblxrkFCTx+g gL/WqZBg==; Received: from mail-qk1-x74a.google.com ([2607:f8b0:4864:20::74a]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNNSW-0000H2-52 for linux-arm-kernel@lists.infradead.org; Tue, 29 Sep 2020 21:46:55 +0000 Received: by mail-qk1-x74a.google.com with SMTP id y17so3679199qkf.15 for ; Tue, 29 Sep 2020 14:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=wzTjCzGg3xaEC7ll/kCd4uRGsOqMFFvk2QDCKEKZJPs=; b=ZTQa+nx+ie2V6Hl+EgZ3b9a4nWf6aHDxI2ozXvg7twHaKP6+FN6wo15J3NYUHL6MZy J4Dd+alK6yoV9vbFjsbkRKSroxIwAfTac5LcIIobI37oTx5CMMXDG5PaPNUMt11LwL8e qaWpUR1BPcieUI39Ur38/bJEEGCMg2IEQV7e2ugbrGtg++DfsB4wweV1KXsP1t+8DXDm JeGZ4Z7BrxXuG2djrCReKQukEvOz+cyKSm1LRUENFyizVwreuzCNtUFRYYSNx4ge/Lh7 V+phKEE5IsRMyJIFN5ljmvpZV5Qkvt76Ais9ZtPypytr0PvQL98a/0aQ5/yCoymbWkrC MGDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=wzTjCzGg3xaEC7ll/kCd4uRGsOqMFFvk2QDCKEKZJPs=; b=KxHftb69mEpoaD7FNSgSGae2l4RJfujgT6EsXFACBySREqoBZdkc2N6mBxQbW7u6OD jiIaBZ7cgIPPfuPGS/4NtUk9D2tITkKiPYbzf1l/NEdNOtC9aR3d652nRM8ijCeMnDSI yksVobZrUfflBPcN8p2DJ08GTuDxjyZBOSJ5Y5LXXqVfXANJ73SSpvfRAeAcHE6Jo9pt 5fVea7JfUaKcGq9t3ztSjN+d3Z20ek5VeL2O8EnFQtlTW0tFM7otJaMJ07gcDNQ6Y5ol 54uDEfqLBsbz/SiD/7lB9QnncRvJ7NVsqHTAMaxd1oBAYoYqKn5zxsJu3J+8KvAry2H+ j5YQ== X-Gm-Message-State: AOAM533OHXvSxQOVE2BzWSDtvkDsLCjnfV3VvUHGY922m7mdHm70+G3c GQOakkz8h7pRL1AUjoAjtuwQwA0PY5IrKU/G8q0= X-Google-Smtp-Source: ABdhPJz2ypRSC9mllfNnIhgyfpZXn6C3IOzuDT16CdCuKPyuF6U9OOcO8z3rZ0bOQ0QtPSPEFo5uPG0gQq+yj7Gtb6I= X-Received: from samitolvanen1.mtv.corp.google.com ([2620:15c:201:2:f693:9fff:fef4:1b6d]) (user=samitolvanen job=sendgmr) by 2002:ad4:58e3:: with SMTP id di3mr6759116qvb.54.1601416009709; Tue, 29 Sep 2020 14:46:49 -0700 (PDT) Date: Tue, 29 Sep 2020 14:46:10 -0700 In-Reply-To: <20200929214631.3516445-1-samitolvanen@google.com> Message-Id: <20200929214631.3516445-9-samitolvanen@google.com> Mime-Version: 1.0 References: <20200929214631.3516445-1-samitolvanen@google.com> X-Mailer: git-send-email 2.28.0.709.gb0816b6eb0-goog Subject: [PATCH v4 08/29] x86, build: use objtool mcount From: Sami Tolvanen To: Masahiro Yamada , Will Deacon , Steven Rostedt X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200929_224652_393639_D882D915 X-CRM114-Status: GOOD ( 10.82 ) X-Spam-Score: -10.1 (----------) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-10.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:74a listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.5 DKIMWL_WL_MED DKIMwl.org - Medium trust sender 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: linux-arch@vger.kernel.org, x86@kernel.org, Kees Cook , "Paul E. McKenney" , kernel-hardening@lists.openwall.com, Peter Zijlstra , Greg Kroah-Hartman , linux-kbuild@vger.kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Sami Tolvanen , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Select HAVE_OBJTOOL_MCOUNT if STACK_VALIDATION is selected to use objtool to generate __mcount_loc sections for dynamic ftrace with Clang and gcc <5 (later versions of gcc use -mrecord-mcount). Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 7101ac64bb20..6de2e5c0bdba 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -163,6 +163,7 @@ config X86 select HAVE_CMPXCHG_LOCAL select HAVE_CONTEXT_TRACKING if X86_64 select HAVE_C_RECORDMCOUNT + select HAVE_OBJTOOL_MCOUNT if STACK_VALIDATION select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS select HAVE_DYNAMIC_FTRACE