Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1228042ybi; Fri, 31 May 2019 16:20:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6d2RsqQtQitIv+Zi8piT5TwwZKXIkbld6sucZwg5iit6QJs8kZBTbO/aseX0O+QCtXN9K X-Received: by 2002:a17:902:848b:: with SMTP id c11mr12305164plo.74.1559344829292; Fri, 31 May 2019 16:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559344829; cv=none; d=google.com; s=arc-20160816; b=Mz4tDwAr4+9OHMfZtls1IVztWQqq8fbW2WvY8PlPQR54FdeYxqNuT2IL6EAq3jc2Rk nd28pyzetOx9ymawldGmDllH3RlJ7M4xIZc0yQ4SswlXY36l+LKOvPvRqXu8n3thUWwO qv2PLfUo2a/d5Qp2zgUoL+YxfjrJXIQhFAH8RpUke2Ixf779sOTDjNSGZV2DOzIyK0Pm ZhU0u7fH/UCEOsIdJVYRhnJfKep2nuRwbee4Jc/uTKnzIHRMK7w6tXSEuZejSMs/dvEX jEFSBChhL6DNbKuO9AfmSpFIEgjRS8WY5N+sC45PVWi71KKlAu8NI6rOS8dVNry/L1DK xblA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OBkn41KBzlGPK7jEmV7BtD0vX9tIAAepdrwcEGsA5+w=; b=TyRWep02HTOb7QZcg2OuGxlsvg19CevyDWGYUd0Uy1vN+L6t5Pr8AxG3ApQfrFU2Kj put4fhhiHC9EtKsnbXvzWoNVRq153CVoeDPF5YUOUSQZPPG/RumFH2aoQ7IQOF+jwwKc YguCugSzjA0beE+k8Y0MWLzYKIICcoH/uchKmcvNKiNiosf/aMDTYYUf2qyCENfVNSUM cqcb4X7rwQ+BuZ3O9qhkVwBmnaNu8XwVWRNfqb4+Qh7a/KqL+eOhItcGwcHWmV1EaaYc 9dMsUEH+6l4hfkeb5okO00eV1sqVYrA5jTzqA2OWN0FfRDWFttkB2q0G4Z/trMfQyMIa PnQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=f1LmKeIl; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay7si7661938plb.135.2019.05.31.16.20.13; Fri, 31 May 2019 16:20:29 -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=@gmail.com header.s=20161025 header.b=f1LmKeIl; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726832AbfEaXTK (ORCPT + 99 others); Fri, 31 May 2019 19:19:10 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:42380 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726804AbfEaXTK (ORCPT ); Fri, 31 May 2019 19:19:10 -0400 Received: by mail-pf1-f194.google.com with SMTP id r22so7058301pfh.9; Fri, 31 May 2019 16:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=OBkn41KBzlGPK7jEmV7BtD0vX9tIAAepdrwcEGsA5+w=; b=f1LmKeIlF+EXuCgaz3EuG6LlWSltz+X7bsxaknz34pKaycrAKRLn9vvqYZA3JBev6r OCN7Lc8r39/kTKAkOVwhotscdF3y27IeIpCXRJMJlcROgjsRwTToq1AolFiU8zyNPhcf FxTtBcZDcfOXCRBdbkf8hZwQz1mQltjnKlLPgycKGiuVqdmJwJboVcu9ddUBjxphxa+X OpsxbOOaRwVFHE5//eefmSF+QfyXcjVQjxSZ7MIW94sOO1eJXVrGHkCD1BQQHe3cMOZM uyk0h2h6DN6zBJupx3x4ZQFWIPwkX193GsQiAN/71nWAfVzcMpbkbHJO6se95mSl/kXa GcDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=OBkn41KBzlGPK7jEmV7BtD0vX9tIAAepdrwcEGsA5+w=; b=ZTlfQU1SCIhaiCn+6oHCW3q6/lqCLla7KObqFY9Y66Tz+80IvaVNgcwtp8I5sTQDwx yDbR6fDapIuBFE9rTZ7cc5d/M5u1o0uSyJi2Jqy0qP1yQphiziN4ZjUPJQKLIRN5GI25 lR7Eiq4yz4hpHADl+nC2gkieiG4I6wjuzRg5C9HpvA9212BGLXv8Zg8CNcuL9IBY8cGe 2lNEzeK7BoqhMjibGAaMYYVZZjDBDk9MLhwsc4K0rRxNUnXvW44/Cn2Bmi+QdIcRj47G uBPyCHuo1W/K7C0WK/NL7wgqmU2538NUcY5Q4YEpLZuBCbLaSNjEO02lIfII5rPbohWl GIjA== X-Gm-Message-State: APjAAAV593guGnp5YtzEsGa4sXcFtR1vadzs927eX6mhMoskXcnT0+uA +RUlKoUS4Js+9SMmv30rAkw= X-Received: by 2002:a62:1990:: with SMTP id 138mr13345803pfz.133.1559344749725; Fri, 31 May 2019 16:19:09 -0700 (PDT) Received: from google.com ([122.38.223.241]) by smtp.gmail.com with ESMTPSA id x18sm12173516pfj.17.2019.05.31.16.19.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 31 May 2019 16:19:08 -0700 (PDT) Date: Sat, 1 Jun 2019 08:18:59 +0900 From: Minchan Kim To: Yann Droneaud Cc: Andrew Morton , linux-mm , LKML , linux-api@vger.kernel.org, Michal Hocko , Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Daniel Colascione , Shakeel Butt , Sonny Rao , Brian Geffon , jannh@google.com, oleg@redhat.com, christian@brauner.io, oleksandr@redhat.com, hdanton@sina.com Subject: Re: [RFCv2 6/6] mm: extend process_madvise syscall to support vector arrary Message-ID: <20190531231859.GB248371@google.com> References: <20190531064313.193437-1-minchan@kernel.org> <20190531064313.193437-7-minchan@kernel.org> <2fd5d462449f24b04adad2bbdf0e272647e62247.camel@opteya.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2fd5d462449f24b04adad2bbdf0e272647e62247.camel@opteya.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yann, On Fri, May 31, 2019 at 12:06:52PM +0200, Yann Droneaud wrote: > Hi, > > Le vendredi 31 mai 2019 ? 15:43 +0900, Minchan Kim a ?crit : > > > > diff --git a/include/uapi/asm-generic/mman-common.h > > b/include/uapi/asm-generic/mman-common.h > > index 92e347a89ddc..220c2b5eb961 100644 > > --- a/include/uapi/asm-generic/mman-common.h > > +++ b/include/uapi/asm-generic/mman-common.h > > @@ -75,4 +75,15 @@ > > #define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\ > > PKEY_DISABLE_WRITE) > > > > +struct pr_madvise_param { > > + int size; /* the size of this structure */ > > + int cookie; /* reserved to support atomicity */ > > + int nr_elem; /* count of below arrary fields */ > > Those should be unsigned. > > There's an implicit hole here on ABI with 64bits aligned pointers > > > + int __user *hints; /* hints for each range */ > > + /* to store result of each operation */ > > + const struct iovec __user *results; > > + /* input address ranges */ > > + const struct iovec __user *ranges; > > Using pointer type in uAPI structure require a 'compat' version of the > syscall need to be provided. > > If using iovec too. I will fix them when I submit next revision. Thanks for the review.