Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp382104pxu; Tue, 1 Dec 2020 13:44:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVwi53GblLR7XxlrrRSVkMcf18oVrskJqrSnO8q0yeKcUJUTIj9ql2lBE8DdMtX/fxFztr X-Received: by 2002:a17:906:d101:: with SMTP id b1mr5149265ejz.80.1606859050570; Tue, 01 Dec 2020 13:44:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606859050; cv=none; d=google.com; s=arc-20160816; b=nA41AKC/1+14o1HH3qibMvPeyQ8RsRM4rPQS89obFz50z+FbEfMbdm9NuoVI8m4qFu 822ingx1qOyWOK7ZWmclB0+MzrCNF+xSjX+O5pQ4U0O8kOfEItttvVUpUNZfYTOqy6ND hv8OPeUzaPu+HEm63DN1ymWRuP+Xex6GS2EkMKW+X1dY8vsOzeTdbTvd9NO7lzBFrOv6 RPkiAl7bg3nv6iYNssU7tth3vytrMU6TAbnYzTtoV1Th/5ofM6Ims24Dm7wvyr8I9cMk p07h8x/P3xioQEDpJf2lOBFujE1Wy4dbGp9SBHpUCvt8IRTMGkr20Qm4gnOkzeCGK8uz GuzQ== 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=D9wH7plBpsyKB7z0MJo6lESfcO9at50jK7OVp+0NdAo=; b=thFwikOFeTRbrgoFdPnNZyB7EAmA22QESMfFShNn7a8ntTTL3O80BJ581sOZikSeVQ LX4R1yKiuqq6bfU3lZSZye5lsPDyZFo8YpPrSOGlYtwIOZ8k/bgoZW647cbxYCxT9b0c a6vsu1FlYouinpc9mAf3F7iUrFXt6tp9Y9pOG++idrYkhneDoEgj54GmJXnlu+lLxobG zSLZoQwplUVu/Ax3lKVBRaLMzYSPFpaVgqc7z5pLu9LcqRd4wxt0V2DxnwagicMWDPl/ dcqyHFGwBU3zuwRBulshjZ0Ej5DUz4Gn4pZ5X6si2F+s3jUAinxVoBpEjfjTgW34ZaVx PYgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ty5f8H7k; 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 i8si733387ejj.424.2020.12.01.13.43.48; Tue, 01 Dec 2020 13:44:10 -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=ty5f8H7k; 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 S2390066AbgLAVjc (ORCPT + 99 others); Tue, 1 Dec 2020 16:39:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389977AbgLAVjb (ORCPT ); Tue, 1 Dec 2020 16:39:31 -0500 Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 975F4C094260 for ; Tue, 1 Dec 2020 13:37:45 -0800 (PST) Received: by mail-qv1-xf49.google.com with SMTP id 12so2181400qvk.23 for ; Tue, 01 Dec 2020 13:37:45 -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=D9wH7plBpsyKB7z0MJo6lESfcO9at50jK7OVp+0NdAo=; b=ty5f8H7kzpU+lvDsHXGI++1V0wurJB7DQJHEXEwufmtrCxIRoiPJOPP1X/3lLsz1Jb yjTR/AGDyQQn3kRjvvw2d88GiqDY8VcvMWomB5DuCrtNFFxHuktvMeKvMrFz+Xfk1Q77 MRmeM7k7VctuQepKTW4pproEuOE+zIwcrFORj2gPW2IlyOU7IhN8JpWoK+mpfeUx5C/d ojaTkHbYjh10G7mgJCJekN588v9SPU5sVPQSTu4fzbRdcVzLgMGzXyAyI0u1gJhvAtr+ L9s0tFmZLbeuu51bgQUHw9Ysitz1s+n7ja3zUrLOpDRRdxizWkaeqCKUaIf410z146BI /CXw== 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=D9wH7plBpsyKB7z0MJo6lESfcO9at50jK7OVp+0NdAo=; b=LW0W+/TJ863N82IncQBR3W22BK2pm/sJD0ytPNtFUPaKU5mM037RqIc+GmiQoMierg RjoAjBcIC8gW57Sae/YaBoxzQORNI5ZglaLpxv0g17Lp+utPT1qNEogU8SpIxfNpI09f SXbBamIDpfe538+MUKhcs/TexxisC4JO78+M6C9RrOzaibxwsi4gnAG8EgZzqnvQLh3q CW8wAq+iIYhuXwlj+opySardkodqqBKoLNRwcS7lGiJzW6XeNdNS28RihFTUuZl1AyCm JcoxrxdZfF/p7enqGAJLaZproiyY7ILgy1+A19qZpbocV9a8osw4g9dqdXczgZKdfe8Z j30w== X-Gm-Message-State: AOAM533IWxsO6KLPaXvkMTO0WMh/xxVLagnX+H/JPxkZDJfLTUtviUyr fff2N/uVo4KDbsN7Q74zE8lAqSKsK4RtqTZqON0= 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:4d84:: with SMTP id cv4mr5421264qvb.14.1606858664762; Tue, 01 Dec 2020 13:37:44 -0800 (PST) Date: Tue, 1 Dec 2020 13:37:05 -0800 In-Reply-To: <20201201213707.541432-1-samitolvanen@google.com> Message-Id: <20201201213707.541432-15-samitolvanen@google.com> Mime-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog Subject: [PATCH v8 14/16] arm64: vdso: disable LTO 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 the vDSO by filtering out CC_FLAGS_LTO, as there's no point in using link-time optimization for the small amount of C code. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Acked-by: Will Deacon --- arch/arm64/kernel/vdso/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile index d65f52264aba..50fe49fb4d95 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -30,7 +30,8 @@ ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \ 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) +CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) $(GCC_PLUGINS_CFLAGS) \ + $(CC_FLAGS_LTO) KASAN_SANITIZE := n UBSAN_SANITIZE := n OBJECT_FILES_NON_STANDARD := y -- 2.29.2.576.ga3fc446d84-goog