On Thu, Sep 28, 2023 at 07:51:18PM +0200, David Hildenbrand wrote:
On 28.09.23 19:21, Peter Xu wrote:
On Thu, Sep 28, 2023 at 07:05:40PM +0200, David Hildenbrand wrote:
As described as reply to v1, without fork() and KSM, the PAE bit should
stick around. If that's not the case, we should investigate why.
If we ever support the post-fork case (which the comment above remap_pages()
excludes) we'll need good motivation why we'd want to make this
overly-complicated feature even more complicated.
The problem is DONTFORK is only a suggestion, but not yet restricted. If
someone reaches on top of some !PAE page on src it'll never gonna proceed
and keep failing, iiuc.
Yes. It won't work if you fork() and not use DONTFORK on the src VMA. We
should document that as a limitation.
For example, you could return an error to the user that can just call
UFFDIO_COPY. (or to the UFFDIO_COPY from inside uffd code, but that's
probably ugly as well).
We could indeed provide some special errno perhaps upon the PAE check, then
document it explicitly in the man page and suggest resolutions (like
DONTFORK) when user hit it.