Skip to content
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

linux 6.9.0-rc6 can't find special struct paravirt_patch_site size #1395

Closed
wardenjohn opened this issue May 15, 2024 · 6 comments
Closed

linux 6.9.0-rc6 can't find special struct paravirt_patch_site size #1395

wardenjohn opened this issue May 15, 2024 · 6 comments

Comments

@wardenjohn
Copy link
Contributor

I use kernel 6.9.0-rc6-next-20240430-dirty and try to build livepatch ko.
When kpatch-build start to read special section data, an error raised : "can't find special struct paravirt_patch_site size."
It seem that the vmlinux dont contain paravirt_patch_site.
I read the vmlinux, and only found paravirt_patch_template, no paravirt_patch_site found.
Anything wrong with the kernel or kpatch-build?

@joe-lawrence
Copy link
Contributor

Hi @wardenjohn : thanks for the reminder, this is a dup of #1380 that was fixed with (just merged now) #1392. Can you re-pull the latest and try again? Thanks.

@wardenjohn
Copy link
Contributor Author

wardenjohn commented May 15, 2024

@joe-lawrence OK
I still have a small question. I read the commit #1392 found the change is :
[[ -n "$CONFIG_PARAVIRT" ]] && ! kernel_version_gte 6.8.0 && check[p]=true # paravirt_patch_site

it just added a judgment of kernel version. So, is paravirt_patch_site is deleted in kernel 6.9.
Maybe just ignore it will not have any negative effect.
Thank you @joe-lawrence for answering my question. :)

@wardenjohn
Copy link
Contributor Author

The answer is in #1380

@wardenjohn
Copy link
Contributor Author

wardenjohn commented May 15, 2024

@joe-lawrence As described in torvalds/linux@f7af697
this paravirt_patch_site is no longer needed. But this function may still exist. Is kpatch-build have a compatible solution?

@joe-lawrence
Copy link
Contributor

@wardenjohn : if I understand your question, take a look at the kernel patch series https://lore.kernel.org/all/[email protected]/ to see that Juergen has implemented the previous paravirt patching functionality with alternatives based patching. Support for .altinstructions / .altinstr_replacement has been in kpatch since 698cc1c ("create-diff-object: support fixup and related sections").

@wardenjohn
Copy link
Contributor Author

OK! I got it. Thank you, joe~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants