lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 18 Oct 2022 17:30:20 +0500
From:   Muhammad Usama Anjum <usama.anjum@...labora.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Muhammad Usama Anjum <usama.anjum@...labora.com>,
        Danylo Mocherniuk <mdanylo@...gle.com>, avagin@...il.com,
        linux-mm@...ck.org, akpm@...ux-foundation.org, corbet@....net,
        david@...hat.com, kernel@...labora.com, krisman@...labora.com,
        linux-doc@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        peter.enderborg@...y.com, shuah@...nel.org,
        viro@...iv.linux.org.uk, willy@...radead.org, emmir@...gle.com,
        figiel@...gle.com, kyurtsever@...gle.com,
        Paul Gofman <pgofman@...eweavers.com>, surenb@...gle.com
Subject: Re: [PATCH v3 0/4] Implement IOCTL to get and clear soft dirty PTE

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ