From: kernel test robot <lkp@intel.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Tyler Hicks <code@tyhicks.com>
Cc: oe-kbuild-all@lists.linux.dev,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
ecryptfs@vger.kernel.org, Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 07/10] ecryptfs: Convert ecryptfs_encrypt_page() to take a folio
Date: Fri, 18 Oct 2024 13:06:44 +0800 [thread overview]
Message-ID: <202410181219.HUGM3U13-lkp@intel.com> (raw)
In-Reply-To: <20241017151709.2713048-8-willy@infradead.org>
Hi Matthew,
kernel test robot noticed the following build warnings:
[auto build test WARNING on v6.12-rc3]
[also build test WARNING on linus/master next-20241017]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Matthew-Wilcox-Oracle/ecryptfs-Convert-ecryptfs_writepage-to-ecryptfs_writepages/20241017-232033
base: v6.12-rc3
patch link: https://lore.kernel.org/r/20241017151709.2713048-8-willy%40infradead.org
patch subject: [PATCH 07/10] ecryptfs: Convert ecryptfs_encrypt_page() to take a folio
config: x86_64-buildonly-randconfig-002-20241018 (https://download.01.org/0day-ci/archive/20241018/202410181219.HUGM3U13-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241018/202410181219.HUGM3U13-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410181219.HUGM3U13-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/ecryptfs/crypto.c:410: warning: Function parameter or struct member 'folio' not described in 'ecryptfs_encrypt_page'
>> fs/ecryptfs/crypto.c:410: warning: Excess function parameter 'page' description in 'ecryptfs_encrypt_page'
vim +410 fs/ecryptfs/crypto.c
237fead619984c Michael Halcrow 2006-10-04 392
237fead619984c Michael Halcrow 2006-10-04 393 /**
0216f7f7921759 Michael Halcrow 2007-10-16 394 * ecryptfs_encrypt_page
0216f7f7921759 Michael Halcrow 2007-10-16 395 * @page: Page mapped from the eCryptfs inode for the file; contains
0216f7f7921759 Michael Halcrow 2007-10-16 396 * decrypted content that needs to be encrypted (to a temporary
0216f7f7921759 Michael Halcrow 2007-10-16 397 * page; not in place) and written out to the lower file
237fead619984c Michael Halcrow 2006-10-04 398 *
0216f7f7921759 Michael Halcrow 2007-10-16 399 * Encrypt an eCryptfs page. This is done on a per-extent basis. Note
237fead619984c Michael Halcrow 2006-10-04 400 * that eCryptfs pages may straddle the lower pages -- for instance,
237fead619984c Michael Halcrow 2006-10-04 401 * if the file was created on a machine with an 8K page size
237fead619984c Michael Halcrow 2006-10-04 402 * (resulting in an 8K header), and then the file is copied onto a
237fead619984c Michael Halcrow 2006-10-04 403 * host with a 32K page size, then when reading page 0 of the eCryptfs
237fead619984c Michael Halcrow 2006-10-04 404 * file, 24K of page 0 of the lower file will be read and decrypted,
237fead619984c Michael Halcrow 2006-10-04 405 * and then 8K of page 1 of the lower file will be read and decrypted.
237fead619984c Michael Halcrow 2006-10-04 406 *
237fead619984c Michael Halcrow 2006-10-04 407 * Returns zero on success; negative on error
237fead619984c Michael Halcrow 2006-10-04 408 */
722a8483fde078 Matthew Wilcox (Oracle 2024-10-17 409) int ecryptfs_encrypt_page(struct folio *folio)
237fead619984c Michael Halcrow 2006-10-04 @410 {
0216f7f7921759 Michael Halcrow 2007-10-16 411 struct inode *ecryptfs_inode;
237fead619984c Michael Halcrow 2006-10-04 412 struct ecryptfs_crypt_stat *crypt_stat;
7fcba054373d5d Eric Sandeen 2008-07-28 413 char *enc_extent_virt;
7fcba054373d5d Eric Sandeen 2008-07-28 414 struct page *enc_extent_page = NULL;
0216f7f7921759 Michael Halcrow 2007-10-16 415 loff_t extent_offset;
0f89617623fed9 Tyler Hicks 2013-04-15 416 loff_t lower_offset;
237fead619984c Michael Halcrow 2006-10-04 417 int rc = 0;
237fead619984c Michael Halcrow 2006-10-04 418
722a8483fde078 Matthew Wilcox (Oracle 2024-10-17 419) ecryptfs_inode = folio->mapping->host;
0216f7f7921759 Michael Halcrow 2007-10-16 420 crypt_stat =
0216f7f7921759 Michael Halcrow 2007-10-16 421 &(ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat);
13a791b4e63eb0 Tyler Hicks 2009-04-13 422 BUG_ON(!(crypt_stat->flags & ECRYPTFS_ENCRYPTED));
7fcba054373d5d Eric Sandeen 2008-07-28 423 enc_extent_page = alloc_page(GFP_USER);
7fcba054373d5d Eric Sandeen 2008-07-28 424 if (!enc_extent_page) {
237fead619984c Michael Halcrow 2006-10-04 425 rc = -ENOMEM;
0216f7f7921759 Michael Halcrow 2007-10-16 426 ecryptfs_printk(KERN_ERR, "Error allocating memory for "
0216f7f7921759 Michael Halcrow 2007-10-16 427 "encrypted extent\n");
237fead619984c Michael Halcrow 2006-10-04 428 goto out;
237fead619984c Michael Halcrow 2006-10-04 429 }
0f89617623fed9 Tyler Hicks 2013-04-15 430
0216f7f7921759 Michael Halcrow 2007-10-16 431 for (extent_offset = 0;
09cbfeaf1a5a67 Kirill A. Shutemov 2016-04-01 432 extent_offset < (PAGE_SIZE / crypt_stat->extent_size);
0216f7f7921759 Michael Halcrow 2007-10-16 433 extent_offset++) {
722a8483fde078 Matthew Wilcox (Oracle 2024-10-17 434) rc = crypt_extent(crypt_stat, enc_extent_page,
722a8483fde078 Matthew Wilcox (Oracle 2024-10-17 435) folio_page(folio, 0), extent_offset, ENCRYPT);
237fead619984c Michael Halcrow 2006-10-04 436 if (rc) {
0216f7f7921759 Michael Halcrow 2007-10-16 437 printk(KERN_ERR "%s: Error encrypting extent; "
18d1dbf1d401e8 Harvey Harrison 2008-04-29 438 "rc = [%d]\n", __func__, rc);
237fead619984c Michael Halcrow 2006-10-04 439 goto out;
237fead619984c Michael Halcrow 2006-10-04 440 }
237fead619984c Michael Halcrow 2006-10-04 441 }
0216f7f7921759 Michael Halcrow 2007-10-16 442
722a8483fde078 Matthew Wilcox (Oracle 2024-10-17 443) lower_offset = lower_offset_for_page(crypt_stat, &folio->page);
8b70deb8ca901d Fabio M. De Francesco 2023-04-26 444 enc_extent_virt = kmap_local_page(enc_extent_page);
0f89617623fed9 Tyler Hicks 2013-04-15 445 rc = ecryptfs_write_lower(ecryptfs_inode, enc_extent_virt, lower_offset,
09cbfeaf1a5a67 Kirill A. Shutemov 2016-04-01 446 PAGE_SIZE);
8b70deb8ca901d Fabio M. De Francesco 2023-04-26 447 kunmap_local(enc_extent_virt);
0216f7f7921759 Michael Halcrow 2007-10-16 448 if (rc < 0) {
0f89617623fed9 Tyler Hicks 2013-04-15 449 ecryptfs_printk(KERN_ERR,
0f89617623fed9 Tyler Hicks 2013-04-15 450 "Error attempting to write lower page; rc = [%d]\n",
0216f7f7921759 Michael Halcrow 2007-10-16 451 rc);
237fead619984c Michael Halcrow 2006-10-04 452 goto out;
237fead619984c Michael Halcrow 2006-10-04 453 }
237fead619984c Michael Halcrow 2006-10-04 454 rc = 0;
0216f7f7921759 Michael Halcrow 2007-10-16 455 out:
7fcba054373d5d Eric Sandeen 2008-07-28 456 if (enc_extent_page) {
7fcba054373d5d Eric Sandeen 2008-07-28 457 __free_page(enc_extent_page);
7fcba054373d5d Eric Sandeen 2008-07-28 458 }
0216f7f7921759 Michael Halcrow 2007-10-16 459 return rc;
0216f7f7921759 Michael Halcrow 2007-10-16 460 }
0216f7f7921759 Michael Halcrow 2007-10-16 461
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-10-18 5:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 15:16 [PATCH 00/10] Convert ecryptfs to use folios Matthew Wilcox (Oracle)
2024-10-17 15:16 ` [PATCH 01/10] ecryptfs: Convert ecryptfs_writepage() to ecryptfs_writepages() Matthew Wilcox (Oracle)
2024-10-18 6:23 ` Pankaj Raghav (Samsung)
2024-10-25 17:56 ` Matthew Wilcox
2024-10-17 15:16 ` [PATCH 02/10] ecryptfs: Use a folio throughout ecryptfs_read_folio() Matthew Wilcox (Oracle)
2024-10-18 6:21 ` Pankaj Raghav (Samsung)
2024-10-25 18:50 ` Matthew Wilcox
2024-10-17 15:16 ` [PATCH 03/10] ecryptfs: Convert ecryptfs_copy_up_encrypted_with_header() to take a folio Matthew Wilcox (Oracle)
2024-10-18 3:43 ` kernel test robot
2024-10-18 6:33 ` Pankaj Raghav (Samsung)
2024-10-17 15:16 ` [PATCH 04/10] ecryptfs: Convert ecryptfs_read_lower_page_segment() " Matthew Wilcox (Oracle)
2024-10-17 15:17 ` [PATCH 05/10] ecryptfs: Convert ecryptfs_write() to use " Matthew Wilcox (Oracle)
2024-10-18 8:07 ` Pankaj Raghav (Samsung)
2024-10-17 15:17 ` [PATCH 06/10] ecryptfs: Convert ecryptfs_write_lower_page_segment() to take " Matthew Wilcox (Oracle)
2024-10-17 15:17 ` [PATCH 07/10] ecryptfs: Convert ecryptfs_encrypt_page() " Matthew Wilcox (Oracle)
2024-10-18 5:06 ` kernel test robot [this message]
2024-10-17 15:17 ` [PATCH 08/10] ecryptfs: Convert ecryptfs_decrypt_page() " Matthew Wilcox (Oracle)
2024-10-18 6:39 ` kernel test robot
2024-10-17 15:17 ` [PATCH 09/10] ecryptfs: Convert lower_offset_for_page() " Matthew Wilcox (Oracle)
2024-10-17 15:17 ` [PATCH 10/10] ecryptfs: Pass the folio index to crypt_extent() Matthew Wilcox (Oracle)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202410181219.HUGM3U13-lkp@intel.com \
--to=lkp@intel.com \
--cc=brauner@kernel.org \
--cc=code@tyhicks.com \
--cc=ecryptfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).