Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1689005ybi; Sat, 1 Jun 2019 02:40:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiF62iavbzn/uFLzWL35rfDPDCcKHWy3TrnFSxXf2F84urp7BSdcol5EJH48sDXiJWB2m2 X-Received: by 2002:a62:65c7:: with SMTP id z190mr15875189pfb.73.1559382009149; Sat, 01 Jun 2019 02:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559382009; cv=none; d=google.com; s=arc-20160816; b=GLI5Af+//1O5uuVwNNLz2htBRaBs871UM2H6w5ltyiz8zj0UC0Xsm81PTTeTXUl3bf KIUK3Q2ZL87jTD0MeALxSqsdbJ79vQb99XOFpVyN5st/Yo6olioudINbYpgY85Ipe7vi 1qsJROFO0eqtd9F0CsF9/AgQ9ZvfqQ5oVZU9jgdv1b/r5SW22QrzHalHexfqTxOkZbOT 9qXdlQApiL/uYLm3LvZFmYSxpz+D5eZAJRRnVCztOras9ZZFIidG14y/jjdMtVLF5sy7 5UdsWQV+LZO0rf/m/yATsaLh2SD91/Ub/l9Cj1DnS/v4RtSWXZl851g30TBC5g5P2AIg V6gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Xjl01VBwSzIDJKnAogZPROXtl5cEoQXIw3S8q5R5Oqw=; b=YkHE0qiKwqd27VX4q/wwDyrqqMCbLXS3IASoXJa0m0SMuqDppLUB6M8v7vPx/CyHsA UoLCI1acHefyUpXPxloXG7YF9wVFKbdpBA7roKOHNFhcBxqfJ8iJmyCx4r+IGnCGnzAB VD+B7H8FcVKDUhw5Yw/rDVm5KIgZwuqSqt2UZjjrn1xGAvIAB3WzOmG9CrAXD6C3aOUH 6vKr3kvE7RTAcuBen76Lmn3tSSe3IiuyD+oix5Fj85XdwpsyhNDXXpyrDnThYeQdR5+C D1v3HUOhf9oQQhEkv/IdcxiAxhioXiuIychenfNCmTuPaINzblPi+qqbSqy4P4/6Ovrc Wg4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10si9472176pgp.529.2019.06.01.02.39.50; Sat, 01 Jun 2019 02:40:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbfFAJih (ORCPT + 99 others); Sat, 1 Jun 2019 05:38:37 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33072 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbfFAJig (ORCPT ); Sat, 1 Jun 2019 05:38:36 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0B916341; Sat, 1 Jun 2019 02:38:36 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E630B3F5AF; Sat, 1 Jun 2019 02:38:32 -0700 (PDT) Date: Sat, 1 Jun 2019 10:38:30 +0100 From: Catalin Marinas To: Vincenzo Frascino Cc: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-kselftest@vger.kernel.org, Will Deacon , Arnd Bergmann , Russell King , Ralf Baechle , Paul Burton , Daniel Lezcano , Thomas Gleixner , Mark Salyzyn , Peter Collingbourne , Shuah Khan , Dmitry Safonov <0x7f454c46@gmail.com>, Rasmus Villemoes , Huw Davies Subject: Re: [PATCH v6 15/19] arm64: Add vDSO compat support Message-ID: <20190601093830.GA13589@arrakis.emea.arm.com> References: <20190530141531.43462-1-vincenzo.frascino@arm.com> <20190530141531.43462-16-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190530141531.43462-16-vincenzo.frascino@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 30, 2019 at 03:15:27PM +0100, Vincenzo Frascino wrote: > Add vDSO compat support to the arm64 building system. > > Cc: Catalin Marinas > Cc: Will Deacon > Signed-off-by: Vincenzo Frascino > --- > arch/arm64/Kconfig | 1 + > arch/arm64/Makefile | 23 +++++++++++++++++++++-- > arch/arm64/kernel/Makefile | 6 +++++- > 3 files changed, 27 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 952c9f8cf3b8..3e1d4f8347f4 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -108,6 +108,7 @@ config ARM64 > select GENERIC_STRNLEN_USER > select GENERIC_TIME_VSYSCALL > select GENERIC_GETTIMEOFDAY > + select GENERIC_COMPAT_VDSO if !CPU_BIG_ENDIAN This select needs to also depend on COMPAT (or rather be selected from the COMPAT menuconfig), otherwise, trying to build this series with 64K pages where COMPAT is disabled, I get: VDSOC_GTD arch/arm64/kernel/vdso32/vgettimeofday.o VDSOA arch/arm64/kernel/vdso32/sigreturn.o arch/arm64/kernel/vdso32/sigreturn.S: Assembler messages: arch/arm64/kernel/vdso32/sigreturn.S:25: Error: expected #constant arch/arm64/kernel/vdso32/sigreturn.S:35: Error: expected #constant arch/arm64/kernel/vdso32/sigreturn.S:46: Error: expected #constant arch/arm64/kernel/vdso32/sigreturn.S:56: Error: expected #constant arch/arm64/kernel/vdso32/sigreturn.S:28: Error: undefined symbol __NR_compat_sigreturn used as an immediate value arch/arm64/kernel/vdso32/sigreturn.S:38: Error: undefined symbol __NR_compat_rt_sigreturn used as an immediate value make[2]: *** [arch/arm64/kernel/vdso32/Makefile:154: arch/arm64/kernel/vdso32/sigreturn.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from lib/vdso/gettimeofday.c:25:0, from :0: arch/arm64/include/asm/vdso/compat_gettimeofday.h: In function 'gettimeofday_fallback': arch/arm64/include/asm/vdso/compat_gettimeofday.h:22:31: error: '__NR_compat_gettimeofday' undeclared (first use in this function); did you mean '__NR_gettimeofday'? register long nr asm("r7") = __NR_compat_gettimeofday; ^~~~~~~~~~~~~~~~~~~~~~~~ __NR_gettimeofday arch/arm64/include/asm/vdso/compat_gettimeofday.h:22:31: note: each undeclared identifier is reported only once for each function it appears in arch/arm64/include/asm/vdso/compat_gettimeofday.h: In function 'clock_gettime_fallback': arch/arm64/include/asm/vdso/compat_gettimeofday.h:40:31: error: '__NR_compat_clock_gettime64' undeclared (first use in this function); did you mean '__NR_clock_gettime'? register long nr asm("r7") = __NR_compat_clock_gettime64; ^~~~~~~~~~~~~~~~~~~~~~~~~~~ __NR_clock_gettime arch/arm64/include/asm/vdso/compat_gettimeofday.h: In function 'clock_getres_fallback': arch/arm64/include/asm/vdso/compat_gettimeofday.h:58:31: error: '__NR_compat_clock_getres_time64' undeclared (first use in this function); did you mean '__NR_clock_gettime'? register long nr asm("r7") = __NR_compat_clock_getres_time64; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __NR_clock_gettime arch/arm64/kernel/vdso32/vgettimeofday.c: In function '__vdso_clock_gettime': arch/arm64/kernel/vdso32/vgettimeofday.c:15:17: error: 'TASK_SIZE_32' undeclared (first use in this function); did you mean 'TASK_SIZE_64'? if ((u32)ts >= TASK_SIZE_32) ^~~~~~~~~~~~ TASK_SIZE_64 arch/arm64/kernel/vdso32/vgettimeofday.c: In function '__vdso_clock_gettime64': arch/arm64/kernel/vdso32/vgettimeofday.c:25:17: error: 'TASK_SIZE_32' undeclared (first use in this function); did you mean 'TASK_SIZE_64'? if ((u32)ts >= TASK_SIZE_32) ^~~~~~~~~~~~ TASK_SIZE_64 arch/arm64/kernel/vdso32/vgettimeofday.c: In function '__vdso_clock_getres': arch/arm64/kernel/vdso32/vgettimeofday.c:41:18: error: 'TASK_SIZE_32' undeclared (first use in this function); did you mean 'TASK_SIZE_64'? if ((u32)res >= TASK_SIZE_32) ^~~~~~~~~~~~ TASK_SIZE_64 make[2]: *** [arch/arm64/kernel/vdso32/Makefile:152: arch/arm64/kernel/vdso32/vgettimeofday.o] Error 1 make[1]: *** [arch/arm64/Makefile:182: vdso_prepare] Error 2 make: *** [Makefile:179: sub-make] Error 2 -- Catalin