Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6859532ybn; Mon, 30 Sep 2019 05:05:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZzYtAH1VHN9Mxj0/fB4lKmRK7fQJsR5YMp/tPHy+58JExp4USZDpS5kXlEn+w1Z40uoje X-Received: by 2002:aa7:cf86:: with SMTP id z6mr18669963edx.230.1569845108030; Mon, 30 Sep 2019 05:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569845108; cv=none; d=google.com; s=arc-20160816; b=hgBQcYvFrownssvJL6SYwjSzjUhaQ0QgkSTbKeLMNzEYq8aaRQzBwUKmwECTr2QyLe 8UAjU9tcQixmfPAiJoDgRU/gvkY05iC+t1QkjA/jIXF9WBSV8TUTDn9fI0MA42Ki/xi7 AVviG9gZrjCZwE1RsT9UbjRa6XQLtffZZlLU+ui8gB5/IFWJlnP+tUZoZx1AVwX32vQR khI+KidXZlWytEhGhbzBcc/tqcMmrnhzfgXOvm3Pdc6/j0MAA0gosWURjRrSFoeioxTk Jj3Pz/GFljQqA3nCXzHM5T/iSfeXD57rvxI467QCk5BcyhT8U4Pb/1Ep9+HTMk93QgH/ HzAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=z8Yg6ftuAQDzPA2SaaFMykYUOSauRfhRnUdQbELiNUI=; b=nrKdfwM5k4bNlBhMC0OkIFEHDvLpSr+B6FMz0sTi9nDd9ZMiU5j/clvuUWyKyLoI3Y EXbUAaOWSGEMK0LWVtFrRpbfRMETa27kp4c/DQFqG0z9yL4lbN2uwSkJAg3z6FNCytaM WNS5OYSy0taxkaK7eQlkow5FsSJB+GICJU3clJgm6aWVro2zGe4HgtIRJAi2w9eT6AuM Jj+ibpoivEY8VAxLRqvYT00BqW4NNZz1BhfCMuRLr9JbbREwhWW8qRiKiVFcyHKRvZDl OPeIE+0tvPMadx5Hmi04nom+usebWcOCVbtrreFojTLTq2WSqcQ5IsoIMiRH6UwaWJFF uGUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=QNZozDsd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be24si6613766edb.120.2019.09.30.05.04.42; Mon, 30 Sep 2019 05:05:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=QNZozDsd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730057AbfI3MCk (ORCPT + 99 others); Mon, 30 Sep 2019 08:02:40 -0400 Received: from mail.skyhub.de ([5.9.137.197]:33490 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728573AbfI3MCk (ORCPT ); Mon, 30 Sep 2019 08:02:40 -0400 Received: from zn.tnic (p200300EC2F058B00329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2f05:8b00:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 674001EC0982; Mon, 30 Sep 2019 14:02:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1569844959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=z8Yg6ftuAQDzPA2SaaFMykYUOSauRfhRnUdQbELiNUI=; b=QNZozDsdR2FQNDcAJ7Y1H989J4CPiP1AZ6LLObli8tUkoL7usoyC7vYbNNoCM4XUDvUZHb Pr6oCBeRipdD7O0F7+LltNWKJJYcJ3koDbDRnlZCtPtfrRf7n9M/EuNgfJAfYPrgq4uPLZ gf0q5/2bRRC/dT8SaMg5aVgkaFXJ2Hg= Date: Mon, 30 Sep 2019 14:02:43 +0200 From: Borislav Petkov 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 Message-ID: <20190930120211.GE29694@zn.tnic> References: <20190929072032.14195-1-jun.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190929072032.14195-1-jun.zhang@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 29, 2019 at 03:20:31PM +0800, jun.zhang@intel.com wrote: > From: zhang jun > > 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 > Signed-off-by: he, bo 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