Messages in this thread | | | Date | Tue, 26 Apr 2022 19:27:59 +0200 | From | Borislav Petkov <> | Subject | Re: [PATCH v2] x86/pm: fix false positive kmemleak report in msr_build_context() |
| |
On Tue, Apr 26, 2022 at 06:24:04PM +0200, Rafael J. Wysocki wrote: > So can the comment be dropped entirely?
Looks like it to me. All the accesses in wakeup_64.S are done through those offsets which are computed at build-time so they should always be valid.
OTOH, I wouldn't mind having there some text making any future person touching this, aware of where to look when making changes.
Some changes like removing a struct member are nicely caught, ofc, see below. But for something else which is a lot more subtle having a comment say "hey, have a look at where this is used in wakeup_64.S and make sure everything is still kosher" is better than having no comment at all. IMHO.
Thx.
In file included from arch/x86/kernel/asm-offsets.c:14: arch/x86/kernel/asm-offsets_64.c: In function ‘main’: ./include/linux/stddef.h:16:33: error: ‘struct saved_context’ has no member named ‘gdt_desc’ 16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~ ./include/linux/kbuild.h:6:69: note: in definition of macro ‘DEFINE’ 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ ./include/linux/kbuild.h:11:21: note: in expansion of macro ‘offsetof’ 11 | DEFINE(sym, offsetof(struct str, mem)) |
-- Regards/Gruss, Boris.
https://people.kernel.org/tglx/notes-about-netiquette
| |