From patchwork Fri Oct 16 09:07:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 317805 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp1254922ilm; Fri, 16 Oct 2020 02:09:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO7T49uPQ1QiwoPdNohOed+p+wh+PKe923LD5dz51rw/bKyyMiMkWmq/E92PITIBxujeiP X-Received: by 2002:a50:d4dc:: with SMTP id e28mr2802571edj.137.1602839377500; Fri, 16 Oct 2020 02:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602839377; cv=none; d=google.com; s=arc-20160816; b=OKVso0b9q2xOOhIEfeqKmPN8iCCrrUH7pUxYVn9S8m5owZ6GQPFdfr7UdKSnOAwuNs AuUUcwTorLKxBu5zY/Yg1rVtOPc9sXNrA/hKySL7AFQyfeuZp+SHBgTnMuz989gFpGz4 w3LCxna723dDsTkdMRzhm3XuWE7FYIvYxZIoY+c6JVFVWk0uHoETJjnE/FQtnSwZljbX w962Ar88iFbsICvkCNGJk7h4K25wMnEeYu0lUTnxtA8nm0OpLSU5gL3d4SdUc4SeB5zd mr+IOstL1qKKD3FoNxhWqX1u0Gys0v8zT6QMYa1dwjsNCDRA0nQS+i3cvT/21I9KamDl PEJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ok56HGr5/lKgKCxrjUOcnn3oOcYaw5p8WAxVBbjX72E=; b=nsbBnioL+Wrykr7oGBVC2X3CUKGpT7jNgIQ8HX8mKMSpWO9qktNSNsjP8xwEDWM5tS qYPuhsYSkGItIFWJ+Wj7BYPfiMOwRScF/0R6jqFPp2vPUmUdQb1oFzeyiF8+1XlJCFvH odWQ0vuIKV7do8vgkMzCZQw5mDfZsxWGLazbGcCh5LYgBInPjtW5L0B3RMxaFJNiPjwW 8hOuOobLHMygzsqdaML/pTURqUjOzotarNPZN172jQy0ZV2+jyqKIEaj1xnYHFL9J3d2 Zt01o4SUhZvZGhLsOMkPpJGvPyEXMrxmPeNZJ9I9/ltzWL7E9K08yIPwXf1B0eUOJJqg 4yNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EPA0U57Z; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si1236056edq.532.2020.10.16.02.09.37; Fri, 16 Oct 2020 02:09:37 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=EPA0U57Z; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405565AbgJPJJf (ORCPT + 15 others); Fri, 16 Oct 2020 05:09:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:37980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395007AbgJPJJR (ORCPT ); Fri, 16 Oct 2020 05:09:17 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B96AA21556; Fri, 16 Oct 2020 09:09:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602839356; bh=+e/uitgR3t1bG0EJ3BLVPobcveEUtzgsLVdE9SoF+5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EPA0U57ZMENhdRorNhgHX5EpSiy5HHkIHj3rFQqo9YW2TGz+aoWSLWkaq/3OYIpMU LIeDo+I1mZJ1oqUqosOfaOg9P6hL3w4942dTJQBXJwIVH7vw5Fla9SjBJi+nA6Tnit 7IvFZ/gMe05diCI18baV5FsnzXiReRaSOG6gZ+MQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Jason A. Donenfeld" , Masahiro Yamada , Arnd Bergmann , Ard Biesheuvel , Russell King , Sasha Levin Subject: [PATCH 4.19 04/21] ARM: 8867/1: vdso: pass --be8 to linker if necessary Date: Fri, 16 Oct 2020 11:07:23 +0200 Message-Id: <20201016090437.519246900@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201016090437.301376476@linuxfoundation.org> References: <20201016090437.301376476@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jason A. Donenfeld [ Upstream commit c5d0e49e8d8f1a23034fdf8e935afc0c8f7ae27d ] The commit fe00e50b2db8 ("ARM: 8858/1: vdso: use $(LD) instead of $(CC) to link VDSO") removed the passing of CFLAGS, since ld doesn't take those directly. However, prior, big-endian ARM was relying on gcc to translate its -mbe8 option into ld's --be8 option. Lacking this, ld generated be32 code, making the VDSO generate SIGILL when called by userspace. This commit passes --be8 if CONFIG_CPU_ENDIAN_BE8 is enabled. Signed-off-by: Jason A. Donenfeld Cc: Masahiro Yamada Cc: Arnd Bergmann Cc: Ard Biesheuvel Signed-off-by: Russell King Signed-off-by: Sasha Levin --- arch/arm/vdso/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.25.1 diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile index fadf554d93917..1f5ec9741e6d4 100644 --- a/arch/arm/vdso/Makefile +++ b/arch/arm/vdso/Makefile @@ -10,9 +10,10 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector ccflags-y += -DDISABLE_BRANCH_PROFILING -ldflags-y = -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \ +ldflags-$(CONFIG_CPU_ENDIAN_BE8) := --be8 +ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \ -z max-page-size=4096 -z common-page-size=4096 \ - -nostdlib -shared \ + -nostdlib -shared $(ldflags-y) \ $(call ld-option, --hash-style=sysv) \ $(call ld-option, --build-id) \ -T