Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp672942pxb; Wed, 18 Nov 2020 14:10:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMiKxO9NGHWMx86e+8UG/NyCWPX7SP8hBYUONSdXKTmneXGlMblEQS4iXKC5ZXQAh7cWLI X-Received: by 2002:a17:906:e216:: with SMTP id gf22mr25773677ejb.286.1605737438684; Wed, 18 Nov 2020 14:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605737438; cv=none; d=google.com; s=arc-20160816; b=wWRsHNuscnc2DaHuYBYvUg4yfy18XLQICUpMHCXfqLSgVZHg3SFgOYi8gfSQCpFSrA U4+J2t3MIRSMjSco32Cl4EkeUWtNHz1ujevL4O64ubBE0Prlz6EV1A4AKkbqT0E6Y53X xzfRdHuqqZbfNabapqp+flVR485m/nAfam48m1E1tjdzFP3CAN/Uze8H4VFekK/j5Hn3 vsUeCjhTAm6OpjIiYSR1QtCxFiTjv/Q9Pcx77npUFd4rJVqDYmqZb/QCYibTn04IdBG9 JcYa4gsGie5/dXqtpTX9P9c1D3d99Z65k3pc1vv0R2vaWOVCrTgM+1+kiLGep5bOdPBM JL0g== 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=mxI/yASg0f6Fr52O8HbJJtAQuezjHMCx8HIdyf0ndaw=; b=zDtYqrZMpvTdLTlACV/VEwbwFEzj2/N8je6O9/d/mxNzRnrLtTnL1GuIKFrxhts2BG gySuTM/5XjP7eU0CEjroCi2JN5nqAUcDbqB1oPciluLXvIRnCOqwdaRbWLya0snWYEsB PfFpysjsGU1CJoYkGLshbLu9SHLZ2hlrg/0CSTzko3c8k1fmK2pruSNo70xWSd+bi0HM XXlLnnDMF8+N/r9t904xFJN5wxcFSd+z8ovOjN0KWcX0NPXsBry4CpHukBMFhsM2jpfC 1ueVEJ54ig+Rf2l3BvsfwVe2UKHl+1+AQhNfdW9SWzYEm9E9OhcSpD8itlMbBFT71HO4 Ecpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=wXL6d0K4; 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 r9si3117435ejc.144.2020.11.18.14.10.12; Wed, 18 Nov 2020 14:10:38 -0800 (PST) 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=wXL6d0K4; 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 S1727531AbgKRWIK (ORCPT + 99 others); Wed, 18 Nov 2020 17:08:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727479AbgKRWIE (ORCPT ); Wed, 18 Nov 2020 17:08:04 -0500 Received: from mail-qv1-xf4a.google.com (mail-qv1-xf4a.google.com [IPv6:2607:f8b0:4864:20::f4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95446C0613D4 for ; Wed, 18 Nov 2020 14:08:03 -0800 (PST) Received: by mail-qv1-xf4a.google.com with SMTP id bl3so2508927qvb.8 for ; Wed, 18 Nov 2020 14:08:03 -0800 (PST) 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=mxI/yASg0f6Fr52O8HbJJtAQuezjHMCx8HIdyf0ndaw=; b=wXL6d0K4ogSQ2FXaTmMFlblc8ygekSoyqjsrSzzJDjpixZCmnN20/goG3t/ED7/DTH OxdlaMC9ge+QbZ8tXanDBoxT3LpWcOf8luW/CBKbpnh2xsq7sGt5KwPvZSVnl9APk3gO 8N7JkaxorXB7vboromu73acJ/93kZSSKsn9wdnqxhZRK+w7gFkEwM97MObjc/QMVHCur LGzCFisEIGmrlzY+iEYp9MAwtUT5BXbioFgGSXGwTvoJdAm+0xS7LKQ79iRezYDrbJkJ e3z4mvr4MBID2gFRQexM6A6nq0jYREQkekiigQeetFyTb8zgk9F3ePzJdu41Y2TB8/OO uNyg== 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=mxI/yASg0f6Fr52O8HbJJtAQuezjHMCx8HIdyf0ndaw=; b=IJxfBOale2Dx/8zvN8rX4yUYO8A+L00tjEbaM9cdwm2U0EOJX2H6+ConTm2y1kK9S1 HPwN1JK+JwCzaIarWOIP6dTQON4B2zB/QGRvtXVNGcMKwDrdPZ+7yI9qaw6X4dOEvrLP 1mZh97N9iITSEa9rFDMie/GAvFdIMSW7W+gP/MfBFAbaflptlS/ZL+A+cBOW3ZqASHtl soYBTqH2nBufveYILPGRA0G9lypniAWPydmI4uf37kJ7fRim1vqRBxeZjGwl79gljBws Q1D2HkAK7QJmQ4/TwGRtjPf26lSStAf0kqCTS8vq7lTS1YsKGpFbv4VDExhHORqRP+Uc 3IoQ== X-Gm-Message-State: AOAM530vpsa1CqKIjHkR5DkVuc1wmvPBc8SaZnJMw2xy9DvxgyVedkN+ lyY2bsERz8xvRQI8Sgu03652w1bENA1V9WdojWM= 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:b34a:: with SMTP id a10mr7403176qvf.15.1605737282753; Wed, 18 Nov 2020 14:08:02 -0800 (PST) Date: Wed, 18 Nov 2020 14:07:27 -0800 In-Reply-To: <20201118220731.925424-1-samitolvanen@google.com> Message-Id: <20201118220731.925424-14-samitolvanen@google.com> Mime-Version: 1.0 References: <20201118220731.925424-1-samitolvanen@google.com> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [PATCH v7 13/17] drivers/misc/lkdtm: disable LTO for rodata.o From: Sami Tolvanen To: Masahiro Yamada , Steven Rostedt , Will Deacon Cc: Josh Poimboeuf , 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, 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.29.2.299.gdc1121823c-goog