From: John Garry <john.g.garry@oracle.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: mcgrof@kernel.org, russ.weight@linux.dev,
gregkh@linuxfoundation.org, rafael@kernel.org,
rostedt@goodmis.org, mhiramat@kernel.org,
mathieu.desnoyers@efficios.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
keescook@chromium.org, nathan@kernel.org, nicolas@fjasle.eu,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
netdev@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH RFC 0/4] Introduce uts_release
Date: Mon, 5 Feb 2024 08:25:10 +0000 [thread overview]
Message-ID: <23c67ffc-64a5-4e19-8fbd-ecb9bfe9d3ff@oracle.com> (raw)
In-Reply-To: <CAK7LNATDMjzmgpBHZFTOJCkTCqpLPq8jEjdrwzEZ3uu7WMG7jg@mail.gmail.com>
On 02/02/2024 15:01, Masahiro Yamada wrote:
>> --
>> 2.35.3
>
> As you see, several drivers store UTS_RELEASE in their driver data,
> and even print it in debug print.
>
>
> I do not see why it is useful.
I would tend to agree, and mentioned that earlier.
> As you discussed in 3/4, if UTS_RELEASE is unneeded,
> it is better to get rid of it.
Jakub replied about this.
>
>
> If such version information is useful for drivers, the intention is
> whether the version of the module, or the version of vmlinux.
> That is a question.
> They differ when CONFIG_MODVERSION.
>
I think often this information in UTS_RELEASE is shared as informative
only, so the user can conveniently know the specific kernel git version.
>
> When module developers intend to printk the git version
> from which the module was compiled from,
> presumably they want to use UTS_RELEASE, which
> was expanded at the compile time of the module.
>
> If you replace it with uts_release, it is the git version
> of vmlinux.
>
>
> Of course, the replacement is safe for always-builtin code.
>
>
>
> Lastly, we can avoid using UTS_RELEASE without relying
> on your patch.
>
>
>
> For example, commit 3a3a11e6e5a2bc0595c7e36ae33c861c9e8c75b1
> replaced UTS_RELEASE with init_uts_ns.name.release
>
>
> So, is your uts_release a shorthand of init_uts_ns.name.release?
Yes - well that both are strings containing UTS_RELEASE. Using a struct
sub-member is bit ungainly, but I suppose that we should not be making
life easy for people using this.
However we already have init_utsname in:
static inline struct new_utsname *init_utsname(void)
{
return &init_uts_ns.name;
}
So could use init_utsname()->release, which is a bit nicer.
>
>
>
> I think what you can contribute are:
>
> - Explore the UTS_RELEASE users, and check if you can get rid of it.
Unfortunately I expect resistance for this. I also expect places like FW
loader it is necessary. And when this is used in sysfs, people will say
that it is part of the ABI now.
How about I send the patch to update to use init_uts_ns and mention also
that it would be better to not use at all, if possible? I can cc you.
>
> - Where UTS_RELEASE is useful, consider if it is possible
> to replace it with init_uts_ns.name.release
ok, but, as above, could use init_utsname()->release also
Thanks,
John
next prev parent reply other threads:[~2024-02-05 8:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 10:48 [PATCH RFC 0/4] Introduce uts_release John Garry
2024-01-31 10:48 ` [PATCH RFC 1/4] init: Add uts_release John Garry
2024-01-31 10:48 ` [PATCH RFC 2/4] tracing: Use uts_release John Garry
2024-01-31 19:27 ` Steven Rostedt
2024-01-31 10:48 ` [PATCH RFC 3/4] net: ethtool: " John Garry
2024-01-31 19:24 ` Jakub Kicinski
2024-02-01 12:57 ` John Garry
2024-02-01 13:20 ` Jiri Pirko
2024-02-01 16:09 ` Jakub Kicinski
2024-02-01 16:20 ` John Garry
2024-01-31 10:48 ` [PATCH RFC 4/4] firmware_loader: " John Garry
2024-01-31 16:22 ` [PATCH RFC 0/4] Introduce uts_release Greg KH
2024-01-31 17:16 ` John Garry
2024-01-31 21:26 ` Greg KH
2024-02-02 15:01 ` Masahiro Yamada
2024-02-02 18:29 ` Jakub Kicinski
2024-02-05 8:25 ` John Garry [this message]
2024-02-05 23:10 ` Masahiro Yamada
2024-02-08 10:08 ` John Garry
2024-02-21 9:00 ` John Garry
2024-02-21 11:50 ` Masahiro Yamada
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=23c67ffc-64a5-4e19-8fbd-ecb9bfe9d3ff@oracle.com \
--to=john.g.garry@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mcgrof@kernel.org \
--cc=mhiramat@kernel.org \
--cc=nathan@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas@fjasle.eu \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=russ.weight@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