Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4111073pxk; Tue, 29 Sep 2020 14:52:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZCK7qn/5OSCxmwEZkTgNqdNYR4hDpCtf8dnmEDOzNprCdSLEWd0yn9vk9REHdeo97mA2i X-Received: by 2002:a50:ce09:: with SMTP id y9mr5386057edi.91.1601416357142; Tue, 29 Sep 2020 14:52:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601416357; cv=none; d=google.com; s=arc-20160816; b=L+sLP58juOZl6hngJAxBfdR6O7nR0WBb8JI6FeiPhF13SxYKideOR7XJf3TXesSvrt Awdy0j9Bd5pe8rfDMt6n2igV/yCdIwtedBu7XgPyfBVNpK/IPnG9UUji4NqAz7M4LNnB 0XS9IB2MzpsvY90ZP1pBbqA53GHgdIPfHdGUHU4I8WCMNmzLLJQXxDJqD0RIy4G3yIT+ vhOwsDgFYvIvRR9voe2xLOKNsQje8CRfWtByxGND5V3OOiv2lmHP4xtNf4m6l0YzWPUc M+ryWLTDzR3Ay6e9mOOlO9Lj5bv9PEBEVgCmV4kEjhKsYNRoZox4vRromvT2yBIg6FXV ODZQ== 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=DIPWfuOfjnS0FLqqhnzrIZ4jlncEeE+o+vZP3RuRCL0=; b=MdqHWqc7zLbAERZ+o+f1fNhPVRGJ/GHmmVgDgvudy+I7ws/UcHET1JLWt6zSegYfs1 +4eXVYLE5OwRQs1bUcGi2bIyP16PASCjRVPhIEjQ4z02lSfV00+cjK7TaX48s7U9wJXg w/oWNsIOysqaRlrg1h5uTnLwcFckJqpB48RnfwNI+Fw3JGaRauNTs9OiQ+cUBkuxj0Ua eof3bAkW7u79LqQNn0zbSW3XuWrI3gMILaicfKFrCq03lFAFePU2srxVDDApPSjmFt1k YZR1UajhXlcPmnM02whslSDALpcl359bg2VSZlqnUHA/HAv57PSA8PTETDF4Ja+rW62L Nv4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jeIjKmg7; 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 o14si3515549ejc.648.2020.09.29.14.52.14; Tue, 29 Sep 2020 14:52:37 -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=jeIjKmg7; 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 S1729470AbgI2Vsl (ORCPT + 99 others); Tue, 29 Sep 2020 17:48:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729251AbgI2Vrq (ORCPT ); Tue, 29 Sep 2020 17:47:46 -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 34EDFC0613E2 for ; Tue, 29 Sep 2020 14:47:29 -0700 (PDT) Received: by mail-qk1-x749.google.com with SMTP id k124so3681655qkc.13 for ; Tue, 29 Sep 2020 14:47:29 -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=DIPWfuOfjnS0FLqqhnzrIZ4jlncEeE+o+vZP3RuRCL0=; b=jeIjKmg7IRS+l/ui8Q+LF8nOaIvlsjsr5dJcnvSqyimVjw+fgPn/vAjJUtO4XmZBa6 Xd0TPg2PXsxw8JWRlXMof9WtQxCvHX0ajUKKZHY+h9ZrQj/vHt4kd3uCJRU76eVTlT3l qvq/mdBiAQCfz0NkdrERe4By8JjkFVxXJhBvXJYakKcsE9Q3uXpA4c2ihpOBil6Arsgm /XRIkE6YivpM0yPirN/ctrfV5AzOopT2G8KpjaFwIzwdIty+tJ9NNd0YLGlPN6mpQHOt PZmo5ltSZAvrWwfyVtCxNb3oLaXN5GzVBEfApucjE1oqsSv0iOxejixTaxe7xLdJuwWh mCjw== 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=DIPWfuOfjnS0FLqqhnzrIZ4jlncEeE+o+vZP3RuRCL0=; b=UUsKPm/qM3vqJiT2CVhSWSTCKqXTmuNd5XsVI3I4wylAI5iIeg/ZDcm/9+cSbmBE4s 4oQ8haqf59x0Zp3D0ZsNd50nenxRIquPLQMx2cladaMoEXxeIgtMZSaUamiANwT4uoMv /2g35oiWZRdnDIlahe9uy4p9W3t/wco9NNlrQfNFAoH5AWdeujz/RUpj5Pj64UKHD5Zi 2t0EJPzskrIkNNQ5hQo1d4Sdt9zojZ8PiWByzddlpogc7Pqih6ot9WxCyAx8JQK4Jt41 CSiHWhaoCHNKq4GiNaUkICnVN3jNHMalK1lZJmc37bIL3E92OFASRQ5+iMSoMw8qESUy uBcg== X-Gm-Message-State: AOAM530XfSn+Ncgh3DQD5Pc0ozwHzJBZ9vTImjuwpHpxSiW9r5jMPy+i rMdWkgiXp+vb1X0pirWWjn8OKEaLr5u00o1pizA= 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:b308:: with SMTP id s8mr6728794qve.16.1601416048309; Tue, 29 Sep 2020 14:47:28 -0700 (PDT) Date: Tue, 29 Sep 2020 14:46:26 -0700 In-Reply-To: <20200929214631.3516445-1-samitolvanen@google.com> Message-Id: <20200929214631.3516445-25-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 24/29] arm64: vdso: 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 Disable LTO for the vDSO by filtering out CC_FLAGS_LTO, as there's no point in using link-time optimization for the small about of C code. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook --- 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 e836e300440f..aa47070a3ccf 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.28.0.709.gb0816b6eb0-goog