Re: [PATCH] ksysfs: Expose hardware name
From: Richard Weinberger
Date: Mon Feb 23 2026 - 08:57:27 EST
----- Ursprüngliche Mail -----
> Von: "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>
> An: "richard" <richard@xxxxxx>
> CC: "linux-kernel" <linux-kernel@xxxxxxxxxxxxxxx>, "bhe" <bhe@xxxxxxxxxx>, sourabhjain@xxxxxxxxxxxxx, "Andrew Morton"
> <akpm@xxxxxxxxxxxxxxxxxxxx>, "senozhatsky" <senozhatsky@xxxxxxxxxxxx>, "John Ogness" <john.ogness@xxxxxxxxxxxxx>,
> "Steven Rostedt" <rostedt@xxxxxxxxxxx>, "Petr Mladek" <pmladek@xxxxxxxx>, upstream+linux@xxxxxxxxxxxxx
> Gesendet: Montag, 23. Februar 2026 14:49:31
> Betreff: Re: [PATCH] ksysfs: Expose hardware name
> On Mon, Feb 23, 2026 at 02:34:48PM +0100, Richard Weinberger wrote:
>> Userspace tools often require a short, descriptive name of the hardware
>> platform. Currently, this information is fragmented: Device Tree-based
>> platforms typically use /proc/device-tree/model, while x86 platforms
>> combine multiple values from /sys/class/dmi/id/. There is no uniform,
>> platform-agnostic way to retrieve this string.
>>
>> The kernel already maintains dump_stack_arch_desc_str[], which contains
>> the model name or DMI values used for the "Hardware name:" field in
>> stack traces.
>>
>> Expose dump_stack_arch_desc_str[] at /sys/kernel/hardware_name to
>> provide userspace with a consistent interface for identifying the
>> underlying hardware.
>
> No objection from me, but now that this is a global symbol in the
> kernel, "dump_" seems like an odd prefix for this. How about
> "linux_hardware_name" to match up with the sysfs file name?
I don't care much. The reason why I kept the variable as-is is because
the function to set it is dump_stack_set_arch_desc().
So the prefix makes kinda sense.
Thanks,
//richard