Re: [PATCH v12 10/11] sparc64: Add support for ADI (Application Data Integrity)

From: Khalid Aziz
Date: Mon Mar 05 2018 - 17:57:10 EST


On 03/05/2018 02:31 PM, Dave Hansen wrote:
On 03/05/2018 01:14 PM, Khalid Aziz wrote:
Are you suggesting that vma returned by find_vma() could be split or
merged underneath me if I do not hold mmap_sem and thus make the flag
check invalid? If so, that is a good point.

This part does make me think that this code hasn't been tested very
thoroughly. Could you describe the testing that you have done? For MPX
and protection keys, I added something to tools/testing/selftests/x86,
for instance.

This code was tested by a QA team and I ran a number of tests myself. I wrote tests to exercise all of the API, induce exceptions for invalid/illegal accesses and swapping was tested by allocating memory 2-4 times of the system RAM available across 4-8 threads and reading/writing to this memory with ADI enabled. QA team wrote unit tests to test each API with valid and invalid combinations of arguments to the API. Stress tests that allocate and free ADI tagged memory were also run. A version of database server was created that uses ADI tagged memory for in-memory copy of database to test database workload. 100's of hours of tests were run across these tests over the last 1+ year these patches have been under review for. Cover letter includes description of most of these tests. This code has held up through all of these tests. It is entirely feasible some race conditions have not been uncovered yet, just like any other piece of software. Pulling this code into mainline kernel and having lot more people exercise this code will help shake out any remaining issues.

Thanks,
Khalid