Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp285617imm; Wed, 11 Jul 2018 02:22:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc/RKf2Z+Ix4DjrpblsIDGbbnj0OEvRkjdCNDlcur+OiKx0bnPgIrCkO/+a5ATwz5H/hqkq X-Received: by 2002:a65:6301:: with SMTP id g1-v6mr26037754pgv.324.1531300937963; Wed, 11 Jul 2018 02:22:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531300937; cv=none; d=google.com; s=arc-20160816; b=Zsnr5OEg8jbQZTn6uMEl6jxCCUTkesmlkrVyTK35ewBA7DhL+v/eF3BWWzJUQNXvVv GL5MRsdiOsz1AVnz3D6qUjz9n6IFDVaksoTFCyqUQDpXAsDh/vErTvOgI74erdS6++WC d34Gw8xH2jHRIIkJ6VS+r7IZD71nP8KCSRPfAZJbHP8Xv+snhptB7B0AgjbM+OLXKb0t UAIZyIii6zkZejpI5N6Wlu6qp2iUPGZizyn5uZKeD9FTmJup/gxZhHL0NT7rYLOk4ccr eNd7uc8Ac/COAqzUcMZnb/0W2fy26f6vPC8yW20Y2W+aE7x1Ue4H3E3Jbh32PEEMAmn8 cwlw== 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:arc-authentication-results; bh=H70pVgx2XwMMXmR3NCG1O1+R/QAQuNipe1JTYez1Esk=; b=HhRX3lVHImq24+eybg+nHFm8sjQdgOS5rDMRUPIXDhHxeyuZSximsiuM4RCWDTZR5h GFs8ItxlHdMatPkmI8rGIJqB7YycVzExpwn3EbsEFmI/6Qadxfx2ztTNGLSfR0m+qKtY jSPc24yP5uvUCTk/R1vcEhp2zEw80BrtpHQiU7u9A8zl8B4vpw4vtYXBxB4EHX3z/Lcv FiKeEB3sr9xUZ3GQOnyGoxlgQNds+ox+wyAHGuyu4w/HbpCJUO4FMCrhnZmkU+MihiOu JlJV1qrjLMy9d10ahGZO5EbY739pfepgnktYfgnHnV/b/4B9JXbmC+nMnrHJ4rwTsiiP C1ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=FXwGrfj1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s16-v6si19675206pfi.369.2018.07.11.02.22.02; Wed, 11 Jul 2018 02:22:17 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=FXwGrfj1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726464AbeGKJYu (ORCPT + 99 others); Wed, 11 Jul 2018 05:24:50 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45056 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726360AbeGKJYu (ORCPT ); Wed, 11 Jul 2018 05:24:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=H70pVgx2XwMMXmR3NCG1O1+R/QAQuNipe1JTYez1Esk=; b=FXwGrfj1snrBQaYHVYjyAgdOS I33bnxtGqUiYxaO1GZXOmZW6NLFt+t4CCfhC1t9vhmoc1D5tEw7nbYWaBc+WnnMHk3a2zcC7/SDM+ LkJZqIPg5jdvwREDD5ol7VVvyCylY/PF+xyjwErQqAon/8uHLdpzJ4AnZ9jqJlLZUP6s6nULRtLxi GzYatCPJnEQBPq/1scaHF7XPdhGJ2j+Dr3VQv4gc0jNO0XOhn7LNPNRoW9YBb8MsQ1i/NWWkPxxro LP0Tk94VGWAdcyCrLl8m4Ayp8y/+hXiPDYagoEcmLwrIP8vl4fbLMKUraXgko+HT0l30MXkL3OFdS dDVnUjv/g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdBJH-0001nL-GB; Wed, 11 Jul 2018 09:21:19 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EC97820291063; Wed, 11 Jul 2018 11:21:17 +0200 (CEST) Date: Wed, 11 Jul 2018 11:21:17 +0200 From: Peter Zijlstra To: Yu-cheng Yu Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , "Ravi V. Shankar" , Vedvyas Shanbhogue Subject: Re: [RFC PATCH v2 10/27] x86/mm: Introduce _PAGE_DIRTY_SW Message-ID: <20180711092117.GV2476@hirez.programming.kicks-ass.net> References: <20180710222639.8241-1-yu-cheng.yu@intel.com> <20180710222639.8241-11-yu-cheng.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180710222639.8241-11-yu-cheng.yu@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 Tue, Jul 10, 2018 at 03:26:22PM -0700, Yu-cheng Yu wrote: > +static inline bool is_shstk_pte(pte_t pte) > +{ > + pteval_t val; > + > + val = pte_flags(pte) & (_PAGE_RW | _PAGE_DIRTY_HW); > + return (val == _PAGE_DIRTY_HW); > +} That's against naming convention here. static inline bool pte_shstk(pte_t pte) { return pte_flags(pte) & (_PAGE_RW | _PAGE_DIRTY_HW) == _PAGE_DIRTY_HW; } would be more in style with the rest of this code.