Linux Trace Kernel
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Abhishek Bapat" <abhishekbapat@google.com>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] alloc_tag: Extend allocinfo_filter to support tracing queries
Date: Wed, 07 Oct 2026 22:47:23 +0000	[thread overview]
Message-ID: <sashiko-outbox-163422@kernel.org> (raw)
In-Reply-To: <aae089a81ea891e1bc7e3ad171064d37d800ad1a.1791410886.git.abhishekbapat@google.com>

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 <abhishekbapat@google.com>

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/cover.1791410885.git.abhishekbapat@google.com?part=3

  reply	other threads:[~2026-10-07 22:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 22:39 [PATCH v2 0/4] alloc_tag: Introduce selective tracing for MAP Abhishek Bapat
2026-10-07 22:39 ` [PATCH v2 1/4] alloc_tag: Add trace events for tracing allocations Abhishek Bapat
2026-10-07 22:40 ` [PATCH v2 2/4] alloc_tag: Introduce IOCTLs to toggle allocation tracepoints Abhishek Bapat
2026-10-07 22:51   ` sashiko-bot
2026-10-07 22:40 ` [PATCH v2 3/4] alloc_tag: Extend allocinfo_filter to support tracing queries Abhishek Bapat
2026-10-07 22:47   ` sashiko-bot [this message]
2026-10-07 22:40 ` [PATCH v2 4/4] alloc_tag: Add a test for trace state toggle and filtering Abhishek Bapat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-163422@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=abhishekbapat@google.com \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox