public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: jun.zhang@intel.com
Cc: dave.hansen@linux.intel.com, luto@kernel.org,
	peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com,
	hpa@zytor.com, bo.he@intel.com, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/PAT: priority the PAT warn to error to highlight the developer
Date: Mon, 30 Sep 2019 14:02:43 +0200	[thread overview]
Message-ID: <20190930120211.GE29694@zn.tnic> (raw)
In-Reply-To: <20190929072032.14195-1-jun.zhang@intel.com>

On Sun, Sep 29, 2019 at 03:20:31PM +0800, jun.zhang@intel.com wrote:
> From: zhang jun <jun.zhang@intel.com>
> 
> Documentation/x86/pat.txt says:
> set_memory_uc() or set_memory_wc() must use together with set_memory_wb()

I had to open that file to see what it actually says - btw, the filename
is pat.rst now - and you're very heavily paraphrasing what is there. So
try again explaining what the requirement is.

> if break the PAT attribute, there are tons of warning like:
> [   45.846872] x86/PAT: NDK MediaCodec_:3753 map pfn RAM range req

That's some android NDK thing, it seems: "The Android NDK is a toolset
that lets you implement parts of your app in native code,... " lemme
guess, they have a kernel module?

> write-combining for [mem 0x1e7a80000-0x1e7a87fff], got write-back
> and in the extremely case, we see kernel panic unexpected like:
> list_del corruption. prev->next should be ffff88806dbe69c0,
> but was ffff888036f048c0

This is not really helpful. You need to explain what exactly you're
doing - not shortening the error messages.

> so it's better to priority the warn to error to highlight to
> remind the developer.

Whut?

From reading what is trying hard to be a sentence, I can only guess what
you're trying to say here. And it doesn't make it clear why is pr_warn()
not enough and it has to be pr_err().

> Signed-off-by: zhang jun <jun.zhang@intel.com>
> Signed-off-by: he, bo <bo.he@intel.com>

And this SOB chain is wrong.

> ---
>  arch/x86/mm/pat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
> index d9fbd4f69920..43a4dfdcedc8 100644
> --- a/arch/x86/mm/pat.c
> +++ b/arch/x86/mm/pat.c
> @@ -897,7 +897,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
>  
>  		pcm = lookup_memtype(paddr);
>  		if (want_pcm != pcm) {
> -			pr_warn("x86/PAT: %s:%d map pfn RAM range req %s for [mem %#010Lx-%#010Lx], got %s\n",
> +			pr_err("x86/PAT: %s:%d map pfn RAM range req %s for [mem %#010Lx-%#010Lx], got %s!!!\n",

Three "!!!" would make this more urgent, huh?

How about you make the error message more informative and user-friendly,
instead?

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2019-09-30 12:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-29  7:20 [PATCH] x86/PAT: priority the PAT warn to error to highlight the developer jun.zhang
2019-09-30 12:02 ` Borislav Petkov [this message]
2019-10-01  5:00   ` Zhang, Jun
2019-10-01  7:07     ` Peter Zijlstra

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=20190930120211.GE29694@zn.tnic \
    --to=bp@alien8.de \
    --cc=bo.he@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jun.zhang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox