lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1a7545e2-23b3-cba3-6b11-fb8a19f91773@163.com>
Date: Wed, 16 Oct 2024 14:18:03 +0800
From: huanglei <huanglei814@....com>
To: Krzysztof Kozlowski <krzk@...nel.org>, alexandre.belloni@...tlin.com
Cc: linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
 huanglei <huanglei@...inos.cn>
Subject: HTML message rejected: Re: [PATCH] rtc: add prefix modalias for rtc
 modules

Thank you for your reply.

However, Most other drivers have already set MODULE_ALIAS,  such as 
rtc-efi.c have set MODULE_ALIAS("platform:rtc-efi");

So I think this is necessary. If loaded automatically is required, 
sometimes it is necessary to match through this alias.

MODULE_ALIAS adds some more info for the userspace programs. In 
/lib/modules/VERSION/modules.alias you can see the aliases that were 
parsed from the modules.

In this case running  'modprobe spi:rtc-ds1302' would insert the ds1302 
module.

Now , you can see the difference between applying this patch and not 
applying it.

This is not applying this patch,  part of  the modules.alias related to 
rtc_ds1302/ds1347 rtc:

alias platform:rtc-ds1286 rtc_ds1286
alias spi:rtc-ds1305 rtc_ds1305
alias spi:rtc-ds1390 rtc_ds1390
alias platform:ds1511 rtc_ds1511
alias platform:rtc-ds1553 rtc_ds1553
alias platform:rtc-ds1685 rtc_ds1685
alias platform:rtc-ds1742 rtc_ds1742
alias platform:ds2404 rtc_ds2404
alias platform:rtc-efi rtc_efi

And this is applying this patch,  part of  the modules.alias related to 
rtc_ds1302/ds1347 rtc:

alias platform:rtc-ds1286 rtc_ds1286
alias spi:rtc-ds1302 rtc_ds1302
alias spi:rtc-ds1305 rtc_ds1305
alias spi:ds1347 rtc_ds1347
alias spi:rtc-ds1390 rtc_ds1390
alias platform:ds1511 rtc_ds1511
alias platform:rtc-ds1553 rtc_ds1553
alias platform:rtc-ds1685 rtc_ds1685
alias platform:rtc-ds1742 rtc_ds1742
alias platform:ds2404 rtc_ds2404
alias platform:rtc-efi rtc_efi

So, if not applying this patch,  use modprobe rtc-ds1302/ds1347 may be 
not  to load automatically.

Therefore, it is strongly recommended applying this patch.

Best regards,


在 2024/10/15 15:52, Krzysztof Kozlowski 写道:
 > On 15/10/2024 04:43, huanglei814 wrote:
 >> From: huanglei <huanglei@...inos.cn>
 >>
 >> When these rtc drivers is built as a module, To wire it up to udev,
 >> and let the module be loaded automatically, we need to export these
 >> alias from the modules.
 >>
 >> Signed-off-by: huanglei <huanglei@...inos.cn>
 >> ---
 >>  drivers/rtc/rtc-ds1302.c | 1 +
 >>  drivers/rtc/rtc-ds1307.c | 1 +
 >>  drivers/rtc/rtc-ds1343.c | 1 +
 >>  drivers/rtc/rtc-ds1347.c | 1 +
 >>  drivers/rtc/rtc-ds1374.c | 1 +
 >>  drivers/rtc/rtc-ds1672.c | 1 +
 >>  6 files changed, 6 insertions(+)
 >>
 >> diff --git a/drivers/rtc/rtc-ds1302.c b/drivers/rtc/rtc-ds1302.c
 >> index ecc7d0307932..cc82f8e6326b 100644
 >> --- a/drivers/rtc/rtc-ds1302.c
 >> +++ b/drivers/rtc/rtc-ds1302.c
 >> @@ -211,3 +211,4 @@ module_spi_driver(ds1302_driver);
 >>  MODULE_DESCRIPTION("Dallas DS1302 RTC driver");
 >>  MODULE_AUTHOR("Paul Mundt, David McCullough");
 >>  MODULE_LICENSE("GPL v2");
 >> +MODULE_ALIAS("spi:rtc-ds1302");
 >
 > NAK. That's neither correct, nor necessary. Driver has proper tables and
 > is loaded automatically in correct setup. I assume your setup is just
 > incorrect, but without description tricky to say how.
 >
 > Best regards,
 > Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ