From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by kanga.kvack.org (Postfix) with ESMTP id 40AEC6B000A for ; Wed, 24 Oct 2018 20:28:14 -0400 (EDT) Received: by mail-pf1-f200.google.com with SMTP id w64-v6so5265775pfk.2 for ; Wed, 24 Oct 2018 17:28:14 -0700 (PDT) Received: from mga18.intel.com (mga18.intel.com. [134.134.136.126]) by mx.google.com with ESMTPS id l1-v6si6142298pgm.288.2018.10.24.17.28.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Oct 2018 17:28:13 -0700 (PDT) Subject: Re: [PATCH 05/17] prmem: shorthands for write rare on common types References: <20181023213504.28905-1-igor.stoppa@huawei.com> <20181023213504.28905-6-igor.stoppa@huawei.com> From: Dave Hansen Message-ID: Date: Wed, 24 Oct 2018 17:28:12 -0700 MIME-Version: 1.0 In-Reply-To: <20181023213504.28905-6-igor.stoppa@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Igor Stoppa , Mimi Zohar , Kees Cook , Matthew Wilcox , Dave Chinner , James Morris , Michal Hocko , kernel-hardening@lists.openwall.com, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org Cc: igor.stoppa@huawei.com, Dave Hansen , Jonathan Corbet , Laura Abbott , Vlastimil Babka , "Kirill A. Shutemov" , Andrew Morton , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org On 10/23/18 2:34 PM, Igor Stoppa wrote: > Wrappers around the basic write rare functionality, addressing several > common data types found in the kernel, allowing to specify the new > values through immediates, like constants and defines. I have to wonder whether this is the right way, or whether a size-agnostic function like put_user() is the right way. put_user() is certainly easier to use.