On 9/22/25 06:18, Thorsten Blum wrote:
>> The kernel config and materials to reproduce are available at:
>> https://download.01.org/0day-ci/archive/20250921/202509211747.1edb60f-
>> [email protected]
> Can someone explain why this test is failing?
>
> After some digging into SGX, I think it's the different allocators
> kmalloc() vs. kmem_buckets_alloc_track_caller(), but I'm not exactly
> sure why it fails.
>
> Perhaps we should add a comment for anyone else trying to replace this?
I can't fathom that this is an SGX problem. The SGX code is as dirt
simple as it gets:
secs = kmalloc(PAGE_SIZE, GFP_KERNEL);
There are literally thousands of those in the kernel.
memdup_user() look suspicious to me, though:
p = kmem_buckets_alloc_track_caller(...GFP_USER | __GFP_NOWARN);
That GFP_USER looks wrong. It shouldn't matter _much_ in practice, but
it's allocating kernel memory with GFP_USER.