On 9/9/26 23:17, Helge Deller wrote:
Hi Alex,

On 9/3/26 16:27, Alex Bennée wrote:
Per madvise(2) and the Linux kernel implementation (madvise_walk_vmas),
madvise() must validate that the requested range is currently mapped
and return -ENOMEM if any page in the range is unmapped.

Add a page_check_range(start, len, PAGE_VALID) check for valid advice
values before proceeding with the advice actions. In addition, extend the
tcg multiarch test linux-madvise.c to test this behaviour.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/4382
AI-used-for: importing and validating test case
Signed-off-by: Alex Bennée <[email protected]>

---
NOTE
   - again testing the minimal agents which did stop and say:

*(Note: Per user policy, git commits are never executed automatically by the 
agent. Please review the diff with `git diff` and commit the changes if you are 
satisfied.)*

   but non-the-less imported the test and wrote a crap patch which I
   have re-done dropping a load of unneeded verbosity.


Did you test this patch?
If yes, did it work for you?
I'm asking, because I tried the testcase from the bug report, and
in qemu I still get 0 (success).
Oh, this was a misconfiguration on my side.
The patch works ok!

Reviewed-by: Helge Deller <[email protected]>
Tested-by: Helge Deller <[email protected]>

Thanks!
Helge

Reply via email to