Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp319238ybi; Fri, 31 May 2019 01:55:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7D6Bz6+krPRuNDwGnTB19rubYaEQGQvhEnVE6BI2J+Ed9KMTQ4Mkemx2pLmwfTK1PSk7E X-Received: by 2002:a17:90a:195e:: with SMTP id 30mr7896951pjh.116.1559292916853; Fri, 31 May 2019 01:55:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559292916; cv=none; d=google.com; s=arc-20160816; b=dHTTpI/1NAtfzlrHfROVy5W1u0MRqeChQgQhAFVUDj9LZjo4CPMWaQ10wTp2BqaKHh M7JKdYngxZQAfUbJNYXMEfrvq3eoRTNqjjHB+G4JcEHg3zkP+uqiu52t+5GdCFrLchtv 6KSEznfrBrplMr5z19yGO6AFkWxFuZYwcrUEeXUOTj9W+RV0AvWd55sKtOMHawIWEEKO hPmlw5oODCHZrbOQLVDhhy2EdnJeEFi58Yd3AU8xmd4e3ONh+3vVpfai2NgEK8a2F+Tx al5nTo1nDRoE2KTO1G+5bRq3o35cen20iiiJyuyHzPW87dHmgTEuU5whf8DG4/4/GuwX lv3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=PLETH2OB3IxfKN1eggOuRioC9EOnLLXN9MFUnFFew5s=; b=YlI8uxNUro3mHY+fadQfEGr5QwKwQ5fvKPjYapwSc1AkyGVrGWrJo992VuFtJon00T oExfBs6vo4H1KohuIrk5OOIOqnPfYFOly1JB7Q84e5+cwDplukMVAmyH+CowTqBmO++E S05HJ2Qyvb3kBBB2eNl5JVSoJBny61encwzQFQx0Zp+Ww4Bb6K1waZtNI+0aCzZyZOXD uV6MqYO4cjASCczr2mIo8gDnbUmrQxH8LzkI4X07j1gkPaB3rKi23S/ACvySvTwxS5/M YfkcK6hh5FFWewsEBhtpi56/hX45nr/j5JMd1tfzQcRT7yxoJ2s8okKoTE0XMmUCAozA i1Dw== 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 d19si5935784pfr.70.2019.05.31.01.55.00; Fri, 31 May 2019 01:55:16 -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 S1726843AbfEaIx5 (ORCPT + 99 others); Fri, 31 May 2019 04:53:57 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:37964 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbfEaIx4 (ORCPT ); Fri, 31 May 2019 04:53:56 -0400 Received: by mail-qt1-f195.google.com with SMTP id l3so10448081qtj.5; Fri, 31 May 2019 01:53:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PLETH2OB3IxfKN1eggOuRioC9EOnLLXN9MFUnFFew5s=; b=sUN03/0C+hMfoQOP6ZAjoEeEQifClVYy2S6TWneDAJ5QdQyBkIgzcSZWQR0WSR8Iki pp2QmTbaCo70vduP2EVL51XRLgZYCsZ+PoRC74vNatvcPLRw4D+i+5NDMLEZInyIi0kz zkZXlATQiq5h0fd6GneSufHqHYEIAiTTDxhGHpir+y0iK2qnvvG42qRLwJjb2P4zqRbY h1i6AxXl4nzwW9fuUBLLXLWYDYpS4CoX+4nZVHvlI/YoSVqpWsvFondqvpK9gJY64JQy iPwnR+6BbrDjUbL4jLgzJ81sqCxf4M1fBq7XlQ707HY+9+58m0OyrEOGa6/yYbJ9l6vz larw== X-Gm-Message-State: APjAAAV35WBhXvJTPyULaJb7pxdJkd5WKb/32zeL3Jfdss7hk2gZIrm6 5KE6cfLOZjpQX8b9hH5JkxKclT+ebRNtS7g7K/Y= X-Received: by 2002:a0c:9e0f:: with SMTP id p15mr7638581qve.176.1559292835687; Fri, 31 May 2019 01:53:55 -0700 (PDT) MIME-Version: 1.0 References: <20190530141531.43462-1-vincenzo.frascino@arm.com> <20190530141531.43462-20-vincenzo.frascino@arm.com> In-Reply-To: <20190530141531.43462-20-vincenzo.frascino@arm.com> From: Arnd Bergmann Date: Fri, 31 May 2019 10:53:39 +0200 Message-ID: Subject: Re: [PATCH v6 19/19] kselftest: Extend vDSO selftest To: Vincenzo Frascino Cc: linux-arch , Linux ARM , Linux Kernel Mailing List , linux-mips@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" , Catalin Marinas , Will Deacon , 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 Content-Type: text/plain; charset="UTF-8" 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 4:16 PM Vincenzo Frascino wrote: > +/* > + * ARM64's vDSO exports its vDSO implementation with different names and > + * a different version from other architectures, so we need to handle it > + * as a special case. > + */ > +#if defined(__aarch64__) > +const char *version = "LINUX_2.6.39"; > +const char *name[4] = { > + "__kernel_gettimeofday", > + "__kernel_clock_gettime", > + "__kernel_time", > + "__kernel_clock_getres", > +}; > +#else > +/* Tested on x86, arm, mips */ > +const char *version = "LINUX_2.6"; > +const char *name[4] = { > + "__vdso_gettimeofday", > + "__vdso_clock_gettime", > + "__vdso_time", > + "__vdso_clock_getres", > +}; > +#endif I see the __kernel_* name used on arm64, powerpc and s390, whiel the __vdso_* name is used on arm, mips, nds32, riscv, sparc, and x86. Also the versions have more variants: $ git ls-files arch | grep vdso | xargs grep '\(LINUX_[2345]\|VDSO_VERSION_STRING\)' arch/arm/vdso/vdso.lds.S: LINUX_2.6 { arch/arm64/kernel/vdso/vdso.lds.S: LINUX_2.6.39 { arch/mips/vdso/vdso.lds.S: LINUX_2.6 { arch/nds32/kernel/vdso/vdso.lds.S: LINUX_4 { arch/powerpc/include/asm/vdso.h:#define VDSO_VERSION_STRING LINUX_2.6.15 arch/powerpc/kernel/vdso32/vdso32.lds.S: VDSO_VERSION_STRING { arch/powerpc/kernel/vdso64/vdso64.lds.S: VDSO_VERSION_STRING { arch/riscv/kernel/vdso/vdso.lds.S: LINUX_4.15 { arch/s390/include/asm/vdso.h:#define VDSO_VERSION_STRING LINUX_2.6.29 arch/s390/kernel/vdso32/vdso32.lds.S: VDSO_VERSION_STRING { arch/s390/kernel/vdso64/vdso64.lds.S: VDSO_VERSION_STRING { arch/sparc/vdso/vdso.lds.S: LINUX_2.6 { arch/sparc/vdso/vdso32/vdso32.lds.S: LINUX_2.6 { arch/x86/entry/vdso/vdso.lds.S: LINUX_2.6 { arch/x86/entry/vdso/vdso32/vdso32.lds.S: LINUX_2.6 { arch/x86/entry/vdso/vdso32/vdso32.lds.S: LINUX_2.5 { arch/x86/entry/vdso/vdsox32.lds.S: LINUX_2.6 { arch/x86/um/vdso/vdso.lds.S: LINUX_2.6 { Maybe change the test case to just try all combinations of the above (and __vdso_clock_gettime64 as well) and stop checking the architecture? Arnd