Linux Hardening
 help / color / mirror / Atom feed
From: Erhard Furtner <erhard_f@mailbox.org>
To: LEROY Christophe <christophe.leroy2@cs-soprasteria.com>,
	"linux-hardening@vger.kernel.org"
	<linux-hardening@vger.kernel.org>, Kees Cook <kees@kernel.org>,
	David Howells <dhowells@redhat.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: iov_kunit_copy_to_kvec: ASSERTION FAILED at lib/tests/kunit_iov_iter.c:63, Expected got == npages, but, got == 1 (0x1), npages == 256 (0x100) (v7.0.2, ppc)
Date: Wed, 29 Apr 2026 18:05:06 +0200	[thread overview]
Message-ID: <69f83cbd-8883-4ead-b570-4520379b86e4@mailbox.org> (raw)
In-Reply-To: <d8cbbe3b-7eb0-43c4-ada7-0730f7c05f69@cs-soprasteria.com>

> This happens in alloc_pages_bulk_noprof(), due to
> 
> 	pcp = pcp_spin_trylock(zone->per_cpu_pageset);
> 	if (!pcp)
> 		goto failed;
> 
> Because:
> 
> #ifdef CONFIG_SMP
> [...]
> /*
>    * On CONFIG_SMP=n the UP implementation of spin_trylock() never fails
> and thus
>    * is not compatible with our locking scheme. However we do not need
> pcp for
>    * scalability in the first place, so just make all the trylocks fail
> and take
>    * the slow path unconditionally.
>    */
> #else
> #define pcp_spin_trylock(ptr)		\
> 		NULL
> 
> 
> So apparently it is expected that alloc_pages_bulk() returns 1 on non-SMP.
> 
> Christophe

I got SMP set as my G4 DP got 2 x 7450 cpus.

I can attach full kernel .config when I return on Saturday.

Regards,
Erhard

  reply	other threads:[~2026-04-29 16:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 11:45 iov_kunit_copy_to_kvec: ASSERTION FAILED at lib/tests/kunit_iov_iter.c:63, Expected got == npages, but, got == 1 (0x1), npages == 256 (0x100) (v7.0.2, ppc) Erhard Furtner
2026-04-29 14:55 ` LEROY Christophe
2026-04-29 16:05   ` Erhard Furtner [this message]
2026-04-29 14:56 ` Christophe Leroy (CS GROUP)

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=69f83cbd-8883-4ead-b570-4520379b86e4@mailbox.org \
    --to=erhard_f@mailbox.org \
    --cc=christophe.leroy2@cs-soprasteria.com \
    --cc=dhowells@redhat.com \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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