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: <20260208152448.3300594-1-clm@meta.com>
Date: Sun, 8 Feb 2026 07:22:37 -0800
From: Chris Mason <clm@...a.com>
To: Daniel Vacek <neelx@...e.com>
CC: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
        Eric Biggers
	<ebiggers@...nel.org>,
        "Theodore Y. Ts'o" <tytso@....edu>, Jaegeuk Kim
	<jaegeuk@...nel.org>,
        Jens Axboe <axboe@...nel.dk>, David Sterba
	<dsterba@...e.com>,
        <linux-block@...r.kernel.org>, <linux-fscrypt@...r.kernel.org>,
        <linux-btrfs@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 16/43] btrfs: select encryption dependencies if FS_ENCRYPTION

Daniel Vacek <neelx@...e.com> wrote:
> From: Josef Bacik <josef@...icpanda.com>
> 
> We need this to make sure the appropriate encryption algorithms are
> turned on in our config if we have FS_ENCRYPTION enabled, and
> additionally we only support inline encryption with the fallback block
> crypto, so we need to make sure we pull in those dependencies.

Hi everyone,

I'm running the btrfs for-next branch, along with the encryption patch set
through my AI review prompts:

https://github.com/masoncl/review-prompts

I'm working on some btrfs specific instructions, but hopefully these reviews
are already useful.  I've kept the headers to make it easier to double check
that I'm actually replying to the right email, but please let me know if any
parts of this are incorrect:

commit 0ab45d92f6f53371d87e1a302f09b56218d02546
Author: Josef Bacik <josef@...icpanda.com>

btrfs: select encryption dependencies if FS_ENCRYPTION

This commit adds select statements for encryption-related dependencies when
FS_ENCRYPTION is enabled, including encryption algorithms, inline crypto, and
the block layer inline encryption fallback.

> diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig
> index ede184b6eda16..216a5707b099c 100644
> --- a/fs/btrfs/Kconfig
> +++ b/fs/btrfs/Kconfig
> @@ -16,6 +16,9 @@ config BTRFS_FS
>  	select RAID6_PQ
>  	select XOR_BLOCKS
>  	select XXHASH
> +	select FS_ENCRYPTION_ALGS if FS_ENCRYPTION
> +	select FS_ENCRYPTION_INLINE_CRYPT if FS_ENCRYPTION
> +	select BLK_INLINE_ENCRYPTION_FALLBACK if FS_ENCRYPTION

Are the dependencies for FS_ENCRYPTION_INLINE_CRYPT and
BLK_INLINE_ENCRYPTION_FALLBACK satisfied?

Looking at fs/crypto/Kconfig:38, FS_ENCRYPTION_INLINE_CRYPT depends on
'FS_ENCRYPTION && BLK_INLINE_ENCRYPTION'. Similarly, in block/Kconfig:204,
BLK_INLINE_ENCRYPTION_FALLBACK depends on 'BLK_INLINE_ENCRYPTION'.

When BTRFS_FS=y with FS_ENCRYPTION=y but BLK_INLINE_ENCRYPTION=n (which is
valid), Kconfig will generate warnings:

  WARNING: unmet direct dependencies detected for BLK_INLINE_ENCRYPTION_FALLBACK
  WARNING: unmet direct dependencies detected for FS_ENCRYPTION_INLINE_CRYPT

The build will fail when compiling fs/crypto/inline_crypt.c because
BLK_INLINE_ENCRYPTION guards the required function definitions and struct
members:

  fs/crypto/inline_crypt.c:259:15: error: implicit declaration of function
      'blk_crypto_derive_sw_secret'
  fs/crypto/inline_crypt.c:317:9: error: implicit declaration of function
      'bio_crypt_set_ctx'
  fs/crypto/inline_crypt.c:418:45: error: 'struct bio' has no member named
      'bi_crypt_context'

Should BLK_INLINE_ENCRYPTION also be selected when FS_ENCRYPTION is enabled?

  select BLK_INLINE_ENCRYPTION if FS_ENCRYPTION
  select FS_ENCRYPTION_ALGS if FS_ENCRYPTION
  select FS_ENCRYPTION_INLINE_CRYPT if FS_ENCRYPTION
  select BLK_INLINE_ENCRYPTION_FALLBACK if FS_ENCRYPTION

>  	depends on PAGE_SIZE_LESS_THAN_256KB
>
>  	help


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ