From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
"Jason A . Donenfeld" <Jason@zx2c4.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Nicholas Piggin <npiggin@gmail.com>,
Naveen N Rao <naveen@kernel.org>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Andrei Vagin <avagin@gmail.com>
Subject: Re: [PATCH 1/2] powerpc/vdso: Fix VDSO data access when running in a non-root time namespace
Date: Fri, 06 Sep 2024 22:23:08 +1000 [thread overview]
Message-ID: <87r09x3r9v.fsf@mail.lhotse> (raw)
In-Reply-To: <700dbf296d02e32376329774be35cfbead08041d.1725611321.git.christophe.leroy@csgroup.eu>
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> When running in a non-root time namespace, the global VDSO data page
> is replaced by a dedicated namespace data page and the global data
> page is mapped next to it. Detailed explanations can be found at
> commit 660fd04f9317 ("lib/vdso: Prepare for time namespace support").
>
> When it happens, __kernel_get_syscall_map and __kernel_get_tbfreq
> and __kernel_sync_dicache don't work anymore because they read 0
> instead of the data they need.
>
> To address that, clock_mode has to be read. When it is set to
> VDSO_CLOCKMODE_TIMENS, it means it is a dedicated namespace data page
> and the global data is located on the following page.
>
> Add a macro called get_realdatapage which reads clock_mode and add
> PAGE_SIZE to the pointer provided by get_datapage macro when
> clock_mode is equal to VDSO_CLOCKMODE_TIMENS. Use this new macro
> instead of get_datapage macro except for time functions as they handle
> it internally.
>
> Fixes: 74205b3fc2ef ("powerpc/vdso: Add support for time namespaces")
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Oops.
I guess it should also have:
Cc: stable@vger.kernel.org # v5.13+
Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Closes: https://lore.kernel.org/all/ZtnYqZI-nrsNslwy@zx2c4.com/
Jason how do you want to handle this?
I can put patch 1 in a topic branch that we both merge? Then you can
apply patch 2 on top of that merge in your tree.
Or we could both apply patch 1 to our trees, it might lead to a conflict
but it wouldn't be anything drastic.
cheers
next prev parent reply other threads:[~2024-09-06 12:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 8:33 [PATCH 1/2] powerpc/vdso: Fix VDSO data access when running in a non-root time namespace Christophe Leroy
2024-09-06 8:33 ` [PATCH 2/2] Fixup for 3279be36b671 ("powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32") Christophe Leroy
2024-09-06 14:07 ` Jason A. Donenfeld
2024-09-06 14:26 ` Christophe Leroy
2024-09-06 14:46 ` Jason A. Donenfeld
2024-09-06 15:14 ` Christophe Leroy
2024-09-06 18:54 ` Jason A. Donenfeld
2024-09-07 14:35 ` Jason A. Donenfeld
2024-09-07 15:15 ` Christophe Leroy
2024-09-06 12:23 ` Michael Ellerman [this message]
2024-09-06 12:31 ` [PATCH 1/2] powerpc/vdso: Fix VDSO data access when running in a non-root time namespace Christophe Leroy
2024-09-06 13:43 ` Jason A. Donenfeld
2024-09-06 13:57 ` Jason A. Donenfeld
2024-09-09 5:24 ` Michael Ellerman
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=87r09x3r9v.fsf@mail.lhotse \
--to=mpe@ellerman.id.au \
--cc=Jason@zx2c4.com \
--cc=avagin@gmail.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
--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 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.