All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joey Gouly <joey.gouly@arm.com>
To: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>, <nd@arm.com>,
	<catalin.marinas@arm.com>, <keescook@chromium.org>,
	<masahiroy@kernel.org>, <will@kernel.org>
Subject: Re: [PATCH v4 0/4] Enable orphan-handling=warn for VDSO
Date: Tue, 19 Apr 2022 13:16:21 +0100	[thread overview]
Message-ID: <20220419121621.GA14856@e124191.cambridge.arm.com> (raw)
In-Reply-To: <734a9a68-2d87-dc06-b162-f949cecbbe82@arm.com>

Hi,

On Tue, Apr 19, 2022 at 12:10:25PM +0100, Vincenzo Frascino wrote:
> Hi Joey,
> 
> On 4/14/22 11:46 AM, Joey Gouly wrote:
> > Hi all,
> > 
> > This small series enables the orphan-handling linker flag for the VDSO.
> > This could catch subtle errors if features that use special sections are
> > introduced into the VDSO implementation.
> > 
> > Sorry for the extra version, I forgot to include Kees' and Vincenzo's 
> > reviewed-by tags. That's the only change to the patches.
> > 
> 
> The patches look fine. Could you please provide some test results with [1] or [2]?
> 
> [1] https://github.com/nlynch-mentor/vdsotest
> [2] <kernel_tree>/tools/testing/selftests/vDSO

Testing with the selftests:

$ ./vdso_test_abi
TAP version 13
1..16
[vDSO kselftest] VDSO_VERSION: LINUX_2.6.39
# The time is 1650369341.228566
ok 1
vdso_test_gettimeofday(): PASS
#
clock_id: CLOCK_REALTIME
# The time is 1650369341.229413165
ok 2
vdso_test_clock_gettime(): PASS
# The vdso resolution is 0 1
# The syscall resolution is 0 1
ok 3
vdso_test_clock_getres(): PASS
#
clock_id: CLOCK_BOOTTIME
# The time is 1524.388896408
ok 4
vdso_test_clock_gettime(): PASS
# The vdso resolution is 0 1
# The syscall resolution is 0 1
ok 5
vdso_test_clock_getres(): PASS
#
clock_id: CLOCK_TAI
# The time is 1650369341.231390753
ok 6
vdso_test_clock_gettime(): PASS
# The vdso resolution is 0 1
# The syscall resolution is 0 1
ok 7
vdso_test_clock_getres(): PASS
#
clock_id: CLOCK_REALTIME_COARSE
# The time is 1650369341.227127861
ok 8
vdso_test_clock_gettime(): PASS
# The vdso resolution is 0 4000000
# The syscall resolution is 0 4000000
ok 9
vdso_test_clock_getres(): PASS
#
clock_id: CLOCK_MONOTONIC
# The time is 1524.391519475
ok 10
vdso_test_clock_gettime(): PASS
# The vdso resolution is 0 1
# The syscall resolution is 0 1
ok 11
vdso_test_clock_getres(): PASS
#
clock_id: CLOCK_MONOTONIC_RAW
# The time is 1524.697386720
ok 12
vdso_test_clock_gettime(): PASS
# The vdso resolution is 0 1
# The syscall resolution is 0 1
ok 13
vdso_test_clock_getres(): PASS
#
clock_id: CLOCK_MONOTONIC_COARSE
# The time is 1524.389473326
ok 14
vdso_test_clock_gettime(): PASS
# The vdso resolution is 0 4000000
# The syscall resolution is 0 4000000
ok 15
vdso_test_clock_getres(): PASS
ok 16 # SKIP
vdso_test_time(): SKIP: Could not find __kernel_time
# Totals: pass:15 fail:0 xfail:0 xpass:0 skip:1 error:0

$ ./vdso_test_correctness
Warning: failed to find getcpu in vDSO
[RUN]   Testing clock_gettime for clock CLOCK_REALTIME (0)...
        1650369433.949718175 1650369433.949982211 1650369433.950033907
[OK]    Test Passed.
[RUN]   Testing clock_gettime for clock CLOCK_MONOTONIC (1)...
        1617.109425232 1617.109431840 1617.109434048
[OK]    Test Passed.
[RUN]   Testing clock_gettime for clock CLOCK_PROCESS_CPUTIME_ID (2)...
        0.039832960 0.039874448 0.039886448
[OK]    Test Passed.
[RUN]   Testing clock_gettime for clock CLOCK_THREAD_CPUTIME_ID (3)...
        0.040566320 0.040574576 0.040579552
[OK]    Test Passed.
[RUN]   Testing clock_gettime for clock CLOCK_MONOTONIC_RAW (4)...
        1617.415046976 1617.415057616 1617.415059712
[OK]    Test Passed.
[RUN]   Testing clock_gettime for clock CLOCK_REALTIME_COARSE (5)...
        1650369433.948175756 1650369433.948175756 1650369433.948175756
[OK]    Test Passed.
[RUN]   Testing clock_gettime for clock CLOCK_MONOTONIC_COARSE (6)...
        1617.110521230 1617.110521230 1617.110521230
[OK]    Test Passed.
[RUN]   Testing clock_gettime for clock CLOCK_BOOTTIME (7)...
        1617.113039789 1617.113044493 1617.113046269
[OK]    Test Passed.
[RUN]   Testing clock_gettime for clock CLOCK_REALTIME_ALARM (8)...
        1650369433.955192243 1650369433.955196547 1650369433.955199811
[OK]    Test Passed.
[RUN]   Testing clock_gettime for clock CLOCK_BOOTTIME_ALARM (9)...
        1617.114074714 1617.114079690 1617.114083210
[OK]    Test Passed.
[RUN]   Testing clock_gettime for clock CLOCK_SGI_CYCLE (10)...
[OK]    No such clock.
[RUN]   Testing clock_gettime for clock CLOCK_TAI (11)...
        1650369433.956495555 1650369433.956498307 1650369433.956500003
[OK]    Test Passed.
[RUN]   Testing clock_gettime for clock invalid (-1)...
[OK]    No such clock.
[RUN]   Testing clock_gettime for clock invalid (-2147483648)...
[OK]    No such clock.
[RUN]   Testing clock_gettime for clock invalid (2147483647)...
[OK]    No such clock.
[SKIP]  No vDSO, so skipping clock_gettime64() tests
[RUN]   Testing gettimeofday...
        1650369433.958323 1650369433.958397 1650369433.958470
[OK]    timezones match: minuteswest=0, dsttime=0
[RUN]   Testing getcpu...
[OK]    CPU 0: syscall: cpu 0, node 0

$ ./vdso_test_gettimeofday
The time is 1650369462.312523

$ ./vdso_test_clock_getres
clock_id: CLOCK_REALTIME [PASS]
clock_id: CLOCK_BOOTTIME [PASS]
clock_id: CLOCK_TAI [PASS]
clock_id: CLOCK_REALTIME_COARSE [PASS]
clock_id: CLOCK_MONOTONIC [PASS]
clock_id: CLOCK_MONOTONIC_RAW [PASS]
clock_id: CLOCK_MONOTONIC_COARSE [PASS]

$ ./vdso_test_getcpu
Could not find __vdso_getcpu


So there was 2 potential issues:
- vdso_test_time(): SKIP: Could not find __kernel_time
- Could not find __vdso_getcpu

I'm not sure what these are, maybe they don't work on arm64 or it's a kernel config issue.

Thanks,
Joey

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-04-19 13:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14 10:46 [PATCH v4 0/4] Enable orphan-handling=warn for VDSO Joey Gouly
2022-04-14 10:46 ` [PATCH v4 1/4] arm64: vdso: put ELF related sections in the linker script Joey Gouly
2022-04-14 10:46 ` [PATCH v4 2/4] arm64: vdso: enable orphan handling for VDSO Joey Gouly
2022-04-14 10:46 ` [PATCH v4 3/4] arm64: vdso32: put ELF related sections in the linker script Joey Gouly
2022-04-14 17:22   ` Kees Cook
2022-04-19 11:00   ` Vincenzo Frascino
2022-04-14 10:46 ` [PATCH v4 4/4] arm64: vdso32: enable orphan handling for VDSO Joey Gouly
2022-04-14 17:22   ` Kees Cook
2022-04-19 11:01   ` Vincenzo Frascino
2022-04-19 11:10 ` [PATCH v4 0/4] Enable orphan-handling=warn " Vincenzo Frascino
2022-04-19 12:16   ` Joey Gouly [this message]
2022-04-19 12:53     ` Vincenzo Frascino
2022-04-27 18:20 ` Catalin Marinas
2022-04-28 16:11   ` Joey Gouly

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=20220419121621.GA14856@e124191.cambridge.arm.com \
    --to=joey.gouly@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=masahiroy@kernel.org \
    --cc=nd@arm.com \
    --cc=vincenzo.frascino@arm.com \
    --cc=will@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.