Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3177275ybk; Mon, 18 May 2020 20:36:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0Okh8e8WhFhImeR4Xqivikb7vta5V5O2R4HireagQHulv8k6vEGRKLQCnwlpFrwbKqJYO X-Received: by 2002:aa7:c5c8:: with SMTP id h8mr15678565eds.222.1589859385940; Mon, 18 May 2020 20:36:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589859385; cv=none; d=google.com; s=arc-20160816; b=DFyHuGFMKuDauvscAlfkjgD7TcwZNONJbaqofcavWXa1HVkNBVQS2OywBIO7sro0L2 uD/JwapycQGaxlOjuWFbaBhaqwyMRITPDcn2tZ5sMV2HJUsfo0YTcwCepjUbD7ojPtQ1 erddD8TbbLXK3H85RyCjZoWmtbzZ30i8fXclHl2FAgh/I0W8QRTwVA9tjuOMlzbffiRr 5X/bSVTYOniBuoTe/7+lmXuc+L+PdOgQzK9wvyyjcAbGzJEQaFtCzVHns2h8FNn1siF4 i0O9pZ/ImsIh4SQmuVBiv8HuUJyVe94JiEg8dC/rs8tAin3knJ/PlwKYsmuMG2ZHp7TZ sMAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=cmb98xb0zT471fSbPGPJ4qk2UGnlrFrvP/totgun2UM=; b=asEsz6Wd14bviQDMxkkTJCA0pD7r+xIjhOgJlD/4Tb/OY6taNh89Hxi3205TuHguBa MxqselgBS8xNnbtJFDIJLiDjt71mmXsA7pCw02y0XlobKyf1OYanY25CtTdUnl2tyriX yU53xHzAXu/cSArOtc/IlQ7n9bLHklOM4wqOvhr7//qdPD9JPgEyotC3HI/53vH3o7MX PAZL3OOrvIa3y1vKhXPp4XPWcF0dMwHQh0582CjCtdqiWAi9mNehowilduczBa2t5xZq WjUOI45il+U1wnLmTq+0bbFgbl9wU2cVSoboisv92OL6+zBqYGK4A4PSWdkLs90tqP2b Rtvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SsCtl4mG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o21si7811078ejg.500.2020.05.18.20.36.02; Mon, 18 May 2020 20:36:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SsCtl4mG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726786AbgESDej (ORCPT + 99 others); Mon, 18 May 2020 23:34:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:44296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbgESDej (ORCPT ); Mon, 18 May 2020 23:34:39 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CF35A204EF; Tue, 19 May 2020 03:34:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589859278; bh=Ew9WSbxHlG1e79O/eF3sP7/t7fsVShQrjZ3HmpHj6ok=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SsCtl4mGJEwEUe96KkQtYVbR6BtoJw9xmwETC1EYCBWMDzbB/++8GmNwn3j1cvk5t X8luuK69SAjTDOCt+gPTTsdC1qKWhGgn2bVNbSaSNhTFX14ge+8stbbJPRZDZFxtFH lX+rd+rTSO4S2FGggM2Us207qBwpDkR0QigcD4+U= Date: Mon, 18 May 2020 20:34:37 -0700 From: Andrew Morton To: maobibo Cc: Thomas Bogendoerfer , Jiaxun Yang , Huacai Chen , Paul Burton , Dmitry Korotin , Philippe =?ISO-8859-1?Q?Mathieu-Daud=E9?= , Stafford Horne , Steven Price , Anshuman Khandual , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport , Sergei Shtylyov , "Maciej W. Rozycki" , linux-mm@kvack.org, David Hildenbrand Subject: Re: [PATCH v3 3/3] mm/memory.c: Add memory read privilege before filling PTE entry Message-Id: <20200518203437.8b2df678261d756a8c477f40@linux-foundation.org> In-Reply-To: References: <1589778529-25627-1-git-send-email-maobibo@loongson.cn> <1589778529-25627-3-git-send-email-maobibo@loongson.cn> <20200518135747.d8837ba6742b2d193e14fbb0@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 19 May 2020 11:22:49 +0800 maobibo wrote: > how about adding pte_sw_mkyoung alike function which is a noop on all but mips? > this function is used to set PAGE_ACCESS bit and PAGE_VALID bit on mips platform. Sounds good. Please ensure that the interface (roles and responsibilities, etc) is well documented in code comments.