Open shrik3 opened 2 weeks ago
Note: regarding vdso symbols see man vDSO (7)
Interesting, I will give it a look later.
I can repro similar issue happened in x86.
On Tue Jul 9, 2024 at 5:01 PM CEST, QuarkSoft wrote:
I can repro similar issue happened in x86.
For x86, are you using arch specify vdso symbol names? i.e. instead of
kernel_rt_sigreturn kernel_gettimeofday kernel_clock_gettime kernel_clock_getres
use
vdso_clock_gettime vdso_getcpu __vdso_gettimeofday __vdso_time
Yes. I did the change.
From: Tianhao Wang @.***> Sent: Tuesday, July 9, 2024 8:24 AM To: QuarkContainer/Quark Cc: Yulin Sun; Assign Subject: Re: [QuarkContainer/Quark] aarch64: userspace fails to parse vdso through auxv (Issue #1324)
On Tue Jul 9, 2024 at 5:01 PM CEST, QuarkSoft wrote:
I can repro similar issue happened in x86.
For x86, are you using arch specify vdso symbol names? i.e. instead of
kernel_rt_sigreturn kernel_gettimeofday kernel_clock_gettime kernel_clock_getres
use
vdso_clock_gettime vdso_getcpu __vdso_gettimeofday __vdso_time
— Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_QuarkContainer_Quark_issues_1324-23issuecomment-2D2218012267&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=DlVd8EA60eTawMXHolu8r3SI1kM4__hdCe61U_easzU&m=p0FBFjvdqF74dcfSeVh3n2MquzGtLIFo5rrQn-GCb4079mlgZu1fWcipZmu9fh2f&s=foEkgOVlQZ6_mznmXimUkLoqUdO4lzVzcISdvH6T1m4&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ATC5KBHBITFY7S7VC4DUMGTZLP6DLAVCNFSM6AAAAABKSOBW5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJYGAYTEMRWG4&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=DlVd8EA60eTawMXHolu8r3SI1kM4__hdCe61U_easzU&m=p0FBFjvdqF74dcfSeVh3n2MquzGtLIFo5rrQn-GCb4079mlgZu1fWcipZmu9fh2f&s=M_SWwVBPUty6cxwJvGwRbNWwiFeEl4od69BIFzMvZ4Q&e=. You are receiving this because you were assigned.Message ID: @.***>
Looks like our vdso binary build has issue. I tried to use https://github.com/enarx/vdso to parse our vdso.so and get wrong result.
for x86, we need to change the test code
vdso_sym("LINUX_2.6", "vdso_clock_gettime")) instead of vdso_sym("LINUX_2.6.39", "vdso_clock_gettime"))
Then it will work.
So it is false alarm for x86.
test code (note: should be GPL but I forgot where the code was from).
https://paste.sr.ht/blob/2bd3b5a16686b99fe4790d298d90d6a38c90f3a8
on native aarch64 (kernel 5.15)
with Quark:
(note: I didn't include @chl337 's vdso patch as it has nothing to do with userspace and auxv)