From: Vincenzo Frascino <vincenzo.frascino@arm.com>
To: "H. Nikolaus Schaller" <hns@goldelico.com>,
Maarten ter Huurne <maarten@treewalker.org>
Cc: mips-creator-ci20-dev@googlegroups.com,
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>,
Discussions about the Letux Kernel
<letux-kernel@openphoenux.org>
Subject: Re: MIPS: bug: gettimeofday syscall broken on CI20 board
Date: Thu, 28 Nov 2019 14:01:01 +0000 [thread overview]
Message-ID: <64ee0c3e-9a54-f86a-daf5-32d54454b8ad@arm.com> (raw)
In-Reply-To: <01D75E67-EC2E-4C74-B9BB-752773C481A9@goldelico.com>
[-- Attachment #1: Type: text/plain, Size: 2132 bytes --]
On 28/11/2019 13:48, H. Nikolaus Schaller wrote:
>
>> Am 28.11.2019 um 14:29 schrieb Maarten ter Huurne <maarten@treewalker.org>:
>>
>> On Thursday, 28 November 2019 13:33:17 CET H. Nikolaus Schaller wrote:
>>> Hi Vincenzo,
>>>
>>>> Am 28.11.2019 um 13:21 schrieb Vincenzo Frascino
>>>> <vincenzo.frascino@arm.com>:>
>>>> [...]
>>>> 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?
>>
>> I'm a novice when it comes to vDSO, so someone please correct me if I'm
>> wrong.
>>
>> From what I read vDSO is a library in the sense that it exports ELF
>> symbols that applications and other libraries (libc in particular) can
>> use, but it is not a file on disk.
>
> Ah, ok. This would mean that the libc providing the gettimeofday()
> should be able to find out a modified changed vdso_data format by
> inspecting these ELF symbols.
>
I agree with Maarten here. There is a discovery mechanism in the libc based on
AT_SYSINFO_EHDR. This contains the address at which the vdso library is mapped
by the kernel to the userspace process.
>>
>> As such, which rootfs you use shouldn't matter, since the vDSO is not in
>> the rootfs. Instead, it is contained in the kernel image. Searching for
>> "linux-vdso.so.1" on packages.debian.org indeed returns no hits.
>>
>> There is a check in arch/mips/vdso/Makefile that disables vDSO on MIPS
>> when building the kernel with binutils < 2.25. I don't know if that is
>> in any way related to this issue.
>
> What still does not fit into the picture is the errno = 1 i.e. EPERM.
> Maybe I have to study the libc code that tries to read the ELF symbols
> you have mentioned. It may fail for unknown reasons.
>
This is what I was going to suggest next. It might be that something is not
working there.
Let us know your findings.
> BR and thanks,
> Nikolaus
>
--
Regards,
Vincenzo
[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 14291 bytes --]
next prev parent reply other threads:[~2019-11-28 14:01 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
2019-11-28 13:29 ` Maarten ter Huurne
2019-11-28 13:48 ` H. Nikolaus Schaller
2019-11-28 14:01 ` Vincenzo Frascino [this message]
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=64ee0c3e-9a54-f86a-daf5-32d54454b8ad@arm.com \
--to=vincenzo.frascino@arm.com \
--cc=hns@goldelico.com \
--cc=letux-kernel@openphoenux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=maarten@treewalker.org \
--cc=mips-creator-ci20-dev@googlegroups.com \
--cc=paul.burton@mips.com \
--cc=ralf@linux-mips.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 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).