[PATCH v2 1/6] fs/readdir: Fix filldir() and filldir64() use of user_access_begin()
Christophe Leroy
christophe.leroy at c-s.fr
Thu Jan 23 23:43:06 AEDT 2020
Le 23/01/2020 à 13:00, Michael Ellerman a écrit :
> Michael Ellerman <mpe at ellerman.id.au> writes:
>> Hi Christophe,
>>
>> This patch is independent of the rest of the series AFAICS
>
> And of course having hit send I immediately realise that's not true.
Without this, book3s/32 fails booting. (And without patch 2, it even
hangs, looping forever in do_page_fault()).
>
>> So I'll take patches 2-6 via powerpc and assume this patch will go via
>> Linus or Al or elsewhere.
>
> So I guess I'll wait and see what happens with patch 1.
We could eventually opt out user_access_begin() for
CONFIG_PPC_BOOK3S_32, then you could take patches 3 and 6. That's enough
to have user_access_begin() and stuff for 8xx and RADIX.
Patch 2 should be taken as well as a fix, and can be kept independant of
the series (once we have patch 1, we normally don't hit the problem
fixed by patch 2).
Won't don't need patch 4 until we want user_access_begin() supported by
book3s/32
However, I'm about to send out a v3 with a different approach. It
modifies the core part where user_access_begin() is returning an opaque
value used by user_access_end(). And it also tells user_access_begin()
whether it's a read or a write, so that we can limit unlocking to write
acccesses on book3s/32, and fine grain rights on book3s/64.
Maybe you would prefer this change on top of first step, in which case
I'll be able to make a v4 rebasing all this on top of patch 3 and 6 of
v3 series. Tell me what you prefer.
Christophe
More information about the Linuxppc-dev
mailing list