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]
Message-ID: <a940924c-5e04-43f1-81f9-1d164fd384cc@oracle.com>
Date: Mon, 14 Oct 2024 10:56:57 +0100
From: John Garry <john.g.garry@...cle.com>
To: Ojaswin Mujoo <ojaswin@...ux.ibm.com>,
        "Darrick J. Wong"
 <djwong@...nel.org>
Cc: linux-xfs@...r.kernel.org, Ritesh Harjani <ritesh.list@...il.com>,
        linux-kernel@...r.kernel.org, dchinner@...hat.com,
        Chandan Babu R <chandan.babu@...cle.com>,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v3] xfs: Check for delayed allocations before setting
 extsize

On 14/10/2024 10:10, Ojaswin Mujoo wrote:
> On Fri, Oct 11, 2024 at 09:40:57AM -0700, Darrick J. Wong wrote:
>> On Fri, Oct 11, 2024 at 09:38:30AM -0700, Darrick J. Wong wrote:
>>> On Fri, Oct 11, 2024 at 08:24:27PM +0530, Ojaswin Mujoo wrote:
>>>> Extsize is allowed to be set on files with no data in it. 

Should this be "Extsize should only be allowed to be set on files with 
no data written."

>For this,
>>>> we were checking if the files have extents but missed to check if
>>>> delayed extents were present. This patch adds that check.
>>>>
>>>> While we are at it, also refactor this check into a helper since
>>>> its used in some other places as well like xfs_inactive() or
>>>> xfs_ioctl_setattr_xflags()
>>>>
>>>> **Without the patch (SUCCEEDS)**
>>>>
>>>> $ xfs_io -c 'open -f testfile' -c 'pwrite 0 1024' -c 'extsize 65536'
>>>>
>>>> wrote 1024/1024 bytes at offset 0
>>>> 1 KiB, 1 ops; 0.0002 sec (4.628 MiB/sec and 4739.3365 ops/sec)
>>>>
>>>> **With the patch (FAILS as expected)**
>>>>
>>>> $ xfs_io -c 'open -f testfile' -c 'pwrite 0 1024' -c 'extsize 65536'
>>>>
>>>> wrote 1024/1024 bytes at offset 0
>>>> 1 KiB, 1 ops; 0.0002 sec (4.628 MiB/sec and 4739.3365 ops/sec)
>>>> xfs_io: FS_IOC_FSSETXATTR testfile: Invalid argument
>>>>
>>>> Reviewed-by: Christoph Hellwig <hch@....de>
>>>> Signed-off-by: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
>>>
>>> Looks good now,
>>> Reviewed-by: Darrick J. Wong <djwong@...nel.org>
>>
>> That said, could you add a fixes tag for the xfs_ioctl_setattr_*
>> changes, please?
> 
> Hi Darrick,
> 
> Sure I'll send a new version. Thanks for the review!
> 
> Regards,
> ojaswin
> 
Feel free to add the following if you like:

Reviewed-by: John Garry <john.g.garry@...cle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ