(apologies for re-post, having trouble enforcing no-HTML mode in gmail) On Fri, Aug 27, 2021 at 9:08 AM Evgenii Shatokhin <eshatokhin@xxxxxxxxxxxxx> wrote: > LLpatch requires a pre-built kernel tree ("repository"), right? Yes. It doesn't rebuild existing *.o as a pre-image of the patched code, as kpatch does. But LLpatch does use the dependency analysis the previous make left in *.o.cmd, although the same information could also be extracted by "make -n -W changed_file ..." > Does that mean that the kernel should be built with clang first? > Or, perhaps, clang is only used when building the patch itself, while > the kernel can be built with GCC or other compiler used by the given > Linux distro? We haven't explored this deeply, as all our kernels are clang-built. In principle this should work with gcc-built kernels, as long as the particular change doesn't intersect with some feature which is expressed differently between the gcc/clang worlds, such as some ELF section names. But as there are so many such potential incompatibilities, we do not recommend this. As a precondition for LLpatch-patchable kernels, I would recommend moving to clang-built base kernels