Skip to contentSkip to conversation

alloc_tag-add-accuracy-based-filtering-to-ioctl.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Aug 25

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: alloc_tag: add accuracy based filtering to ioctl
has been removed from the -mm tree. Its filename was
alloc_tag-add-accuracy-based-filtering-to-ioctl.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Abhishek Bapat <[email protected]>
Subject: alloc_tag: add accuracy based filtering to ioctl
Date: Wed, 8 Jul 2026 18:01:26 +0000

Extend the allocinfo filtering mechanism to allow users to filter tags based on their accuracy.

---

 include/uapi/linux/alloc_tag.h |    4 ++++
 mm/alloc_tag.c                 |    8 ++++++++
 2 files changed, 12 insertions(+)
include/uapi/linux/alloc_tag.h renamed from include/uapi/linux/alloc_tag.h~alloc_tag-add-accuracy-based-filtering-to-ioctl +4 -0
@@ -50,6 +50,7 @@ enum {
 	ALLOCINFO_FILTER_FUNCTION,
 	ALLOCINFO_FILTER_FILENAME,
 	ALLOCINFO_FILTER_LINENO,
+	ALLOCINFO_FILTER_INACCURATE,
 	ALLOCINFO_FILTER_MIN_SIZE,
 	ALLOCINFO_FILTER_MAX_SIZE,
 	__ALLOCINFO_FILTER_LAST = ALLOCINFO_FILTER_MAX_SIZE
@@ -59,6 +60,7 @@ enum {
 #define ALLOCINFO_FILTER_MASK_FUNCTION		(1 << ALLOCINFO_FILTER_FUNCTION)
 #define ALLOCINFO_FILTER_MASK_FILENAME		(1 << ALLOCINFO_FILTER_FILENAME)
 #define ALLOCINFO_FILTER_MASK_LINENO		(1 << ALLOCINFO_FILTER_LINENO)
+#define ALLOCINFO_FILTER_MASK_INACCURATE	(1 << ALLOCINFO_FILTER_INACCURATE)
 #define ALLOCINFO_FILTER_MASK_MIN_SIZE		(1 << ALLOCINFO_FILTER_MIN_SIZE)
 #define ALLOCINFO_FILTER_MASK_MAX_SIZE		(1 << ALLOCINFO_FILTER_MAX_SIZE)
 
@@ -70,6 +72,8 @@ struct allocinfo_filter {
 	struct allocinfo_tag fields;
 	__u64 min_size;
 	__u64 max_size;
+	/* filter criteria only; see allocinfo_counter.accurate for actual accuracy */
+	__u64 inaccurate;
 };
 
 struct allocinfo_get_at {
mm/alloc_tag.c renamed from mm/alloc_tag.c~alloc_tag-add-accuracy-based-filtering-to-ioctl +8 -0
@@ -262,6 +262,8 @@ static bool matches_filter(struct codeta
 			   struct alloc_tag_counters *counters,
 			   bool *fetched_counters)
 {
+	bool inaccurate;
+
 	if (!filter || !filter->mask)
 		return true;
 
@@ -287,6 +289,12 @@ static bool matches_filter(struct codeta
 	    ct->lineno != filter->fields.lineno)
 		return false;
 
+	if (filter->mask & ALLOCINFO_FILTER_MASK_INACCURATE) {
+		inaccurate = !!(ct->flags & CODETAG_FLAG_INACCURATE);
+		if (inaccurate != !!(filter->inaccurate))
+			return false;
+	}
+
 	if (filter->mask & (ALLOCINFO_FILTER_MASK_MIN_SIZE | ALLOCINFO_FILTER_MASK_MAX_SIZE)) {
 		if (!*fetched_counters) {
 			*counters = allocinfo_prefetch_counters(ct);

_

Patches currently in -mm which might be from [email protected] are