SUSE / clang-extract

A tool to extract code content from source files using the clang and LLVM infrastructure.
Other
12 stars 2 forks source link

When livepatching inlined functions, discover the callers automatically and add them to be extracted instead #26

Closed marcosps closed 3 months ago

marcosps commented 4 months ago

I know this can be very difficult to do, but we can rely on the processing of the IPA clones already being done by the inline tool. I'm only adding the idea here so we can work on it when we have time, or maybe on a hackweek.

giulianobelinassi commented 4 months ago

Hum, this was supposed to be already working since InlinedSymbolsFinder pass was introduced in clang-extract. Is there a case where it is not working yet?

marcosps commented 4 months ago

I'll try to find a new example of this behavior, since my current one makes clang-extract to fail.

marcosps commented 3 months ago

Oh my, that truly works! When livepatching parse_server_interfaces from fs/cifs/smb2ops.c on older codestreams it correctly added smb3_qfs_tcon, turning it into klpp_smb3_qfs_tcon.

Truly amazing! Thanks! (now I think that I should adapt klp-build to not complain about it anymore, or at least to detect such cases...)