From: Borislav Petkov <bp@alien8.de>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Matthieu Baerts <matthieu.baerts@tessares.net>,
Pavel Machek <pavel@ucw.cz>, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
the arch/x86 maintainers <x86@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Chen Yu <yu.c.chen@intel.com>,
Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Linux Memory Management List <linux-mm@kvack.org>,
Mat Martineau <mathew.j.martineau@linux.intel.com>,
Ingo Molnar <mingo@kernel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Linux PM <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] x86/pm: fix false positive kmemleak report in msr_build_context()
Date: Tue, 26 Apr 2022 19:27:59 +0200 [thread overview]
Message-ID: <Ymgrn03YqecDlPOB@zn.tnic> (raw)
In-Reply-To: <CAJZ5v0gzvOagiYsMxznksrjmtZFV873DaLAiOo4YHkoUq5qTTA@mail.gmail.com>
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
next prev parent reply other threads:[~2022-04-26 17:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-23 18:24 [PATCH v2] x86/pm: fix false positive kmemleak report in msr_build_context() Matthieu Baerts
2022-04-25 16:28 ` Rafael J. Wysocki
2022-04-26 15:22 ` Borislav Petkov
2022-04-26 16:24 ` Rafael J. Wysocki
2022-04-26 17:27 ` Borislav Petkov [this message]
2022-04-26 20:08 ` Matthieu Baerts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ymgrn03YqecDlPOB@zn.tnic \
--to=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-pm@vger.kernel.org \
--cc=mathew.j.martineau@linux.intel.com \
--cc=matthieu.baerts@tessares.net \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@ucw.cz \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.