Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Critical] uapi: alloc_tag: ABI break in ioctl numbers due to struct size 
change
--

commit 0e3a8bd841b68b1a5bbc064967d29e2e813bc3ba
Author: Abhishek Bapat <[email protected]>

alloc_tag: Extend allocinfo_filter to support tracing queries

This commit extends the allocinfo filtering mechanism. It allows userspace to
filter memory allocation tags based on their trace state.

> diff --git a/include/uapi/linux/alloc_tag.h b/include/uapi/linux/alloc_tag.h
> index dafcba2f7e2c1..a96054ac22376 100644
> --- a/include/uapi/linux/alloc_tag.h
> +++ b/include/uapi/linux/alloc_tag.h

[ ... ]

> @@ -75,6 +78,7 @@ struct allocinfo_filter {
>       __u64 max_size;
>       /* filter criteria only; see allocinfo_counter.accurate for actual 
> accuracy */
>       __u64 inaccurate;
> +     __u64 tracing;
>  };

[Severity: Critical]
Does adding this 8-byte field to struct allocinfo_filter cause a UAPI
regression for existing userspace applications?

Because struct allocinfo_filter is embedded within struct allocinfo_get_at 
and struct allocinfo_toggle_traces, their total sizes increase by 8 bytes.
The IOCTL command numbers, such as ALLOCINFO_IOC_GET_AT, are generated using 
the _IOWR and _IOW macros, which encode the size of the argument structure 
directly into the command value. 

When the structure sizes change, the numerical values of the ioctls change as 
well. Since the kernel's allocinfo_ioctl does not include handlers for the 
legacy ioctl numbers, older userspace applications issuing the ioctls using 
their original command numbers will fail with -ENOTTY.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=3

Reply via email to