From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,T_DKIM_INVALID, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4114FECE561 for ; Sat, 22 Sep 2018 10:33:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D8111214C4 for ; Sat, 22 Sep 2018 10:33:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hlYakf6y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8111214C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728233AbeIVQ0Z (ORCPT ); Sat, 22 Sep 2018 12:26:25 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49972 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbeIVQ0Z (ORCPT ); Sat, 22 Sep 2018 12:26:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MUQuhqbj8YaLwpMgcVkNJVLIhUKBC1qSIGs7I1DQwD4=; b=hlYakf6yCL3L98J9m/DXEaj4h LVAwHzueYqegzb4uJ+kfe1dMBDWXGHHvDtTn93axfzunUJQ0kYGa2NVnMMDkUo4Wm/n9WFCozQMmY vN/deQGwZgrlvYMvNk9L5Im1Ld9VqmwbVBszfEHGizWvZqUOaQEeA86wvMoEn7aNv48NEAYbAfjPu 0gbLNqCeZV6saY+xzGNPVQCQo0vDiOjooDXj7ecJTlypp7iz6upHRQ2bG8c+blYfPXrOts3bXnvfa IMynSFNjvVXDoHNgrdZ0VheWffXwBWGTgtaDmHjS/LsR0w4ixcmPbK2m7MDT3FbWROtAbDhCh+2WS k2bEgvSpw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g3fDy-0004eW-7z; Sat, 22 Sep 2018 10:33:18 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A17E92025483B; Sat, 22 Sep 2018 12:33:16 +0200 (CEST) Date: Sat, 22 Sep 2018 12:33:16 +0200 From: Peter Zijlstra To: Dave Hansen Cc: Thomas Gleixner , LKML , x86@kernel.org, Bin Yang , Mark Gross , Ingo Molnar Subject: Re: [patch V3 05/11] x86/mm/cpa: Add debug mechanism Message-ID: <20180922103316.GH24124@hirez.programming.kicks-ass.net> References: <20180917142906.384767038@linutronix.de> <20180917143546.078998733@linutronix.de> <24b0749f-d472-bd6b-4397-e59e01b3a9df@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24b0749f-d472-bd6b-4397-e59e01b3a9df@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 21, 2018 at 09:40:36AM -0700, Dave Hansen wrote: > On 09/17/2018 07:29 AM, Thomas Gleixner wrote: > > The whole static protection magic is silently fixing up anything which is > > handed in. That's just wrong. The offending call sites need to be fixed. > > > > Add a debug mechanism which emits a warning if a requested mapping needs to be > > fixed up. The DETECT debug mechanism is really not meant to be enabled except > > for developers, so limit the output hard to the protection fixups. > ... > > +enum cpa_warn { > > + CPA_PROTECT, > > + CPA_DETECT, > > +}; > > + > > +static const int cpa_warn_level = CPA_PROTECT; > > Even if this is intended for developers only, should we also add some > config option here so things like 0day can still get warnings out of this? > > Reviewed-by: Dave Hansen OTOH, I really wish there was something like: depends !RANDCONFIG for some of those things, because I triggered GCC_PLUGIN_STRUCTLEAK_VERBOSE in a randconfig the other day and thought everything was busted due to the massive output.