Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4110038pxk; Tue, 29 Sep 2020 14:50:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymqXEtjbeqVcYAltEM7+CKR0D34+HJV6usmHPkD57BhaeoFwyyUclBnxpsb9zq/6+XhENY X-Received: by 2002:a50:d987:: with SMTP id w7mr5564354edj.113.1601416209973; Tue, 29 Sep 2020 14:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601416209; cv=none; d=google.com; s=arc-20160816; b=WnJ4KReihve55weV7fvLaZw0ZYly0/kpXl2ZO2aTFy+mscU0xvrhP5ZS5CgquPQ6YR JyuVujir2RxpUCl76IhBvK8Ytxg2G3Psg7pZ2MYBAlqWCFcYuEYUx2/Of6MdkY0lD6Ei jyDojnGTheDehh/zWKmm289259JtYzam6V7bU4PJcq/TMr9ozrCo2cu/XoXCTu50GAYQ GALcVqRVJwRjY9DkUhYCdf311442Vvle/LJoOdsa8t57PoLNxHWtBPh7eopURwqtkmzf PXbq5wTtnohptju4vpYq4HtnI9EHAMlfkwH6tr9CTJRMQqkdtTWYWs8z7oti7ladVGVP WqNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=wzTjCzGg3xaEC7ll/kCd4uRGsOqMFFvk2QDCKEKZJPs=; b=1GWN4RNkXtKgwPR94Qo+TC9koeLhZuFlBpwKXpGEdiFqIIxOxmDPhiWMMe9tlYuHBA lztFpMN7lZ9/JnCQbNQHPF8Ke1xicj/Z2HaAtE+VHt2SeqYjx3TdY6GWWSdM6TAbfOxp Za90CZGfTuyGtKtHGFdmkQhchK7jNVSxng2z95XJuAIFcgD+zrIO6tOEVbmx8KzSlh+m TOBjw+27RT+wrLbkbtnK2w06RW+wXaRt74igZ1CGM5ogMultK4zr+/F/eX0s2W9zh2u4 5kZ6NfQwSTrHcwL8MBDeRP7mJMl5PipkCrwCyZmQSHBBW7q2TVjQsEjlGRQ/PQx0bluI g04A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ZTQa+nx+; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f6si3591016edm.308.2020.09.29.14.49.47; Tue, 29 Sep 2020 14:50:09 -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=@google.com header.s=20161025 header.b=ZTQa+nx+; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728525AbgI2VsH (ORCPT + 99 others); Tue, 29 Sep 2020 17:48:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728570AbgI2Vqu (ORCPT ); Tue, 29 Sep 2020 17:46:50 -0400 Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 855CFC0613D0 for ; Tue, 29 Sep 2020 14:46:50 -0700 (PDT) Received: by mail-qk1-x749.google.com with SMTP id y17so3706070qky.0 for ; Tue, 29 Sep 2020 14:46:50 -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=VYZlQygegWsijKjhRnTQoYmVAMaEhrzGICdfOddX4gjtEZL/6NZZ5k9le3vWbxOJLJ l+3pPPYhzGA0+FapuMgrUspTStKdLbwZyXIToXT3TlPNPw/pEm2b8Caj4pXRMzqBi/nf we92HXvHaOYEL/t7+zoGHBDvDKBbrV9W/zrQbOJfZTUeM0llXB1F2aWIB4lrbEQeHxBC nOQKpz/ZVZx7s78EBAyYdsKGQYHP5sJGyiYLqsKFenjC1IXxyUXPqnsY6TtADDPQDH/x kKeMkN90OfRCpof/hT3ty33nNPRtoK0hQXNeEwuRSihfgTeENCs/VmEe+0tzLB1ugVMP +7KA== X-Gm-Message-State: AOAM531H+axm05+Pyh/G9nkVG2tUNc9RAb5tcu4SDvTdd+AWTLUlyHLu Ik985JPQdicG0R41JmRW0FV1noDvwlKMKkE+Eb0= Sender: "samitolvanen via sendgmr" 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 Cc: Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-hardening@lists.openwall.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org, Sami Tolvanen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 -- 2.28.0.709.gb0816b6eb0-goog