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-next>] [day] [month] [year] [list]
Message-ID: <20230110132519.72181341@canb.auug.org.au>
Date:   Tue, 10 Jan 2023 13:25:19 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Eric Biggers <ebiggers@...nel.org>,
        "Theodore Y. Ts'o" <tytso@....edu>
Cc:     Eric Biggers <ebiggers@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        "Matthew Wilcox (Oracle)" <willy@...radead.org>
Subject: linux-next: manual merge of the mm tree with the fsverity tree

Hi all,

Today's linux-next merge of the mm tree got a conflict in:

  fs/buffer.c

between commit:

  2a042de143b2 ("fs/buffer.c: support fsverity in block_read_full_folio()")

from the fsverity tree and commit:

  a0ab20df28e6 ("buffer: replace obvious uses of b_page with b_folio")

from the mm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/buffer.c
index 2e65ba2b3919,7e42d67bcaad..000000000000
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@@ -352,24 -319,15 +352,24 @@@ static void decrypt_bh(struct work_stru
   */
  static void end_buffer_async_read_io(struct buffer_head *bh, int uptodate)
  {
- 	struct inode *inode = bh->b_page->mapping->host;
 -	/* Decrypt if needed */
 -	if (uptodate &&
 -	    fscrypt_inode_uses_fs_layer_crypto(bh->b_folio->mapping->host)) {
 -		struct decrypt_bh_ctx *ctx = kmalloc(sizeof(*ctx), GFP_ATOMIC);
++	struct inode *inode = bh->b_folio->mapping->host;
 +	bool decrypt = fscrypt_inode_uses_fs_layer_crypto(inode);
 +	bool verify = need_fsverity(bh);
 +
 +	/* Decrypt (with fscrypt) and/or verify (with fsverity) if needed. */
 +	if (uptodate && (decrypt || verify)) {
 +		struct postprocess_bh_ctx *ctx =
 +			kmalloc(sizeof(*ctx), GFP_ATOMIC);
  
  		if (ctx) {
 -			INIT_WORK(&ctx->work, decrypt_bh);
  			ctx->bh = bh;
 -			fscrypt_enqueue_decrypt_work(&ctx->work);
 +			if (decrypt) {
 +				INIT_WORK(&ctx->work, decrypt_bh);
 +				fscrypt_enqueue_decrypt_work(&ctx->work);
 +			} else {
 +				INIT_WORK(&ctx->work, verify_bh);
 +				fsverity_enqueue_verify_work(&ctx->work);
 +			}
  			return;
  		}
  		uptodate = 0;

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ