Re: [PATCH v4 09/10] selftests/vm: test flag is broken

2020-12-18 Thread John Hubbard
On 12/18/20 1:06 AM, John Hubbard wrote: Add a new test_flags field, to allow raw gup_flags to work. I think .test_control_flags field would be a good name, to make it very clear that it's not destined for gup_flags. Just .test_flags is not quite as clear a distinction from .gup_flags, as .test

Re: [PATCH v4 09/10] selftests/vm: test flag is broken

2020-12-18 Thread John Hubbard
On 12/17/20 10:52 AM, Pavel Tatashin wrote: In gup_test both gup_flags and test_flags use the same flags field. This is broken, because gup_flags can be passed as raw value (via -F hex), which can overwrite all the test flags. Thanks for finding and fixing the "stuck at 0x1" bug! The test is n

[PATCH v4 09/10] selftests/vm: test flag is broken

2020-12-17 Thread Pavel Tatashin
In gup_test both gup_flags and test_flags use the same flags field. This is broken, because gup_flags can be passed as raw value (via -F hex), which can overwrite all the test flags. Farther, in the actual gup_test.c all the passed gup_flags are erased and unconditionally replaced with FOLL_WRITE.