Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp386786ybi; Fri, 31 May 2019 03:08:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQd+0iiNKURiJxWy73RbBn/NekWzh5o0pwCBUOB5jlhMKwcswZ9CxEah7cxD6jGfFo52NM X-Received: by 2002:a17:90a:26cf:: with SMTP id m73mr8189310pje.90.1559297305370; Fri, 31 May 2019 03:08:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559297305; cv=none; d=google.com; s=arc-20160816; b=wtOHABrJF4rBecpa+tyr/pFR7T2LK62UC73BfR4uvKA5Qbh8xAE6j6WDUtvGVPhhCX JF2EybFV2pFyKAzEkXbarzp1359r7XuuQNC1HI4PSoSjqwC7ITHtMWtqFghYQljIrK8z r49Nh4+FJt4sXBsS+F8DiHPysGtwmq2o/jfB0+EeDl/ewSEim30Vy6HAyvUmNt/JN6Wy MZeSnBbF/LVzPAlzCZ0P6HUVH/7T+qaeAjU2NnxkbA3nTzLXdyg1DKSKpz39vRnNe62i eA8MSu8053eDn6MrVFQ8GMwP5iJ9iUJ5ffHAhwcNGAxgXHBiK1kwKZV87yMzpHueem+5 rFzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:user-agent:organization:references:in-reply-to:date:cc :to:from:message-id; bh=Hjel8ftPf7fIqP7GXdPO6G4ghABoq5L1dKrd72Rx5Ws=; b=Bk85ArcO4stzPLSc04lf12Y89DItr+ARipcK21ZRy0G6b4s/m4T2lINrtRADmMrlqn xzRTiFeANs0lfTRXHx6nadNoZrv1bXOgnG7vQBn8psLU9c8Qt/djP+WgL+oan5RqHdvu CMDbR76IfjwPd0iB+GFP9o5Lw2gQbGwBDQ9464R02LxTbY0U23lwWQYlE8KI5ZtyEuAk K+FCSKER6l6n7TUt9x2qE9K7TC5UG0/iTRa//n3K4E3qu0MTePJ+0SpEwNHSgGG3OsMC noYTDyrQWeQBWbHlSOppOzNFbM06b3nxTfsaB8N3J0wZVjJeFDlXug+agT/XApGtbpq/ f+iQ== ARC-Authentication-Results: i=1; mx.google.com; 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 n8si5227190plp.33.2019.05.31.03.08.07; Fri, 31 May 2019 03:08:25 -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; 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 S1726724AbfEaKG7 (ORCPT + 99 others); Fri, 31 May 2019 06:06:59 -0400 Received: from ou.quest-ce.net ([195.154.187.82]:50287 "EHLO ou.quest-ce.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbfEaKG5 (ORCPT ); Fri, 31 May 2019 06:06:57 -0400 Received: from [2a01:e35:39f2:1220:9dd7:c176:119b:4c9d] (helo=opteyam2) by ou.quest-ce.net with esmtpsa (TLS1.1:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1hWeR2-000GJh-Nm; Fri, 31 May 2019 12:06:52 +0200 Message-ID: <2fd5d462449f24b04adad2bbdf0e272647e62247.camel@opteya.com> From: Yann Droneaud To: Minchan Kim , Andrew Morton Cc: 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 Date: Fri, 31 May 2019 12:06:52 +0200 In-Reply-To: <20190531064313.193437-7-minchan@kernel.org> References: <20190531064313.193437-1-minchan@kernel.org> <20190531064313.193437-7-minchan@kernel.org> Organization: OPTEYA Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.2 (3.32.2-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a01:e35:39f2:1220:9dd7:c176:119b:4c9d X-SA-Exim-Mail-From: ydroneaud@opteya.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on ou.quest-ce.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 Subject: Re: [RFCv2 6/6] mm: extend process_madvise syscall to support vector arrary X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ou.quest-ce.net) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > +}; > + > #endif /* __ASM_GENERIC_MMAN_COMMON_H */ Regards. -- Yann Droneaud OPTEYA