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=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 A77DDC433E2 for ; Sun, 19 Jul 2020 04:13:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F991207BC for ; Sun, 19 Jul 2020 04:13:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726051AbgGSENU (ORCPT ); Sun, 19 Jul 2020 00:13:20 -0400 Received: from mga14.intel.com ([192.55.52.115]:55214 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725272AbgGSENU (ORCPT ); Sun, 19 Jul 2020 00:13:20 -0400 IronPort-SDR: Om92Pvm7Ki8VKpNW5i4fQPk8M0XtmVLVwVWcVksQQbjKzyPDc/6FmxWxqcLBDJh8IURjL6jG7U 363G7IUZ+wqw== X-IronPort-AV: E=McAfee;i="6000,8403,9686"; a="148941748" X-IronPort-AV: E=Sophos;i="5.75,369,1589266800"; d="scan'208";a="148941748" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2020 21:13:19 -0700 IronPort-SDR: qwya3Ig/wTKyf8d54/1yGKJAkRrY9AmYdJEot9EFwm2/RcIgOYdir4HGKjpLMSEgmFG1/mx71I /P8FqF2oclGQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,369,1589266800"; d="scan'208";a="271149876" Received: from iweiny-desk2.sc.intel.com ([10.3.52.147]) by fmsmga008.fm.intel.com with ESMTP; 18 Jul 2020 21:13:19 -0700 Date: Sat, 18 Jul 2020 21:13:19 -0700 From: Ira Weiny To: Peter Zijlstra Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , x86@kernel.org, Dave Hansen , Dan Williams , Vishal Verma , Andrew Morton , Fenghua Yu , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH RFC V2 13/17] kmap: Add stray write protection for device pages Message-ID: <20200719041319.GA478573@iweiny-DESK2.sc.intel.com> References: <20200717072056.73134-1-ira.weiny@intel.com> <20200717072056.73134-14-ira.weiny@intel.com> <20200717092139.GC10769@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200717092139.GC10769@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 17, 2020 at 11:21:39AM +0200, Peter Zijlstra wrote: > On Fri, Jul 17, 2020 at 12:20:52AM -0700, ira.weiny@intel.com wrote: > > @@ -31,6 +32,20 @@ static inline void invalidate_kernel_vmap_range(void *vaddr, int size) > > > > #include > > > > +static inline void enable_access(struct page *page) > > +{ > > + if (!page_is_access_protected(page)) > > + return; > > + dev_access_enable(); > > +} > > + > > +static inline void disable_access(struct page *page) > > +{ > > + if (!page_is_access_protected(page)) > > + return; > > + dev_access_disable(); > > +} > > These are some very generic names, do we want them to be a little more > specific? I had them named kmap_* but Dave (I think it was Dave) thought they did not really apply strictly to kmap_*. They are static to this file which I thought may be sufficient to 'uniqify' them? I'm ok to change them but that is how I arrived at this name. Ira