From patchwork Fri Aug 11 12:23:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nick Alcock X-Patchwork-Id: 800533 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=sparclinux-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xTPLH4l5kz9t16 for ; Fri, 11 Aug 2017 22:23:35 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752610AbdHKMXf (ORCPT ); Fri, 11 Aug 2017 08:23:35 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:41689 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752616AbdHKMXe (ORCPT ); Fri, 11 Aug 2017 08:23:34 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v7BCNUnE027682 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 11 Aug 2017 12:23:30 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v7BCNTD8019039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 11 Aug 2017 12:23:30 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v7BCNTXg027636; Fri, 11 Aug 2017 12:23:29 GMT Received: from loom (/81.187.191.129) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 11 Aug 2017 05:23:28 -0700 From: Nick Alcock To: Nagarathnam Muthusamy Cc: David Miller , sparclinux@vger.kernel.org, pasha.tatashin@oracle.com Subject: Re: [PATCH V3] vDSO for SPARC References: <1502400887-281290-1-git-send-email-nagarathnam.muthusamy@oracle.com> <20170810.150308.866379816687061520.davem@davemloft.net> <9e6ba7c2-be99-92ff-e8cb-b64eef143c64@oracle.com> Emacs: Lovecraft was an optimist. Date: Fri, 11 Aug 2017 13:23:26 +0100 In-Reply-To: <9e6ba7c2-be99-92ff-e8cb-b64eef143c64@oracle.com> (Nagarathnam Muthusamy's message of "Thu, 10 Aug 2017 16:13:04 -0700") Message-ID: <87inhu1ef5.fsf@esperi.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org On 11 Aug 2017, Nagarathnam Muthusamy verbalised: > On 08/10/2017 03:03 PM, David Miller wrote: >> From: Nagarathnam Muthusamy >> Date: Thu, 10 Aug 2017 17:34:47 -0400 >> >>> Following patch is based on work done by Nick Alcock on 64-bit vDSO for sparc >>> in Oracle linux. I have extended it to include support for 32-bit vDSO for sparc >>> on 64-bit kernel. >> This doesn't build: >> >> davem@patience:~/src/GIT/sparc-next$ make -s -j128 >> In file included from arch/sparc/vdso/vdso2c.c:141:0: >> arch/sparc/vdso/vdso2c.h: In function ‘go64’: >> arch/sparc/vdso/vdso2c.h:20:14: warning: variable ‘secstrings’ set but not used [-Wunused-but-set-variable] >> const char *secstrings; secstrings and secstrings_hdr can be removed, or can be used in the following loop to make it a bit less squirrelly: up to you. (However, see below, because this may be a sign of the underlying problem.) >> ^~~~~~~~~~ >> In file included from arch/sparc/vdso/vdso2c.c:145:0: >> arch/sparc/vdso/vdso2c.h: In function ‘go32’: >> arch/sparc/vdso/vdso2c.h:20:14: warning: variable ‘secstrings’ set but not used [-Wunused-but-set-variable] >> const char *secstrings; >> ^~~~~~~~~~ >> Error: vvar_begin must be a multiple of 8192 >> make[2]: *** [arch/sparc/vdso/vdso-image-64.c] Error 1 >> make[2]: *** Waiting for unfinished jobs.... >> Error: vvar_begin must be a multiple of 8192 >> make[2]: *** [arch/sparc/vdso/vdso-image-32.c] Error 1 >> make[1]: *** [arch/sparc/vdso] Error 2 >> >> >> davem@patience:~/src/GIT/sparc-next$ gcc --version >> gcc (GCC) 6.3.0 >> Copyright (C) 2016 Free Software Foundation, Inc. >> This is free software; see the source for copying conditions. There is NO >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > My gcc version is bit old (4.4.7) and the build passed in my system. I will reproduce the errors locally, fix them > and send out an updated patch. If this is any problem, it's a linker problem, or a problem with the code in vdso2c around required_syms which sets up sym_vvar_start to be equal to .vvar_start, since as you see here: + if (syms[sym_vvar_start] % 8192) + fail("vvar_begin must be a multiple of 8192\n"); and here: --- /dev/null +++ b/arch/sparc/vdso/vdso-layout.lds.S @@ -0,0 +1,106 @@ [...] +SECTIONS +{ + /* + * User/kernel shared data is before the vDSO. This may be a little + * uglier than putting it after the vDSO, but it avoids issues with + * non-allocatable things that dangle past the end of the PT_LOAD + * segment. + */ + + vvar_start = . -PAGE_SIZE; + vvar_data = vvar_start; + + . = SIZEOF_HEADERS; unless you have a really serious linker bug, there is no way vvar_start could fail to be at a multiple of 8192 bytes, AFAICS, and sym_vvar_start should have been set up by vdso2c to point right at it. The set but not used variable stuff suggests you've been doing stuff inside vdso2c, which I was just able to carry across unmodified from x86 and which worked fine when I did that. I bet some of that is somehow broken and the various symbol references in the vdso2c output are wrong somehow. -- NULL && (void) -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html