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] [day] [month] [year] [list]
Message-ID: <0dca406a-e331-a8f7-da8d-95ba89705598@kernel.org>
Date:   Wed, 11 Jan 2023 17:20:07 +0800
From:   Chao Yu <chao@...nel.org>
To:     Alexey Dobriyan <adobriyan@...il.com>
Cc:     akpm@...ux-foundation.org, viro@...iv.linux.org.uk,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] proc: introduce proc_statfs()

On 2023/1/11 1:58, Alexey Dobriyan wrote:
> On Tue, Jan 10, 2023 at 11:20:03PM +0800, Chao Yu wrote:
>> Introduce proc_statfs() to replace simple_statfs(), so that
>> f_bsize queried from statfs() can be consistent w/ the value we
>> set in s_blocksize.
>>
>> stat -f /proc/
>>
>> Before:
>>      ID: 0        Namelen: 255     Type: proc
>> Block size: 4096       Fundamental block size: 4096
>> Blocks: Total: 0          Free: 0          Available: 0
>> Inodes: Total: 0          Free: 0
>>
>> After:
>>      ID: 0        Namelen: 255     Type: proc
>> Block size: 1024       Fundamental block size: 1024
>> Blocks: Total: 0          Free: 0          Available: 0
>> Inodes: Total: 0          Free: 0
> 
> 4096 is better value is in fact.
> 
> seq_files allocate 1 page and fill it, therefore reading less than
> PAGE_SIZE from /proc is mostly waste of syscalls.

Ah, thanks for correcting me, so, how about updating .s_blocksize and
.s_blocksize_bits to PAGE_SIZE and PAGE_SHIFT?

> 
> I doubt anything uses f_bsize.
> 
> BTW this patch is not self contained.

Oh, yes, my bad.

Thanks,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ