Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4110415pxk; Tue, 29 Sep 2020 14:51:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIUd7UlSX8KcuE5F7tEPBDYFibIifuvLUCOsbHpg8fk3H3l88/q6qqqVA7dazaAEi43Hei X-Received: by 2002:a17:907:2078:: with SMTP id qp24mr6382283ejb.500.1601416265711; Tue, 29 Sep 2020 14:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601416265; cv=none; d=google.com; s=arc-20160816; b=EcbQE53lukcZ4otAKe1MAQsB9g39zd0RCCGmNaRBIYMGCZrHcmdacwBYr6zk4afwit Feti8N+G4n06OigPL0V4SjQXaqaWnWwWZs2MEAql5oWPU1/g0+JiWMLlSosBPBFOudNB 642OPKxfw7N/S8g9Q83Zj4sgo+NSL7S/H2QuGQHQc+L0zyzfhvV/b0mzSpQwWZLm4U3B Sv8zjWoNVG3qk3tJuCjHVBqUQBCTKU1naUpcxB0td9rGdIINeBt91myKteIJArpAEesY Z0SBRwXmjvCSVaQMeqoZ5gtXyzmTR2Y4M/gtNSV2b7f8l/Z9QrPiGpkD+Y7Ou5Mg8sZL e36w== 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=dEqcNX1Djl0IV1+V4O1jZ3zX0CSjG7hkO+H8f2GKot0=; b=tATx7ugZGMiXP1QdoEr2hOrEc+4Ec54rpFocvZ0BFGMOE50s+jWgJOQ1u8X44dHaoj PjbKSSrF1i8+kYQq2dO0rWeCcI8ap+GPqboTG4CXGFSnMeOJvnMOzAM3oikXZZJjlcgf 5Ebfp2GmAjs1KT0kbp2vF0+pldvxJ0O95QrJ1XniKlQ9yb6oVJfW32E9gQ35O51re8Eu TrvCkT0WdyLO+NbPFcjIlbmE5wJsUvEAX1t9R6bPVWMro0ttG+mbIGxgNzLLzc3w/RyV bFaq+BQTHOEt1bHIKNZI2KoHK0o5dBJ4pBoJypcVAqseqziXKeENnbEFVSDfz/XS/NV/ ChHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VQOoXlSc; 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 q21si3622243eds.392.2020.09.29.14.50.43; Tue, 29 Sep 2020 14:51:05 -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=VQOoXlSc; 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 S1729230AbgI2VtF (ORCPT + 99 others); Tue, 29 Sep 2020 17:49:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729197AbgI2Vrp (ORCPT ); Tue, 29 Sep 2020 17:47:45 -0400 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEEFCC0613DE for ; Tue, 29 Sep 2020 14:47:26 -0700 (PDT) Received: by mail-qk1-x74a.google.com with SMTP id q131so3660321qke.22 for ; Tue, 29 Sep 2020 14:47:26 -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=dEqcNX1Djl0IV1+V4O1jZ3zX0CSjG7hkO+H8f2GKot0=; b=VQOoXlScak0WysBr/W0lMAFEgBmf32Hfw3oXYJ6KFr0fKBu3y13ZA46qQn/qdgZK8G i7ux8V3oo0qTphW/9JBrWhu78R0GtF1wBcMFmXjLpLEc7GSsvPNid7x6lav1uJEis2a7 9W/iGpPEQWtZ88Ylf6C8QNA3xu3tblmY6b/lZ2G2WdHJgfBPHmhOTR1ICCMpX+ICACEs gkyzgzySrJUDgSqaEtM3K6Q4WXigD1N/jiQrFgmXGoYkLUA/xKM7BuINs/wO+fWF4DHc JWaw9z1iMdO3i+MVSCqHWvgzTM8qRNCbnWvbhhOBb0dwF6b5pI+bPyepJLJRhfWXJMhQ QkeA== 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=dEqcNX1Djl0IV1+V4O1jZ3zX0CSjG7hkO+H8f2GKot0=; b=d3d6bMLZk6IiBcVAPkPo7pux086B5LTr9doen1VCPzLDu+JgTN2DC6pzh27yM+7Sud FgIUVFWymFYak5XNyP0Egk1eyMR1iQURy3/7WsqTiqtrp7zlVbHrRRlFMeoB3nw3cZDT K/+Az4l1iGvehjmrCpkKp+fXM4uZgiNeMhG560CbUgiJh52ngQXCaYgxOamToJ9qn8zA tiI88RsjHRjCIkfPso/MbPbFnlXixEH99sXV8L6+krzCxmmzm1WR3PGKUrAHrwVvgrGz 1U0eF4UYXTLV7/jSuI56CSKnuzVYHDYjfbFZZcsfeFjw8a4tCrH00WwsUlJNMV8Hd7+W oIXA== X-Gm-Message-State: AOAM533J9nwsoSwmKiOnnDptSrhwBAfSnIw/cltqIYiSf460qc6Z44DQ Z0M1VCq+L5O+mPgu9BvidhkOIpWdy4hyavRDRuo= 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:a0c:abc7:: with SMTP id k7mr6181365qvb.45.1601416045978; Tue, 29 Sep 2020 14:47:25 -0700 (PDT) Date: Tue, 29 Sep 2020 14:46:25 -0700 In-Reply-To: <20200929214631.3516445-1-samitolvanen@google.com> Message-Id: <20200929214631.3516445-24-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 23/29] drivers/misc/lkdtm: disable LTO for rodata.o 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 Disable LTO for rodata.o to allow objcopy to be used to manipulate sections. Signed-off-by: Sami Tolvanen Acked-by: Kees Cook --- drivers/misc/lkdtm/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/lkdtm/Makefile b/drivers/misc/lkdtm/Makefile index c70b3822013f..dd4c936d4d73 100644 --- a/drivers/misc/lkdtm/Makefile +++ b/drivers/misc/lkdtm/Makefile @@ -13,6 +13,7 @@ lkdtm-$(CONFIG_LKDTM) += cfi.o KASAN_SANITIZE_stackleak.o := n KCOV_INSTRUMENT_rodata.o := n +CFLAGS_REMOVE_rodata.o += $(CC_FLAGS_LTO) OBJCOPYFLAGS := OBJCOPYFLAGS_rodata_objcopy.o := \ -- 2.28.0.709.gb0816b6eb0-goog