Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5926697rwi; Tue, 18 Oct 2022 06:07:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6HegfZAHozYNdjdnfm/yXqoQwMgtOAYAP/9C/HiamStNkSQr1iw4WmluI9Sp0hX72DCly5 X-Received: by 2002:a17:90b:4c10:b0:20d:5388:a479 with SMTP id na16-20020a17090b4c1000b0020d5388a479mr3545131pjb.184.1666098429284; Tue, 18 Oct 2022 06:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666098429; cv=none; d=google.com; s=arc-20160816; b=xaHve8SWllQELKkTISWNAVHsv8U82ED6yOhgwwCXEAJ8og0Gf4sFKFQqqJrs3zimu4 9532KbMrK5BFo+NM1tSWYoXqfpSB/Uu/ghYkGWpFbamJECqzNqKPgFqjk7+ePvLzNxCQ Pi7djRVnFE7oD03jJyL0eX3AAU9oQYrRtPJSf/4AIUlRA2pXC244z7cZcV0NTwGxELTo WEGz033Nv4YNC27oRg5xhBVoMbNT2BmEa3yz+tgHOTpvJu8WHCW+M/ZZwOAQfVm/UY4k ceDeMXQSrn6jf1wsNUCY8uOa/gqiXdXn9b6HHxaA/CRkYysT2TANkIqbhe3P/n1raa+M 8+Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=AgFEk/ZNs5FzM0J0bRYuQ1IDKi9PlD2CvM9HOxWYEEQ=; b=ou1X48000M/N5d14e/nSDDzPWD3oRHj2AIQkNonEdqHJITDUngSWhtDHR6OmbLXjHK 9g55GUz3D2cLePeQB0sPYXi8ke5IwOhYzquzGpXOKjNOlpNxjhpdtVetJJMpPOFo0m52 Q7tPnYY4zUJsjFCQ0Le+Jy5z/XcGCAvZfZSAu6nDctxytwBCnj4gPjcIkdWalSvy0nan +jQdJnoq8RaFMGwx1cL/A1gUHhL04eyFxH0GMBJBqNr7SlrNqazCtqdKL5CsxP7tciKV IFKlXRZOy1g+qNjdtddWxloKH14IVPn3I7NnX0OMQY8fc+RjluqbHHb7suelsSmCwXYA 2cPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QbVvAvx1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w3-20020a639343000000b00452bab4de6fsi14184163pgm.749.2022.10.18.06.06.16; Tue, 18 Oct 2022 06:07:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QbVvAvx1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230245AbiJRMal (ORCPT + 99 others); Tue, 18 Oct 2022 08:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230099AbiJRMac (ORCPT ); Tue, 18 Oct 2022 08:30:32 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C19BB8C21; Tue, 18 Oct 2022 05:30:31 -0700 (PDT) Received: from [192.168.10.9] (unknown [39.45.244.84]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madras.collabora.co.uk (Postfix) with ESMTPSA id 9A9C96602363; Tue, 18 Oct 2022 13:30:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1666096229; bh=XrK7UDKQ26rBS+50UH9ViTCAxUXkpLoN+e1Isa94oQo=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=QbVvAvx10uxuWUCVHvhs1nQxY/ad3dXtF4UyVrCk2MXOXAuSEVbcXs9cd73OP4YXr wM7H8NGGpGLD4oUdIseZ3LsUAczfdh9qzrMWaCbkQbmcnKieBM0DVnZ3wQle7DmiXF cHVxJilap0ln6QEcpOPzeNAdG8Q+u/lxwPW6gG6cD+ylvCpiVZa1lESAk4jC9MN3z1 4f4af2QTKx/nh7uN7WV1BOygZH2Ic8NOjJXf+0058dY9Y1l98r/u3jhfDziKEAh1rj ho4jNAbFe87KcNnQ9eNp6OzphKzopvg37e9G4FppvyqmfaYkWKQYqHfaN/FjiJWeoE KymKxN3Z6ZMFQ== Message-ID: <2f95ed2d-6dba-850c-7ae9-5c0ebc05191c@collabora.com> Date: Tue, 18 Oct 2022 17:30:20 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Cc: Muhammad Usama Anjum , Danylo Mocherniuk , avagin@gmail.com, linux-mm@kvack.org, akpm@linux-foundation.org, corbet@lwn.net, david@redhat.com, kernel@collabora.com, krisman@collabora.com, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, peter.enderborg@sony.com, shuah@kernel.org, viro@zeniv.linux.org.uk, willy@infradead.org, emmir@google.com, figiel@google.com, kyurtsever@google.com, Paul Gofman , surenb@google.com Subject: Re: [PATCH v3 0/4] Implement IOCTL to get and clear soft dirty PTE Content-Language: en-US To: Greg KH References: <20221014134802.1361436-1-mdanylo@google.com> <474513c0-4ff9-7978-9d77-839fe775d04c@collabora.com> From: Muhammad Usama Anjum In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/18/22 3:48 PM, Greg KH wrote: > On Tue, Oct 18, 2022 at 03:36:24PM +0500, Muhammad Usama Anjum wrote: >> /** >> * struct pagemap_sd_args - Soft-dirty IOCTL argument >> * @start: Starting address >> * @len: Length of the region >> * @vec: Output page_region struct array >> * @vec_len: Length of the page_region struct array >> * @max_out_page: Optional max output pages (It must be less than vec_len if >> specified) >> * @flags: Special flags for the IOCTL >> * @rmask: Special flags for the IOCTL >> * @amask: Special flags for the IOCTL >> * @emask: Special flags for the IOCTL > > What do you mean exactly by "special flags"? Sorry typo in the comments above. Optional flag can be specified in the flag. At the moment, there is only one flag(PAGEMAP_NO_REUSED_REGIONS). /** * struct pagemap_sd_args - Soft-dirty IOCTL argument * @start: Starting address * @len: Length of the region * @vec: Output page_region struct array * @vec_len: Length of the page_region struct array * @max_out_page: Optional max output pages (It must be less than vec_len if specified) * @flags: Special flags for the IOCTL * @rmask: Required mask - All of these bits have to be set * @amask: Any mask - Any of these bits are set * @emask: Exclude mask - None of these bits are set * @rmask: Bits that have to be reported to the user in page_region */ struct pagemap_scan_args { __u64 __user start; __u64 len; __u64 __user vec; __u64 vec_len; __u32 max_out_page; __u32 flags; __u32 rmask; __u32 amask; __u32 emask; __u32 rmask; }; > >> * @__reserved: Reserved member to preserve data alignment. Must be 0. >> */ >> struct pagemap_sd_args { >> __u64 __user start; >> __u64 len; >> __u64 __user vec; // page_region > > __user is a marking for a pointer, not a u64, right? Now the fact that > you treat it like a pointer later in the kernel is different, but that > shouldn't be on the uapi header file. You can put it in the kerneldoc, > which you did not do. I'll update. > > thanks, > > greg k-h