From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Namjae Jeon <linkinjeon@kernel.org>,
Steve French <smfrench@gmail.com>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Tom Talpey <tom@talpey.com>,
linux-cifs@vger.kernel.org, Rosen Penev <rosenp@gmail.com>
Subject: Re: [PATCH] RFC: ksmbd: provide MODULE_VERSION()
Date: Sat, 31 May 2025 08:56:17 +0200 [thread overview]
Message-ID: <2025053156-gilled-mangy-e8b9@gregkh> (raw)
In-Reply-To: <20250531-ksmbd-sysfs-module-v1-1-248cf10fa87d@linaro.org>
On Sat, May 31, 2025 at 08:42:44AM +0200, Linus Walleij wrote:
> Adding MODULE_VERSION("1.0") to ksmbd makes /sys/modules/ksmbd
> appear even when ksmbd is compiled into the kernel.
>
> Adding a version as a way to get a module name is documented in
> Documentation/ABI/stable/sysfs-module.
MODULE_VERSIONS() mean nothing and should be removed entirely from the
kernel tree. The only "version" that is an issue is the kernel version.
> #define KSMBD_GENL_NAME "SMBD_GENL"
> #define KSMBD_GENL_VERSION 0x01
> +#define KSMBD_GENL_VERSION_STRING "1.0"
So you are overloading the module version attribute to somehow reflect
a user/kernel api version number instead? That feels wrong and not a
good idea. Export that "version" somewhere else please if userspace
really needs it (and I would strongly argue that it should NOT need it
as you aren't allowed to make breaking user/kernel api changes anyway,
so why would a version number matter?)
> --- a/fs/smb/server/server.c
> +++ b/fs/smb/server/server.c
> @@ -632,5 +632,7 @@ MODULE_SOFTDEP("pre: aead2");
> MODULE_SOFTDEP("pre: ccm");
> MODULE_SOFTDEP("pre: gcm");
> MODULE_SOFTDEP("pre: crc32");
> +/* MODULE_VERSION() Makes /sys/module/ksmbd appear when compiled-in */
> +MODULE_VERSION(KSMBD_GENL_VERSION_STRING);
Again, no, please don't do this.
greg k-h
next prev parent reply other threads:[~2025-05-31 6:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-31 6:42 [PATCH] RFC: ksmbd: provide MODULE_VERSION() Linus Walleij
2025-05-31 6:56 ` Greg Kroah-Hartman [this message]
2025-05-31 19:37 ` Linus Walleij
2025-05-31 17:50 ` Steve French
2025-05-31 18:49 ` Paulo Alcantara
2025-06-01 7:41 ` Greg Kroah-Hartman
2025-06-01 18:54 ` Linus Walleij
2025-06-01 19:18 ` Steve French
2025-06-02 5:34 ` Greg Kroah-Hartman
2025-06-01 19:56 ` Paulo Alcantara
2025-06-01 19:59 ` Steve French
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=2025053156-gilled-mangy-e8b9@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linkinjeon@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-cifs@vger.kernel.org \
--cc=rosenp@gmail.com \
--cc=senozhatsky@chromium.org \
--cc=smfrench@gmail.com \
--cc=tom@talpey.com \
/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.