All of lore.kernel.org
 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 3/4] alloc_tag: extend allocinfo_filter to support tracing queries
Date: Mon, 21 Sep 2026 21:36:01 +0000	[thread overview]
Message-ID: <20260921213602.01F291F000FF@smtp.kernel.org> (raw)
In-Reply-To: <c429b37092a4cb33535965163072a63adf57d8e9.1790025465.git.abhishekbapat@google.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Critical] uapi: ALLOCINFO_IOC_GET_AT ioctl ABI breakage due to struct size increase
--

commit e19f22c2c2fb6885ec1ef8ea1659cf1ff9f8e3ae
Author: Abhishek Bapat <abhishekbapat@google.com>

alloc_tag: extend allocinfo_filter to support tracing queries

The commit extends the allocinfo filtering system to allow filtering by tracing
state. It adds a trace_on property to struct allocinfo_counter and a tracing
property to struct allocinfo_filter.

> diff --git a/include/uapi/linux/alloc_tag.h b/include/uapi/linux/alloc_tag.h
> index 069ab8341e87b..e65c32afceee2 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 __u64 tracing here cause an ioctl ABI regression for existing
userspace applications?

Since struct allocinfo_filter is embedded in struct allocinfo_get_at, adding
this field increases the size of struct allocinfo_get_at by 8 bytes.

The ioctl command ALLOCINFO_IOC_GET_AT is defined using _IOWR() which
incorporates the size of struct allocinfo_get_at into the command number:

include/uapi/linux/alloc_tag.h:
#define ALLOCINFO_IOC_GET_AT \
        _IOWR(ALLOCINFO_IOC_BASE, _ALLOCINFO_IOC_GET_AT, struct allocinfo_get_at)

When older userspace tools send the previous ioctl command number, will it
fail to match the new ALLOCINFO_IOC_GET_AT value in the switch statement
in allocinfo_ioctl():

mm/alloc_tag.c:allocinfo_ioctl() {
	switch (cmd) {
[ ... ]
	case ALLOCINFO_IOC_GET_AT:
		ret = allocinfo_ioctl_get_at(file->private_data, arg);
		break;
[ ... ]
	default:
		ret = -ENOIOCTLCMD;
		break;
	}
}

and cause requests to fall through to the default handler?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1790025465.git.abhishekbapat@google.com?part=3

  reply	other threads:[~2026-09-21 21:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 21:26 [PATCH 0/4] alloc_tag: Introduce selective tracing for MAP Abhishek Bapat
2026-09-21 21:26 ` [PATCH 1/4] alloc_tag: Add trace events for tracing allocations Abhishek Bapat
2026-09-23  9:56   ` Hao Ge
2026-09-23 20:12     ` Abhishek Bapat
2026-09-24  1:22       ` Hao Ge
2026-09-24  7:22   ` Hao Ge
2026-09-25  6:14     ` Suren Baghdasaryan
2026-09-28  2:11       ` Hao Ge
2026-09-29 17:31         ` Abhishek Bapat
2026-09-30  2:23           ` Suren Baghdasaryan
2026-09-21 21:26 ` [PATCH 2/4] alloc_tag: Introduce IOCTLs to toggle allocation tracepoints Abhishek Bapat
2026-09-24  8:17   ` Hao Ge
2026-09-25  6:18     ` Suren Baghdasaryan
2026-09-25 21:25       ` Abhishek Bapat
2026-09-25 21:28         ` Abhishek Bapat
2026-09-30  2:09           ` Suren Baghdasaryan
2026-09-21 21:26 ` [PATCH 3/4] alloc_tag: extend allocinfo_filter to support tracing queries Abhishek Bapat
2026-09-21 21:36   ` sashiko-bot [this message]
2026-09-21 21:26 ` [PATCH 4/4] alloc_tag: add a test for trace state toggle and filtering Abhishek Bapat
2026-09-27 16:01   ` kernel test robot
2026-09-24  9:53 ` [PATCH 0/4] alloc_tag: Introduce selective tracing for MAP Hao Ge
2026-09-25  6:04   ` Suren Baghdasaryan

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=20260921213602.01F291F000FF@smtp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.