-
Notifications
You must be signed in to change notification settings - Fork 336
[RFC] create-diff-object: Add --arch option #1179
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
Conversation
We could be generating patches for architectures that are different from the current one. Use "--arch" to specify the architecture. Signed-off-by: Bill Wendling <morbo@google.com>
|
This is meant an RFC. If you think it's good, then I can modify it for proper submission. Basically it allows someone to run this program to generate patches for |
|
Hi @gwelymernans -- this is an idea we've kicked around in the past, but never got around to actually trying. I'm guessing that you've tried out the RFC with a gcc or llvm cross compiler? As long as it generates the same exact code (and optimization decisions, etc) as the native compiler it should work. As far as the RFC code, I'm interested to see what @jpoimboe thinks of unpeeling all those Also note that it seems to fail the unit tests: https://github.com/dynup/kpatch/pull/1179/checks?check_run_id=2518719533 |
|
The general concept looks good to me. Might it be helpful to allow specifying the cross compiler somehow? |
|
[Sorry for the late reply; I was OOO.] I'm unsure about specifying the compiler. This seems to work on the ELF level, so the compiler shouldn't be much of an issue... |
That's true for create-diff-object, but the kpatch-build script builds the kernel twice. |
|
Hi @gwelymernans, Quick comment on this RFC: we would definitely welcome AARCH64 support, but I think we could review this RFC quicker if it focused only on the Also, we internally trigger integration tests on PR open/push and they are currently failing like: so I dunno if in which case something like this will work as intended: |
It is this. Another option would be to just drop the quotes around $ARCH_FLAG in create-objecti-diff invocation. I am guessing the quotes are there because shellcheck complained, it can be persuaded like so: https://github.com/dynup/kpatch/blob/master/kpatch-build/kpatch-build#L923 Also this won't build on ppc64le at all because we are not building insn subroutines on architectures other than x86 atm. This section: https://github.com/dynup/kpatch/blob/master/kpatch-build/Makefile#L13 needs to be unconditional now I think. |
libelf can read and write various architecture ELF files that may differ from the host system. Instead of using preprocessor directives to build architecture-specific code as per the current host, detect the intended target architecture from one of the input ELF files. Based-on: dynup#1179 Signed-off-by: Bill Wendling <morbo@google.com> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> [small tweaks]
libelf can read and write various architecture ELF files that may differ from the host system. Instead of using preprocessor directives to build architecture-specific code as per the current host, detect the intended target architecture from one of the input ELF files. Based-on: dynup#1179 Signed-off-by: Bill Wendling <morbo@google.com> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> [small tweaks]
libelf can read and write various architecture ELF files that may differ from the host system. Instead of using preprocessor directives to build architecture-specific code as per the current host, detect the intended target architecture from one of the input ELF files. Based-on: dynup#1179 Signed-off-by: Bill Wendling <morbo@google.com> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> [small tweaks]
libelf can read and write various architecture ELF files that may differ from the host system. Instead of using preprocessor directives to build architecture-specific code as per the current host, detect the intended target architecture from the input ELF files. Based-on: dynup#1179 Signed-off-by: Bill Wendling <morbo@google.com> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> [small tweaks]
libelf can read and write various architecture ELF files that may differ from the host system. Instead of using preprocessor directives to build architecture-specific code as per the current host, detect the intended target architecture from the input ELF files. Based-on: dynup#1179 Signed-off-by: Bill Wendling <morbo@google.com> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> [small tweaks]
libelf can read and write various architecture ELF files that may differ from the host system. Instead of using preprocessor directives to build architecture-specific code as per the current host, detect the intended target architecture from the input ELF files. Based-on: dynup#1179 Signed-off-by: Bill Wendling <morbo@google.com> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> [small tweaks]
|
Hi @gwelymernans, I'm going to close this RFC PR since we ended up merging most of the changes with #1248. The main change in that PR was to drop the --arch command line flags and rely on the architecture as set in the ELF files themselves. If there is some other use case that --arch flags would offer, feel free to open a new PR or issue. Thanks for the idea and the code changes! |
We could be generating patches for architectures that are different from
the current one. Use "--arch" to specify the architecture.
Signed-off-by: Bill Wendling morbo@google.com