mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Gow <david@davidgow.net>
To: "Christian A. Ehrhardt" <lk@c--e.de>,
	David Howells <dhowells@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Cc: Kees Cook <kees@kernel.org>, Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH v3 5/5] lib: kunit_iov_iter: Add tests for extract_iter_to_sg
Date: Tue, 21 Apr 2026 13:45:33 +0800	[thread overview]
Message-ID: <34a81ec2-af84-465d-9b5e-7bb5bf01680f@davidgow.net> (raw)
In-Reply-To: <20260326214905.818170-6-lk@c--e.de>

Le 27/03/2026 à 05:49, Christian A. Ehrhardt a écrit :
> Add test cases that test extract_iter_to_sg.
> 
> For each iterator type an iterator is loaded with a suitable
> buffer. The iterator is then extracted to a scatterlist with
> multiple calls to extract_iter_to_sg. The final scatterlist
> is copied into a scratch buffer.
> 
> The test passes if the scratch buffer contains the same data
> as the original buffer.
> 
> The new tests demonstrate bugs in extract_iter_to_sg
> for kvec and user iterators that are fixed by the previous
> commits.
> 
> Cc: David Howells <dhowells@redhat.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
> ---

Hmm... this is failing on powerpc, where PAGE_SIZE is 64k:

[13:20:40] # iov_kunit_iter_to_sg_kvec: ASSERTION FAILED at 
lib/tests/kunit_iov_iter.c:1084
[13:20:40] Expected tail < bufsize, but
[13:20:40]     tail == 1048576 (0x100000)
[13:20:40]     bufsize == 1048576 (0x100000)
[13:20:40] [FAILED] iov_kunit_iter_to_sg_kvec
[13:20:40] # iov_kunit_iter_to_sg_bvec: ASSERTION FAILED at 
lib/tests/kunit_iov_iter.c:1084
[13:20:40] Expected tail < bufsize, but
[13:20:40]     tail == 1048576 (0x100000)
[13:20:40]     bufsize == 1048576 (0x100000)
[13:20:40] [FAILED] iov_kunit_iter_to_sg_bvec
[13:20:40] # iov_kunit_iter_to_sg_folioq: ASSERTION FAILED at 
lib/tests/kunit_iov_iter.c:1084
[13:20:40] Expected tail < bufsize, but
[13:20:40]     tail == 1048576 (0x100000)
[13:20:40]     bufsize == 1048576 (0x100000)
[13:20:40] [FAILED] iov_kunit_iter_to_sg_folioq
[13:20:40] # iov_kunit_iter_to_sg_xarray: ASSERTION FAILED at 
lib/tests/kunit_iov_iter.c:1084
[13:20:40] Expected tail < bufsize, but
[13:20:40]     tail == 1048576 (0x100000)
[13:20:40]     bufsize == 1048576 (0x100000)
[13:20:40] [FAILED] iov_kunit_iter_to_sg_xarray
[13:20:40] # iov_kunit_iter_to_sg_ubuf: ASSERTION FAILED at 
lib/tests/kunit_iov_iter.c:1084
[13:20:40] Expected tail < bufsize, but
[13:20:40]     tail == 1048576 (0x100000)
[13:20:40]     bufsize == 1048576 (0x100000)
[13:20:40] [FAILED] iov_kunit_iter_to_sg_ubuf
[13:20:40]     # module: kunit_iov_iter
[13:20:40] # iov_iter: pass:12 fail:5 skip:0 total:17
[13:20:40] # Totals: pass:12 fail:5 skip:0 total:17

Any chance we could bump up the buffer size (at least) on systems with 
larger PAGE_SIZE?

Cheers,
-- David

  reply	other threads:[~2026-04-21  5:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26 21:49 [PATCH v3 0/5] Fix bugs in extract_iter_to_sg() Christian A. Ehrhardt
2026-03-26 21:49 ` [PATCH v3 1/5] lib/scatterlist: Fix length calculations in extract_kvec_to_sg Christian A. Ehrhardt
2026-03-26 21:49 ` [PATCH v3 2/5] lib/scatterlist: Fix temp buffer in extract_user_to_sg() Christian A. Ehrhardt
2026-03-26 21:49 ` [PATCH v3 3/5] lib: kunit_iov_iter: Fix memory leaks Christian A. Ehrhardt
2026-03-26 21:49 ` [PATCH v3 4/5] lib: kunit_iov_iter: Improve error detection Christian A. Ehrhardt
2026-03-26 21:49 ` [PATCH v3 5/5] lib: kunit_iov_iter: Add tests for extract_iter_to_sg Christian A. Ehrhardt
2026-04-21  5:45   ` David Gow [this message]
2026-04-21  6:30     ` Christian A. Ehrhardt
2026-04-21  6:49       ` David Gow
2026-03-26 22:39 ` [PATCH v3 0/5] Fix bugs in extract_iter_to_sg() Andrew Morton

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=34a81ec2-af84-465d-9b5e-7bb5bf01680f@davidgow.net \
    --to=david@davidgow.net \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lk@c--e.de \
    --cc=pmladek@suse.com \
    /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

all inboxes | Powered by JetHome®