[PATCH net-next 1/6] netconsole: introduce 'release' as a new sysdata field

Breno Leitao posted 6 patches 9 months, 1 week ago
[PATCH net-next 1/6] netconsole: introduce 'release' as a new sysdata field
Posted by Breno Leitao 9 months, 1 week ago
This commit adds a new feature to the sysdata structure, allowing the
kernel release/version to be appended as part of sysdata. Additionally,
it updates the logic to count this new field as a used entry when
enabled.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 drivers/net/netconsole.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 098ea9eb02373..b7f7ec39e8318 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -106,6 +106,8 @@ enum sysdata_feature {
 	SYSDATA_CPU_NR = BIT(0),
 	/* Populate the task name (as in current->comm) in sysdata */
 	SYSDATA_TASKNAME = BIT(1),
+	/* Kernel release/version as part of sysdata */
+	SYSDATA_RELEASE = BIT(2),
 };
 
 /**
@@ -719,6 +721,8 @@ static size_t count_extradata_entries(struct netconsole_target *nt)
 		entries += 1;
 	if (nt->sysdata_fields & SYSDATA_TASKNAME)
 		entries += 1;
+	if (nt->sysdata_fields & SYSDATA_RELEASE)
+		entries += 1;
 
 	return entries;
 }

-- 
2.47.1
Re: [PATCH net-next 1/6] netconsole: introduce 'release' as a new sysdata field
Posted by Simon Horman 9 months ago
On Fri, Mar 14, 2025 at 10:58:45AM -0700, Breno Leitao wrote:
> This commit adds a new feature to the sysdata structure, allowing the
> kernel release/version to be appended as part of sysdata. Additionally,
> it updates the logic to count this new field as a used entry when
> enabled.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>

Reviewed-by: Simon Horman <horms@kernel.org>