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

ulp patches skip livepatchable libraries #159

Open
giulianobelinassi opened this issue Feb 22, 2023 · 4 comments
Open

ulp patches skip livepatchable libraries #159

giulianobelinassi opened this issue Feb 22, 2023 · 4 comments

Comments

@giulianobelinassi
Copy link
Collaborator

Because of:

int len = MIN(obj->num_symbols, 64);

libcrypto.so.1.1 is not being listed as a livepatchable library in SLE-15-SP4. Find another way of finding if a loaded library is livepatchable in the target process.

@giulianobelinassi
Copy link
Collaborator Author

One way of fixing this is by not limiting the number of symbols to 64. But that slows down patchable considerably because glibc is huge.

@giulianobelinassi
Copy link
Collaborator Author

A safe value for this seems to be 8192:
symbols_needed_to_check_if_library_is_livepatchable

@giulianobelinassi
Copy link
Collaborator Author

The above graph was generated by simulating how many symbols patches would have to read to decide if a library is livepatchable or not on all libraries in /usr/lib64/ and its subdirectories.

@giulianobelinassi
Copy link
Collaborator Author

Some libraries have up to 50.000 symbols, so limiting to 8000 may still have some speedups.

giulianobelinassi added a commit to giulianobelinassi/libpulp that referenced this issue Feb 23, 2023
libcrypto.so.1.1 required to read around 200 symbols in order for
`patch` to detect it as a livepatchable library.  Hence we bump
the number of symbols to read from 64 to 8000.  This value of 8000 is
found by analyzing all libraries found in /usr/lib64 and its subfolders
for how many symbols it would need to be read in order to decide if
the library is livepatchable.

Workarround SUSE#159

Signed-off-by: Giuliano Belinassi <[email protected]>
giulianobelinassi added a commit that referenced this issue Feb 23, 2023
libcrypto.so.1.1 required to read around 200 symbols in order for
`patch` to detect it as a livepatchable library.  Hence we bump
the number of symbols to read from 64 to 8000.  This value of 8000 is
found by analyzing all libraries found in /usr/lib64 and its subfolders
for how many symbols it would need to be read in order to decide if
the library is livepatchable.

Workarround #159

Signed-off-by: Giuliano Belinassi <[email protected]>
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

1 participant