SUSE / libpulp

libpulp enables live patching in user space applications.
GNU Lesser General Public License v2.1
55 stars 11 forks source link

`ulp patches` skip livepatchable libraries #159

Open giulianobelinassi opened 1 year ago

giulianobelinassi commented 1 year ago

Because of: https://github.com/SUSE/libpulp/blob/fd16e1b4f2b3ebea80d40432a99ad3e73906a6ec/tools/patches.c#L441

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 commented 1 year ago

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 commented 1 year ago

A safe value for this seems to be 8192: symbols_needed_to_check_if_library_is_livepatchable

giulianobelinassi commented 1 year ago

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 commented 1 year ago

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