[LTP] [PATCH v2 1/1] brk02: Add test for removing more than one VMA
Liam Howlett
liam.howlett@oracle.com
Fri Mar 26 17:13:54 CET 2021
* Petr Vorel <pvorel@suse.cz> [210326 06:43]:
> Hi Liam, Li,
>
> > > This was my test platform. I also sent it to the Travis CI which passed
> > > for x86_64. I will re-examine the accepted code to ensure the cosmetic
> > > changes didn't invalidate my testing.
>
> > FWIK, the Travis CI does not run test case, it just compiles/builds LTP
> > across
> > many arches/platforms.
>
> Yes, while KernelCI and some enterprise / embedded distros for their kernels run
> LTP testcases, the project does not run it. Cyril run some regression tests for
> few most important runtests before release manually. But having a server it'd be
> handy to run them.
Thank you for clarification. What is the best way to re-test my
changes? As I had said, I made a change that will not add EXEC but will
still test removal of more than one VMA. We cannot just mprotect
PROT_READ|PROT_WRITE as this will allow VMA merging to occur. My
solution is to change the anon vma to just PROT_READ. It passes in my
x86_64 test but since that was the case for me regardless, I cannot say
that I have fixed the issue, but I have verified that the test still
does what I expect it to do.
Thanks,
Liam
Patch below.
-------------------------------------------
+++ b/testcases/kernel/syscalls/brk/brk02.c
@@ -36,8 +36,7 @@ void brk_down_vmas(void)
return;
}
- if (mprotect(addr - page_size, page_size,
- PROT_READ|PROT_WRITE|PROT_EXEC)) {
+ if (mprotect(addr - page_size, page_size, PROT_READ)) {
tst_res(TFAIL, "Cannot mprotect new VMA");
return;
}
More information about the ltp
mailing list