Messages in this thread | | | Date | Thu, 20 Oct 2022 11:57:12 -0700 | From | Kees Cook <> | Subject | Re: [PATCH -mm] -funsigned-char, x86: make struct p4_event_bind::cntr signed array |
| |
On Thu, Oct 20, 2022 at 10:42:25AM -0700, Linus Torvalds wrote: > On Thu, Oct 20, 2022 at 10:33 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > Or sometimes with objdump, I've had more success by keeping debug > > symbols, and then trimming offsets from jmps. > > objdump is what I'm using, and it actually seems ok on individual object files. > > Now I just need to script the "do all the object files" and see how > massive the end result is.
For the a/b build, I start with all*config, then:
# Stop painful noise CONFIG_KCOV=n CONFIG_GCOV_KERNEL=n CONFIG_GCC_PLUGINS=n CONFIG_IKHEADERS=n CONFIG_KASAN=n CONFIG_UBSAN=n CONFIG_KCSAN=n CONFIG_KMSAN=n # Get us source/line details CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_DEBUG_INFO_REDUCED=n CONFIG_DEBUG_INFO_COMPRESSED=n CONFIG_DEBUG_INFO_SPLIT=n
And to keep other build-time junk stabilized[1], I build with these make options:
KBUILD_BUILD_TIMESTAMP=1970-01-01 KBUILD_BUILD_USER=user KBUILD_BUILD_HOST=host KBUILD_BUILD_VERSION=1
For the code diff, I use:
objdump --disassemble --demangle --no-show-raw-insn --no-addresses
and when doing the manual examination:
objdump --disassemble --demangle --reloc --source -l --no-show-raw-insn
My not-great way to filter out the movsbl/movzbl, I added this to diff: -I '\bmov[sz]bl\b'
-- Kees Cook
| |