linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Paul Burton <paul.burton@mips.com>,
	linux-mips@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	MIPS Creator CI20 Development 
	<mips-creator-ci20-dev@googlegroups.com>,
	Discussions about the Letux Kernel 
	<letux-kernel@openphoenux.org>
Subject: Re: MIPS: bug: gettimeofday syscall broken on CI20 board
Date: Thu, 28 Nov 2019 13:33:17 +0100	[thread overview]
Message-ID: <D1CE4D1E-9A42-4FAE-90A9-615C38B979C0@goldelico.com> (raw)
In-Reply-To: <7b6275c7-ab2b-a647-6bf7-d5e1c4523c98@arm.com>

Hi Vincenzo,

> Am 28.11.2019 um 13:21 schrieb Vincenzo Frascino <vincenzo.frascino@arm.com>:
> 
> On 28/11/2019 12:11, H. Nikolaus Schaller wrote:
>> 
>>> Am 28.11.2019 um 12:51 schrieb Vincenzo Frascino <vincenzo.frascino@arm.com>:
>>> 
>>> Hi Nikolaus,
>>> 
>>> On 27/11/2019 13:53, H. Nikolaus Schaller wrote:
>>> [...]
>>> 
>>>>> vdso_data and mips_vdso_data before are not part of the ABI hence they are not
>>>>> bind by a contract with the userspace.
>>>>> 
>>>>> This means that they can change at any point and if a userspace software relies
>>>>> on a specific layout of these data structures is doing something wrong.
>>>> 
>>>> Maybe the libs are clever enough to find that out dynamically but I have no
>>>> idea about how gettimeofday() and user-space VDSO is implemented to handle such
>>>> changes.
>>>> 
>>> As I said userspace applications and libraries should not rely on the layout of
>>> vdso_data because this is not part of the ABI.
>>> 
>>> The only thing that userspace requires is to "know" that gettimeofday() exists,
>>> than it is gettimeofday() that internally accesses the data structure.
>> 
>> Well, with user-space I include the lib that provides the gettimeofday() syscall
>> and reads out the memory region where the VDSO data structure is provided by the
>> kernel. And that part comes from Debian. Somehow it does differently with 4.19
>> than 5.4. So I summarise all non-kernel code with the term "user-space".
>> 
> 
> The the lib that provides the gettimeofday() changes accordingly with vdso_data.
> 5.4 and 4.19 have 2 different vdso libraries as well.

Yes, that is what I have assumed what happens. How do these libs go into an existing
and working root-file-system with Debian Stretch?

Is it part of the linux kernel tree so that some make option can build it and we can
install it like kernel modules (sorry for these beginners questions. I never did care
about VDSO before I ran into this problem)?

Is there a mechanism that Debian Stretch knows about the newer library
and can automatically find out which one to install.

This is what I mean with breaking user-space ABI.

Or must the user know about that and do a manual install of the vdso libs from external
sources?

If that is the case there should be at least a CONFIG option to provide the
older vdso_data or the option to completely disable VDSO for gettimeofday()
so that the library falls back to a traditional syscall.

BR and thanks,
Nikolaus




  reply	other threads:[~2019-11-28 12:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 16:21 MIPS: bug: gettimeofday syscall broken on CI20 board? H. Nikolaus Schaller
2019-11-17 13:14 ` MIPS: bug: gettimeofday syscall broken on CI20 board H. Nikolaus Schaller
2019-11-23  7:29   ` H. Nikolaus Schaller
2019-11-26 10:52   ` MIPS: " Vincenzo Frascino
2019-11-27 13:53     ` H. Nikolaus Schaller
2019-11-27 14:29       ` H. Nikolaus Schaller
2019-11-28 12:05         ` Vincenzo Frascino
2019-11-28 12:16           ` H. Nikolaus Schaller
2019-11-28 14:04             ` Vincenzo Frascino
2019-11-28 15:10               ` H. Nikolaus Schaller
2019-11-28 11:51       ` Vincenzo Frascino
2019-11-28 12:11         ` H. Nikolaus Schaller
2019-11-28 12:21           ` Vincenzo Frascino
2019-11-28 12:33             ` H. Nikolaus Schaller [this message]
2019-11-28 13:29               ` Maarten ter Huurne
2019-11-28 13:48                 ` H. Nikolaus Schaller
2019-11-28 14:01                   ` Vincenzo Frascino
2019-11-28 15:42                     ` H. Nikolaus Schaller
2019-11-28 15:07                   ` Thomas Bogendoerfer
2019-11-28 15:41                     ` H. Nikolaus Schaller
2019-11-28 15:46                       ` Vincenzo Frascino
2019-11-28 16:47                         ` H. Nikolaus Schaller
2019-11-29  8:57                           ` Vincenzo Frascino
2019-11-29 10:53                             ` Vincenzo Frascino
2019-11-29 11:51                               ` H. Nikolaus Schaller
2019-12-01  3:08                         ` [PATCH] Mips32 gettimeofday fix kbuild test robot

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=D1CE4D1E-9A42-4FAE-90A9-615C38B979C0@goldelico.com \
    --to=hns@goldelico.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mips-creator-ci20-dev@googlegroups.com \
    --cc=paul.burton@mips.com \
    --cc=ralf@linux-mips.org \
    --cc=vincenzo.frascino@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).