Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp788454ybj; Thu, 7 May 2020 07:40:28 -0700 (PDT) X-Google-Smtp-Source: APiQypIXKmZz42boT5muKwfUdl0eg6UygeHdotxsh8AoRUt35tYMLCBWy4Gm3K1rzjgCByhEmJ4R X-Received: by 2002:a17:906:edc8:: with SMTP id sb8mr3258955ejb.151.1588862428399; Thu, 07 May 2020 07:40:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588862428; cv=none; d=google.com; s=arc-20160816; b=aNbYgdfaOHZYpwxgTjNxMRJcXnXy9cbxAMD8TxN9aQHnEOuuSi2MvOhjbzrR5g8Bur 2k3AcNwB3QPJmfN4t6BCe4PdvDOx2s66UpYMNTY14Sb24xUIEs6D0PkEDRluzd4hdjSA D1Su0MkYeCcZBWBPnqpB20akdNf2FkEvDD3pLWdb0y+x209k56gLNa0x1J+Q9iaRUKjY 5Yw/9abMQBCQX3H7bA1sLITrBaKlmawy6LavAmZk2+rLkDo8EtirsNdR0l8NkmsvuOYj IOg5uV60XQG12vUCQWonqyZs7667swyk+r2eSf08+eG8V/iPVro4sLLmlPbqvMKJYHFe /ztw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wDHhDLSStrYngtCw8GP1IFJNL/9txGlHa5f3OjBWowQ=; b=eYhUH6eh+0ADNKqWmL3S4zfRXF7VLBMEZ2bdDncoUA83xG0lahPvp8ADZ4fZ3LX9xQ 9vC0c4UA+4KwNJ1HyekBNpWwc0d2iWv9zPDlpipD5LkQ1SNJmcPXjyLAoxwHOpnyAl41 iMZKtusc3QuKVTM5b3eWeY55TQRqkWiP00aA3X8M47lgzUqyooKwU3jN7nB6VRLCY+2K hiqCtU9BUhPOHyfaIuascYci3ogvw63eHKuNBGqkVDJXWkcr01lhkFjyPd+LJ2iJLSKS JecMq6VXI/tTCktUFL2biWb248iimBYmCLexA9SwhSKnnJPGQPeQ6u7b0Rhlw/xyKknH yJeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iTaPbQ2e; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dx23si3490045ejb.181.2020.05.07.07.40.04; Thu, 07 May 2020 07:40:28 -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=@kernel.org header.s=default header.b=iTaPbQ2e; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728165AbgEGOgM (ORCPT + 99 others); Thu, 7 May 2020 10:36:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:55064 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728094AbgEGO2Y (ORCPT ); Thu, 7 May 2020 10:28:24 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CE88924959; Thu, 7 May 2020 14:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588861703; bh=vvdSzbEpBcmS5iWnBqJ8Fdmt3xvKYr6xWdUdjkVYuFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iTaPbQ2esZeZ03s0hxjNpTWqFu3VjjOck5+xb8HmulnMSOG4voI3Vn3x6rStl2Laf TMviOW3k3OD3itDIUgjH9/o+Q+cIm7J18jvjX9LpvwWs8Fp/HPZ6+V0T6NE0uT2eMg HOSv1ak5JdQhF5bE0/qVfspJkC54nmMH8cy53PAY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Vincenzo Frascino , Will Deacon , Szabolcs Nagy , Catalin Marinas , Sasha Levin , linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.6 44/50] arm64: vdso: Add -fasynchronous-unwind-tables to cflags Date: Thu, 7 May 2020 10:27:20 -0400 Message-Id: <20200507142726.25751-44-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200507142726.25751-1-sashal@kernel.org> References: <20200507142726.25751-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vincenzo Frascino [ Upstream commit 1578e5d03112e3e9d37e1c4d95b6dfb734c73955 ] On arm64 linux gcc uses -fasynchronous-unwind-tables -funwind-tables by default since gcc-8, so now the de facto platform ABI is to allow unwinding from async signal handlers. However on bare metal targets (aarch64-none-elf), and on old gcc, async and sync unwind tables are not enabled by default to avoid runtime memory costs. This means if linux is built with a baremetal toolchain the vdso.so may not have unwind tables which breaks the gcc platform ABI guarantee in userspace. Add -fasynchronous-unwind-tables explicitly to the vgettimeofday.o cflags to address the ABI change. Fixes: 28b1a824a4f4 ("arm64: vdso: Substitute gettimeofday() with C implementation") Cc: Will Deacon Reported-by: Szabolcs Nagy Signed-off-by: Vincenzo Frascino Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin --- arch/arm64/kernel/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile index dd2514bb1511f..3862cad2410cf 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -32,7 +32,7 @@ UBSAN_SANITIZE := n OBJECT_FILES_NON_STANDARD := y KCOV_INSTRUMENT := n -CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny +CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny -fasynchronous-unwind-tables ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y) -- 2.20.1