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: <20251122181914.GB1626@quark>
Date: Sat, 22 Nov 2025 10:19:14 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: "Theodore Y. Ts'o" <tytso@....edu>, Jaegeuk Kim <jaegeuk@...nel.org>,
	Andreas Dilger <adilger.kernel@...ger.ca>,
	Chao Yu <chao@...nel.org>, Christian Brauner <brauner@...nel.org>,
	"Darrick J. Wong" <djwong@...nel.org>,
	linux-fscrypt@...r.kernel.org, linux-ext4@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 08/11] fscrypt: return a byte offset from
 bh_get_inode_and_lblk_num

On Tue, Nov 18, 2025 at 07:21:51AM +0100, Christoph Hellwig wrote:
> All the callers now want a byte offset into the inode, so return
> that from bh_get_inode_and_lblk_num.
> 
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>  fs/crypto/inline_crypt.c | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/fs/crypto/inline_crypt.c b/fs/crypto/inline_crypt.c
> index c069958c4819..128268adf960 100644
> --- a/fs/crypto/inline_crypt.c
> +++ b/fs/crypto/inline_crypt.c
> @@ -315,7 +315,7 @@ EXPORT_SYMBOL_GPL(fscrypt_set_bio_crypt_ctx);
>  /* Extract the inode and logical block number from a buffer_head. */

inode and file position

>  static bool bh_get_inode_and_lblk_num(const struct buffer_head *bh,
>  				      const struct inode **inode_ret,
> -				      u64 *lblk_num_ret)
> +				      loff_t *pos_ret)

Rename to bh_get_inode_and_pos()

> * Same as fscrypt_set_bio_crypt_ctx(), except this takes a buffer_head instead  
> * of an inode and block number directly.                                        
> */                                                                              
> void fscrypt_set_bio_crypt_ctx_bh(struct bio *bio,                               
>                                  const struct buffer_head *first_bh,            
>                                  gfp_t gfp_mask)                

inode and file position

> * Same as fscrypt_mergeable_bio(), except this takes a buffer_head instead of
> * an inode and block number directly.
> *
> * Return: true iff the I/O is mergeable
> */
> bool fscrypt_mergeable_bio_bh(struct bio *bio,
>                              const struct buffer_head *next_bh)

inode and file position

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ