-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aarch64: LKRG: FATAL: Can't hook 'arch_jump_label_transform' #351
Comments
Thank you for reporting this @vt-alt! https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.10.4 has this:
The referenced mainline commit is:
So it looks like the
|
Interestingly, So should we simply stop hooking @Adam-pi3 Please take a look. |
BTW, GA got arm64 runners in public beta "These runners are available to our customers on our GitHub Team and Enterprise Cloud plans. We expect to begin offering Arm runners for open source projects by the end of the year. " |
Is there work on this? [Because in ALT, building a kernel depends on the buildability of all modules, I will be forced to delete the LKRG kernel module temporarily to allow kernel updates, which users expect every week. This is normal and non-permanent (and not threatening), but in the meantime, LKRG will not be tested there. Perhaps the LKRG users will choose not to update the kernel until the module reappears.] |
Yes, I'll experiment with this myself some more and likely propose a fix unless @Adam-pi3 beats me to it. |
Looks like I won't fix this without @Adam-pi3's involvement, at least not as a quick fix that I was hoping I could have. The main reason why not is our hook for A smaller issue is that while it looks like on current kernels we don't need to hook
which includes: +++ b/kernel/jump_label.c
@@ -332,17 +332,13 @@ static int __jump_label_text_reserved(struct jump_entry *iter_start,
return 0;
}
-/*
- * Update code which is definitely not currently executing.
- * Architectures which need heavyweight synchronization to modify
- * running code can override this to make the non-live update case
- * cheaper.
- */
-void __weak __init_or_module arch_jump_label_transform_static(struct jump_entry *entry,
- enum jump_label_type type)
+#ifndef arch_jump_label_transform_static
+static void arch_jump_label_transform_static(struct jump_entry *entry,
+ enum jump_label_type type)
{
- arch_jump_label_transform(entry, type);
+ /* nothing to do on most architectures */
}
+#endif So maybe our logic should be a bit trickier than disabling the hooking of OTOH, I think we can simplify this check in #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) || \
(defined(RHEL_RELEASE_CODE) && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 2))
to: #ifdef HAVE_JUMP_LABEL_BATCH instead of complicating it with a different kernel version check on aarch64 now. |
Some distros with older kernels didn't switch to the BATCH hooking but other old kernels did. It's a mixup scenario so we still need to keep both logic. I'm not sure if distros ported
It looks like that ARM version of batch hooking is waaaaay more simplified comparing to x86. I guess we can try hooking |
I haven't yet looked into the detail of this, but my understanding was that But maybe on aarch64 we can in fact run the same logic as for |
I was surprised but on x86 that's the case but on ARM the logic is a bit different.
where:
where:
and real modification is here:
So
where:
One problem may be when on SMP machine one core is running verification routine while other does the modification and the cores are not in sync yet. However, do not updating database after the |
@vt-alt does ALT linux support Raspberry Pi 4? I'm trying to set-up testing env and Ubuntu works fine but their PPA kernels are broken - they release linux-headers-generic which is depended on 'linux-headers' which they didn't publish:
If ALT linux has pre-baked Raspberry Pi image which I can use and then pull the desired kernel version with dev/headers package to build LKRG, it would make my life a lot easier. |
I am told we have full support. For example any .img.xz from from this list https://nightly.altlinux.org/sisyphus-aarch64/tested/ they could be written on SD-card and etc. About Ubuntu mainline packages, we already do it successfully in CI scripts. Perhaps you should just install linux-headers .deb in the same command line as |
ARM64 added support for JUMP_LABEL batch-mode feature. This commit adds support for it and addresses lkrg-org#351
I created a test patch (#352) implementing the fix/logic described here. It looks like it works. However, I would NOT merge this PR yet. @vt-alt can you run some tests on your end too? @solardiz when @vt-alt also confirms it works I guess we can merge it and see if no new problems pops up. screen 1: run the command I let it run by a few hours and didn't see any problems so far... Probably we need a bit more comprehensive tests anyway. |
This comment was marked as outdated.
This comment was marked as outdated.
I tested the fix from Thanks much! |
OK, but do we have to do things differently? Wouldn't it be more correct and safer to hook |
Why would postponing this to |
ARM64 added support for JUMP_LABEL batch-mode feature. This commit adds support for it and addresses #351
Issue assumed fixed and no discussion for a month - I'll close for now. |
@solardiz sorry for long delay - I was traveling with limited access to the internet.
For some reasons kernel dev decided to modify .text on |
No problem @Adam-pi3. Your explanation omits addressing my questions about locking. So once again, if there were no locking then even updating after Nevermind, I don't insist on discussing this further. |
The delay in releasing the next version of LKRG is concerning (you keeping the version with known issues for so long). I recommend adopting a revised versioning scheme: designate the next release as v0.10.0 (instead of v0.9.9), incrementing the middle number for regular releases, while using the third number for minor build and stability fixes, allowing for more frequent updates. This will also make it easier for users to understand. |
I agree.
Thank you for making this suggestion. I agree about "using the third number for minor build and stability fixes". Yet I think we can call the very next release 0.9.9 and postpone the decision on whether we go with 0.9.10, 0.10.0, or 1.0.0 afterwards. If we feel we need to make a post-0.9.9 release that has only "minor build and stability fixes", this may very well be a reason to call it 1.0.0 - a stable release. |
lkrg
suddenly become broken on 6.6.45, 6.10.4, 6.1.104 (all released today stable kernels).The text was updated successfully, but these errors were encountered: