On 7/6/26 12:31, Hongfu Li wrote:
> Hi,
> 
>>> diff --git a/tools/testing/selftests/mm/pkey_util.c 
>>> b/tools/testing/selftests/mm/pkey_util.c
>>> index 255b332f7a08..fbef3cd45447 100644
>>> --- a/tools/testing/selftests/mm/pkey_util.c
>>> +++ b/tools/testing/selftests/mm/pkey_util.c
>>> @@ -2,9 +2,99 @@
>>>  #define __SANE_USERSPACE_TYPES__
>>>  #include <sys/syscall.h>
>>>  #include <unistd.h>
>>> +#include <fcntl.h>
>>> +#include <stdio.h>
>>> +#include <string.h>
>>>  
>>>  #include "pkey-helpers.h"
>>>  
>>> +int iteration_nr = 1;
>>> +int test_nr;
>>> +int dprint_in_signal;
>>> +
>>> +#if CONTROL_TRACING > 0
>>
>> Who sets that CONTROL_TRACING? And if it's nobody, why are we dragging this 
>> along?
> 
> Thanks a lot for your comment.
> 
> CONTROL_TRACING is disabled by default. It can be enabled at build time
> with -DCONTROL_TRACING=1 to capture extra debug info via ftrace for pkey
> failure debugging. This patch just moves the tracing and abort-hook code
> to the shared pkey_util.c, fully retaining the original opt-in debug logic.
> This is based on my understanding of the existing code design, are
> there any corner cases I overlooked?

This is not documented anywhere, so it's rather odd. I wonder if there is a
single person on earth that uses this :)

-- 
Cheers,

David

Reply via email to