SUSE / libpulp

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

The output of `ulp trigger` can be confusing and seems to have a bug #177

Closed scmschmidt closed 1 year ago

scmschmidt commented 1 year ago

I had:

4 processes with LD_PRELOAD set, 3 processes used a patched library and 1 process used a not-patched library

# ulp trigger '/usr/lib64/openssl-1_1-livepatches/0.1/*.so'
openssl (pid: 8766): SUCCESS /usr/lib64/openssl-1_1-livepatches/0.1/[libcrypto_1.1.1l-150400.5.14.0_livepatch1.so](http://libcrypto_1.1.1l-150400.5.14.0_livepatch1.so/)
ulp: Processes patched: 0, Skipped: 4, Failed: 0.

1 process has been live-patched, but the patch counter is still 0 and the skipped counter is still 4.

Also the term "Skipped" is ambiguous. I assume, patching has been skipped because the patch is already present. From the SLES documentation:

...  SKIPPED

     The patch was skipped because it was not designed for any library that is loaded in the process. ...

Here "skipped" implies the the patch is not suitable for the process. In this case it is. The cause for skipping was that the patch already was present (if my interpretation is correct). Not by a live patch, but by an already patched library.

giulianobelinassi commented 1 year ago

Confirmed. I will debug the issue and come up with a fix.