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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <442fa82e-16ef-4bde-84eb-743450222468@linux.dev>
Date: Sun, 9 Nov 2025 16:20:56 -0800
From: Zhu Yanjun <yanjun.zhu@...ux.dev>
To: Pasha Tatashin <pasha.tatashin@...een.com>
Cc: akpm@...ux-foundation.org, brauner@...nel.org, corbet@....net,
 graf@...zon.com, jgg@...pe.ca, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org, linux-mm@...ck.org, masahiroy@...nel.org,
 ojeda@...nel.org, pratyush@...nel.org, rdunlap@...radead.org,
 rppt@...nel.org, tj@...nel.org
Subject: Re: [PATCH v9 1/9] kho: make debugfs interface optional


在 2025/11/8 10:13, Pasha Tatashin 写道:
> On Fri, Nov 7, 2025 at 6:36 PM Yanjun.Zhu <yanjun.zhu@...ux.dev> wrote:
>>
>> On 11/7/25 4:02 AM, Pasha Tatashin wrote:
>>> On Fri, Nov 7, 2025 at 7:00 AM Pasha Tatashin <pasha.tatashin@...een.com> wrote:
>>>>> Hi, Pasha
>>>>>
>>>>> In our previous discussion, we talked about counting the number of times
>>>>> the kernel is rebooted via kexec. At that time, you suggested adding a
>>>>> variable in debugfs to keep track of this count.
>>>>> However, since debugfs is now optional, where would be an appropriate
>>>>> place to store this variable?
>>>> It is an optional config and can still be enabled if the live update
>>>> reboot number value needs to be accessed through debugfs. However,
>>>> given that debugfs does not guarantee a stable interface, tooling
>>>> should not be built to require these interfaces.
>>>>
>>>> In the WIP LUO [1] I have, I pr_info() the live update number during
>>>> boot and also store it in the incoming LUO FDT tree, which can also be
>>>> accessed through this optional debugfs interface.
>>>>
>>>> The pr_info message appears like this during boot:
>>>> [    0.000000] luo: Retrieved live update data, liveupdate number: 17
>>>>
>>>> Pasha
>>> Forgot to add link to WIP LUOv5:
>>> [1] https://github.com/soleen/linux/tree/luo/v5rc04
>>
>> Thanks a lot. I’ve carefully read this commit:
>> https://github.com/soleen/linux/commit/60205b9a95c319dc9965f119303a1d83f0ff08fa.
>>
>> To be honest, I’d like to run some tests with who/luo, including the
>> selftest for kho/luo. Could you please share the steps with me?
>>
>> If the testing steps have already been documented somewhere, could you
>> please share the link?
> Currently the test performs in-kernel tests for FLB data, it creates a
> number of FLB for every registered LUO file-handler, which at the
> moment is only memfd.
>
> It works together with any of the kexec based live update tests. In
> v5, I introduce two tests:
> luo_kexec_simple
> luo_multi_session
>
> For example, with luo_multi_session:

Hi, Pasha

I enabled "CONFIG_LIVEUPDATE=y"

# ./luo_multi_session
1..0 # SKIP Failed to open /dev/liveupdate. Is the luo module loaded?

# ls /dev/liveupdate
ls: cannot access '/dev/liveupdate': No such file or directory

# grep "LIVEUPDATE" -inrHI /boot/config-`uname -r`
/boot/config-next-20251107-luo+:349:CONFIG_LIVEUPDATE=y
/boot/config-next-20251107-luo+:11985:CONFIG_LIVEUPDATE_TEST=y

I made tests on FC42. But /dev/liveupdate is missing.

Thanks

Yanjun.Zhu

> # ./luo_multi_session
> # [STAGE 1] Starting pre-kexec setup for multi-session test...
> # [STAGE 1] Creating state file for next stage (2)...
> # [STAGE 1] Creating empty sessions 'multi-test-empty-1' and
> 'multi-test-empty-2'...
> # [STAGE 1] Creating session 'multi-test-files-1' with one memfd...
> # [STAGE 1] Creating session 'multi-test-files-2' with two memfds...
> # [STAGE 1] Executing kexec...
>
> ... reboot ...
> After reboot:
>
> $ ./luo_multi_session
> # [STAGE 2] Starting post-kexec verification...
> # [STAGE 2] Retrieving all sessions...
> # [STAGE 2] Verifying contents of session 'multi-test-files-1'...
> # [STAGE 2] Verifying contents of session 'multi-test-files-2'...
> # [STAGE 2] Test data verified successfully.
> # [STAGE 2] Finalizing all test sessions...
> # [STAGE 2] Finalizing state session...
> #
> --- MULTI-SESSION KEXEC TEST PASSED ---
>
> Dmesg data, shows that in-kernel live update test was also successful:
>
> [    0.000000] luo: Retrieved live update data, liveupdate number: 1
> [    0.034513] liveupdate test: test-flb-v0: found flb data from the
> previous boot
> [    0.034517] liveupdate test: test-flb-v1: found flb data from the
> previous boot
> [    0.034518] liveupdate test: test-flb-v2: found flb data from the
> previous boot
> [    0.676891] liveupdate test: Registered 3 FLBs with file handler: [memfd-v1]
>
> Pasha
>
>> Best Regards,
>>
>> Yanjun.Zhu
>>
-- 
Best Regards,
Yanjun.Zhu


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ