From: Andrei Vagin <avagin@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Dmitry Safonov <dima@arista.com>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Will Deacon <will@kernel.org>,
Christian Brauner <christian.brauner@ubuntu.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/6] arm64/vdso: use the fault callback to map vvar pages
Date: Sun, 26 Jul 2020 23:45:45 -0700 [thread overview]
Message-ID: <20200727064545.GA9619@gmail.com> (raw)
In-Reply-To: <159561069973.19270.10637845392621633755.b4-ty@arm.com>
On Fri, Jul 24, 2020 at 06:26:23PM +0100, Catalin Marinas wrote:
> On Wed, 24 Jun 2020 01:33:16 -0700, Andrei Vagin wrote:
> > Currently the vdso has no awareness of time namespaces, which may
> > apply distinct offsets to processes in different namespaces. To handle
> > this within the vdso, we'll need to expose a per-namespace data page.
> >
> > As a preparatory step, this patch separates the vdso data page from
> > the code pages, and has it faulted in via its own fault callback.
> > Subsquent patches will extend this to support distinct pages per time
> > namespace.
> >
> > [...]
>
> Applied to arm64 (for-next/timens), provisionally.
>
> One potential issue I did not check is the compat vDSO. The arm32 port
> does not support timens currently. IIUC, with these patches and
> COMPAT_VDSO enabled, it will allow timens for compat processes. Normally
> I'd like the arm32 support first before updating compat but I don't
> think there would be any interface incompatibility here.
>
> However, does this still work for arm32 processes if COMPAT_VDSO is
> disabled in the arm64 kernel?
Yes, it does. I checked that the timens test passes with and without
COMPAT_VDSO:
[avagin@laptop linux]$ git describe HEAD
v5.8-rc3-6-g9614cc576d76
alpine:/tip/tools/testing/selftests/timens# readelf -h ./timens
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: ARM
Version: 0x1
Entry point address: 0x711
Start of program headers: 52 (bytes into file)
Start of section headers: 15444 (bytes into file)
Flags: 0x5000400, Version5 EABI,
hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 7
Size of section headers: 40 (bytes)
Number of section headers: 32
Section header string table index: 31
alpine:/tip/tools/testing/selftests/timens# uname -a
Linux arm64-alpine 5.8.0-rc3+ #100 SMP Sun Jul 26 23:21:07 PDT 2020
aarch64 Linux
[avagin@laptop linux]$ cat .config | grep VDSO
CONFIG_COMPAT_VDSO=y
CONFIG_THUMB2_COMPAT_VDSO=y
CONFIG_HAVE_GENERIC_VDSO=y
CONFIG_GENERIC_COMPAT_VDSO=y
CONFIG_GENERIC_VDSO_TIME_NS=y
alpine:/tip/tools/testing/selftests/timens# ./timens
1..10
ok 1 Passed for CLOCK_BOOTTIME (syscall)
ok 2 Passed for CLOCK_BOOTTIME (vdso)
not ok 3 # SKIP CLOCK_BOOTTIME_ALARM isn't supported
not ok 4 # SKIP CLOCK_BOOTTIME_ALARM isn't supported
ok 5 Passed for CLOCK_MONOTONIC (syscall)
ok 6 Passed for CLOCK_MONOTONIC (vdso)
ok 7 Passed for CLOCK_MONOTONIC_COARSE (syscall)
ok 8 Passed for CLOCK_MONOTONIC_COARSE (vdso)
ok 9 Passed for CLOCK_MONOTONIC_RAW (syscall)
ok 10 Passed for CLOCK_MONOTONIC_RAW (vdso)
# Pass 8 Fail 0 Xfail 0 Xpass 0 Skip 2 Error 0
[avagin@laptop linux]$ cat .config | grep VDSO
# CONFIG_COMPAT_VDSO is not set
CONFIG_HAVE_GENERIC_VDSO=y
CONFIG_GENERIC_VDSO_TIME_NS=y
alpine:/tip/tools/testing/selftests/timens# ./timens
1..10
ok 1 Passed for CLOCK_BOOTTIME (syscall)
ok 2 Passed for CLOCK_BOOTTIME (vdso)
not ok 3 # SKIP CLOCK_BOOTTIME_ALARM isn't supported
not ok 4 # SKIP CLOCK_BOOTTIME_ALARM isn't supported
ok 5 Passed for CLOCK_MONOTONIC (syscall)
ok 6 Passed for CLOCK_MONOTONIC (vdso)
ok 7 Passed for CLOCK_MONOTONIC_COARSE (syscall)
ok 8 Passed for CLOCK_MONOTONIC_COARSE (vdso)
ok 9 Passed for CLOCK_MONOTONIC_RAW (syscall)
ok 10 Passed for CLOCK_MONOTONIC_RAW (vdso)
# Pass 8 Fail 0 Xfail 0 Xpass 0 Skip 2 Error 0
Thanks,
Andrei
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-27 6:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 8:33 [PATCH v5 0/6] arm64: add the time namespace support Andrei Vagin
2020-06-24 8:33 ` [PATCH 1/6] arm64/vdso: use the fault callback to map vvar pages Andrei Vagin
[not found] ` <159561069973.19270.10637845392621633755.b4-ty@arm.com>
2020-07-27 6:45 ` Andrei Vagin [this message]
2020-06-24 8:33 ` [PATCH 2/6] arm64/vdso: Zap vvar pages when switching to a time namespace Andrei Vagin
2020-06-24 15:18 ` Christian Brauner
2020-06-25 8:25 ` Andrei Vagin
2020-06-24 8:33 ` [PATCH 3/6] arm64/vdso: Add time namespace page Andrei Vagin
2020-06-24 8:33 ` [PATCH 4/6] arm64/vdso: Handle faults on timens page Andrei Vagin
2020-06-24 8:33 ` [PATCH 5/6] arm64/vdso: Restrict splitting VVAR VMA Andrei Vagin
2020-06-24 8:33 ` [PATCH 6/6] arm64: enable time namespace support Andrei Vagin
2020-07-05 6:40 ` [PATCH v5 0/6] arm64: add the " Andrei Vagin
2020-07-14 1:57 ` Andrei Vagin
2020-07-22 18:15 ` Catalin Marinas
2020-07-23 17:41 ` Andrei Vagin
2020-07-23 20:25 ` Thomas Gleixner
2020-07-24 11:01 ` Catalin Marinas
2020-07-24 13:22 ` Thomas Gleixner
2020-07-24 13:30 ` Christian Brauner
2020-07-24 14:40 ` Catalin Marinas
-- strict thread matches above, loose matches on Subject: below --
2020-06-16 7:55 [PATCH v4 " Andrei Vagin
2020-06-16 7:55 ` [PATCH 1/6] arm64/vdso: use the fault callback to map vvar pages Andrei Vagin
2020-06-16 10:59 ` Mark Rutland
2020-06-18 7:27 ` Andrei Vagin
2020-06-02 18:02 [PATCH RESEND v3 0/6] arm64: add the time namespace support Andrei Vagin
2020-06-02 18:02 ` [PATCH 1/6] arm64/vdso: use the fault callback to map vvar pages Andrei Vagin
2020-04-16 5:26 [PATCH v3 0/6] arm64: add the time namespace support Andrei Vagin
2020-04-16 5:26 ` [PATCH 1/6] arm64/vdso: use the fault callback to map vvar pages Andrei Vagin
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=20200727064545.GA9619@gmail.com \
--to=avagin@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=christian.brauner@ubuntu.com \
--cc=dima@arista.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=tglx@linutronix.de \
--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 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).