All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH V3] vDSO for SPARC
Date: Fri, 11 Aug 2017 12:23:26 +0000	[thread overview]
Message-ID: <87inhu1ef5.fsf@esperi.org.uk> (raw)
In-Reply-To: <1502400887-281290-1-git-send-email-nagarathnam.muthusamy@oracle.com>

On 11 Aug 2017, Nagarathnam Muthusamy verbalised:

> On 08/10/2017 03:03 PM, David Miller wrote:
>> From: Nagarathnam Muthusamy <nagarathnam.muthusamy@oracle.com>
>> 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)

  parent reply	other threads:[~2017-08-11 12:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 21:34 [PATCH V3] vDSO for SPARC Nagarathnam Muthusamy
2017-08-10 22:03 ` David Miller
2017-08-10 23:13 ` Nagarathnam Muthusamy
2017-08-11 12:23 ` Nick Alcock [this message]
2017-08-15  5:35 ` David Miller
2017-09-10  3:41 ` David Miller
2017-09-11  4:03 ` David Miller
2017-09-11 14:34 ` Nick Alcock
2017-09-21 15:12 ` nagarathnam muthusamy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87inhu1ef5.fsf@esperi.org.uk \
    --to=nick.alcock@oracle.com \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.