Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4109263pxk; Tue, 29 Sep 2020 14:48:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQhM2ndNKWsCFQCi3myQyfZCpgSHFZ2480g6nnaxdL95FqNrqURx82Q7T/G7Wo9Lbzhlaa X-Received: by 2002:a17:906:244f:: with SMTP id a15mr3302816ejb.108.1601416118450; Tue, 29 Sep 2020 14:48:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601416118; cv=none; d=google.com; s=arc-20160816; b=NPI642I4h+Kbf43KJNdTCxzFXlsDsQjEjpSXUiVSXK9pbd1iiKsYHeyxK60Lgy4sHv UjgjxWoaBCnlhm6/jYNkiRxRTrLCzuIV5SjQNirbrVEdGs1WDvDBDUkEqC+Zt2TmQXwW fKo81pV/KnpciMgZ8hMUHV14v4J1zMVheVaHTKNTObN3NDENcOwYMbkHJeAxccsSugGM TpolsM7/Lm3qp0rpfZjKdR/iy4kS861hPh7Y4He9031xhN+Oq5R0Qp4wVXejFrwwEnmu L6TMwuJisRQPskRny4wew1MdXwpwt1qaG+zZGbRPVkoHQLVDBOslP8cdilOhiY8PhXFZ CnFg== 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=EVFyDdMBT7UIjCTs1R+jFYtxZ12heAHoZCz5KJatfNk=; b=YblP5EOoeCWrMW4KcbkJrby/ZKwQ8UV9Yp7Db1qGtrojALxkdjJOluA8pWkhNezU4T htDdyxUZwz0wN1WAfIYEbKYPA3HQkwDx4KcDM7DiYhh4zv3gumqAOdP+CPWIPtrdxsX9 Sns1Gok7d0hq5Wit84+czd4SURgLVRFq/COQkErwAKMU6OIwTg9TjZGrbPZbKcBI8qVv lhSAAZ8LPRt15W/9TtUHgj9c4AY+1gIP7RGJq9Pw5snN9I4R05lbqAudbW1weD4hkxUy i8YaXUNwVq6cY4QnapjZ6/QBDxxe4xHdOJxQm1XABoE7/dGnMT+QrmLuqh4p3jfUL5G2 JLsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jb5rUAmu; 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 qc23si3338424ejb.25.2020.09.29.14.48.15; Tue, 29 Sep 2020 14:48:38 -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=jb5rUAmu; 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 S1728655AbgI2Vq6 (ORCPT + 99 others); Tue, 29 Sep 2020 17:46:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728656AbgI2Vq4 (ORCPT ); Tue, 29 Sep 2020 17:46:56 -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 1B242C0613DA for ; Tue, 29 Sep 2020 14:46:55 -0700 (PDT) Received: by mail-qk1-x74a.google.com with SMTP id 125so3697174qkh.4 for ; Tue, 29 Sep 2020 14:46:55 -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=EVFyDdMBT7UIjCTs1R+jFYtxZ12heAHoZCz5KJatfNk=; b=jb5rUAmu6jwYLZfXR3cdX9Of5qq8lDR8AdcOKwFBT1Jn7cdegEaEDvOw+fpU2idY9A 8wFamSyI2lLC5VxJq7gYYwW4eOM8Bkfx943cd4ZbXduXrvxredZSa99R51L+eh2bDr9X UYWjSLF9dF9wGO9IVQkFy6y9WjhboBfwIQ5mKr/qBjqRpX9u6GdEqUCrNwU7cVRpdhS4 RlxEj1ljkZcdmBaUMZNJWQOEavH3n+8ZPoLfB9xSVFT8bI81+SHvQiKWZiw0cslu16Yd xZW3VRVpgNMRYExJsKoxdCR27pnuJQiOWTDGIAneFEWb8bDWnFJUk61U27XVETE6R0oT pfyw== 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=EVFyDdMBT7UIjCTs1R+jFYtxZ12heAHoZCz5KJatfNk=; b=lT7Im8uWdGsHmJ69Ma5R7r31f1sVuuRS8MjQu5LwUfgLcoAZC1NClE/kmygrOAxi9b 397Qz6FETRDsKYXhDY8071AYX2k5beyEQTmMRy2VPb6IBf7z1vOyBCq1hfOCv4zaxOUO 0QP5FgdqCuj4BG06gnJoW4LSfI/X3aUslCgMTrWh6HgT4Az8Te3HiJYV5nbRrbKi9F0E MKfRl1FZ18PFpkWp6n1NGtgFRwhedVaA5IXqUHcC15p5XgWMlC8myXSUYV7u4+EslKFb dohz+5gyZamUfsUD4N+zkjhH2zLFCYh0gOe9IdDRF++/tMtDBO+nGO7BjOVY6u4o0Sa2 6E6A== X-Gm-Message-State: AOAM531Ej36zaoqZRMZ6xASjj7PIE1wT8SmAgWTkCmRXoeg+RgJkDfX/ CYxScDGeqelEiG3E9bsc8b7TsweFeHsXg9Wyi2A= 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:b202:: with SMTP id x2mr6465789qvd.49.1601416014258; Tue, 29 Sep 2020 14:46:54 -0700 (PDT) Date: Tue, 29 Sep 2020 14:46:12 -0700 In-Reply-To: <20200929214631.3516445-1-samitolvanen@google.com> Message-Id: <20200929214631.3516445-11-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 10/29] treewide: remove DISABLE_LTO 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 This change removes all instances of DISABLE_LTO from Makefiles, as they are currently unused, and the preferred method of disabling LTO is to filter out the flags instead. Suggested-by: Kees Cook Signed-off-by: Sami Tolvanen --- arch/arm64/kernel/vdso/Makefile | 1 - arch/sparc/vdso/Makefile | 2 -- arch/x86/entry/vdso/Makefile | 2 -- kernel/Makefile | 3 --- scripts/Makefile.build | 2 +- 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile index 45d5cfe46429..e836e300440f 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -31,7 +31,6 @@ ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 ccflags-y += -DDISABLE_BRANCH_PROFILING CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) $(GCC_PLUGINS_CFLAGS) -KBUILD_CFLAGS += $(DISABLE_LTO) KASAN_SANITIZE := n UBSAN_SANITIZE := n OBJECT_FILES_NON_STANDARD := y diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile index f44355e46f31..476c4b315505 100644 --- a/arch/sparc/vdso/Makefile +++ b/arch/sparc/vdso/Makefile @@ -3,8 +3,6 @@ # Building vDSO images for sparc. # -KBUILD_CFLAGS += $(DISABLE_LTO) - VDSO64-$(CONFIG_SPARC64) := y VDSOCOMPAT-$(CONFIG_COMPAT) := y diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index 215376d975a2..ecc27018ae13 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -9,8 +9,6 @@ ARCH_REL_TYPE_ABS := R_X86_64_JUMP_SLOT|R_X86_64_GLOB_DAT|R_X86_64_RELATIVE| ARCH_REL_TYPE_ABS += R_386_GLOB_DAT|R_386_JMP_SLOT|R_386_RELATIVE include $(srctree)/lib/vdso/Makefile -KBUILD_CFLAGS += $(DISABLE_LTO) - # Sanitizer runtimes are unavailable and cannot be linked here. KASAN_SANITIZE := n UBSAN_SANITIZE := n diff --git a/kernel/Makefile b/kernel/Makefile index 9a20016d4900..347254f07dab 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -38,9 +38,6 @@ KASAN_SANITIZE_kcov.o := n KCSAN_SANITIZE_kcov.o := n CFLAGS_kcov.o := $(call cc-option, -fno-conserve-stack) -fno-stack-protector -# cond_syscall is currently not LTO compatible -CFLAGS_sys_ni.o = $(DISABLE_LTO) - obj-y += sched/ obj-y += locking/ obj-y += power/ diff --git a/scripts/Makefile.build b/scripts/Makefile.build index a4634aae1506..2175ddb1ee0c 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -111,7 +111,7 @@ endif # --------------------------------------------------------------------------- quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ - cmd_cc_s_c = $(CC) $(filter-out $(DEBUG_CFLAGS), $(c_flags)) $(DISABLE_LTO) -fverbose-asm -S -o $@ $< + cmd_cc_s_c = $(CC) $(filter-out $(DEBUG_CFLAGS), $(c_flags)) -fverbose-asm -S -o $@ $< $(obj)/%.s: $(src)/%.c FORCE $(call if_changed_dep,cc_s_c) -- 2.28.0.709.gb0816b6eb0-goog