public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn@kernel.org>
To: Andy Chiu <andy.chiu@sifive.com>
Cc: linux-riscv@lists.infradead.org, palmer@dabbelt.com,
	paul.walmsley@sifive.com, greentime.hu@sifive.com,
	guoren@linux.alibaba.com, charlie@rivosinc.com, ardb@kernel.org,
	arnd@arndb.de, peterz@infradead.org, tglx@linutronix.de,
	ebiggers@kernel.org, aou@eecs.berkeley.edu
Subject: Re: [v10, 00/10] riscv: support kernel-mode Vector
Date: Fri, 12 Jan 2024 16:29:19 +0100	[thread overview]
Message-ID: <87o7dqsh80.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <170504103075.17535.16233182023874920613.git-patchwork-notify@kernel.org>

Andy,

> Hello:
>
> This series was applied to riscv/linux.git (for-next)
> by Palmer Dabbelt <palmer@rivosinc.com>:
>

I'm getting some boot issues with this series applied to riscv/for-next.

The full runs (with logs) is here:
https://github.com/linux-riscv/linux-riscv/actions/runs/7498706326

Typically it fails in two ways:
Ubuntu rootfs:
--8<--
[ 4.346414] (sd-gens)[68]: Failed to extract file name from '': Invalid argument
[ 4.390832] systemd[1]: Failed to fork off sandboxing environment for executing generators: Protocol error
[ESC[0;1;31m!!!!!!ESC[0m] Failed to start up manager.
[ 4.440164] systemd[1]: Freezing execution.
--8<--

or:
--8<--
[   14.909912] (sd-gens)[71]: Assertion '!strv_isempty(dirs)' failed at src/shared/exec-util.c:211, function execute_directories(). Aborting.
[   15.008480] systemd[1]: Failed to fork off sandboxing environment for executing generators: Protocol error
[ESC[0;1;31m!!!!!!ESC[0m] Failed to start up manager.
[   15.111989] systemd[1]: Freezing execution.
--8<--

and Alpine with:
--8<--
[ 0.036703] Kernel panic - not syncing: kmem_cache_create_usercopy: Failed to create slab 'riscv_vector_ctx'. Error -22
[ 0.039195] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.7.0-rc1-defconfig_plain-gdf944704182e #1
[ 0.040744] Hardware name: riscv-virtio,qemu (DT)
[ 0.041975] Call Trace:
[ 0.042813] [<ffffffff800067a4>] dump_backtrace+0x1c/0x24
[ 0.044832] [<ffffffff80945980>] show_stack+0x2c/0x38
[ 0.045724] [<ffffffff80952214>] dump_stack_lvl+0x3c/0x54
[ 0.046841] [<ffffffff80952240>] dump_stack+0x14/0x1c
[ 0.047428] [<ffffffff80945e7c>] panic+0x106/0x29e
[ 0.047998] [<ffffffff8015f14c>] kmem_cache_create_usercopy+0x20e/0x258
[ 0.048786] [<ffffffff80a044dc>] riscv_v_setup_ctx_cache+0x2c/0x3c
[ 0.049521] [<ffffffff80a03a48>] arch_task_cache_init+0x10/0x18
[ 0.057832] [<ffffffff80a0706c>] fork_init+0x42/0x168
[ 0.058737] [<ffffffff80a00d70>] start_kernel+0x6ba/0x73a
--8<--

The Alpine boot can be fixed with something like:
--8<--
diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c
index f9769703fd39..0ac79a9cdba5 100644
--- a/arch/riscv/kernel/vector.c
+++ b/arch/riscv/kernel/vector.c
@@ -53,6 +53,9 @@ int riscv_v_setup_vsize(void)
 
 void __init riscv_v_setup_ctx_cache(void)
 {
+       if (!riscv_v_vsize)
+               return;
+
        riscv_v_user_cachep = kmem_cache_create_usercopy("riscv_vector_ctx",
                                                         riscv_v_vsize, 16, SLAB_PANIC,
                                                         0, riscv_v_vsize, NULL);
--8<--

but with this "fix" in place I still get Ubuntu boot failures. To
reproduce the CI locally:

  | git fetch https://github.com/linux-riscv/linux-riscv e2aad75b340d65b0be4d1a689db3e10c6ed3f18e
  | git checkout FETCH_HEAD
  | docker pull ghcr.io/linux-riscv/pw-builder-multi:latest
  | docker run -it --volume $PWD:/build/my-linux ghcr.io/linux-riscv/pw-builder-multi:latest bash
  | # In container
  | bash -l
  | mkdir -p /build/kernels/logs
  | .github/scripts/series/prepare_tests.sh
  | cd /build/my-linux
  | .github/scripts/series/kernel_builder.sh rv64 defconfig plain gcc
  | .github/scripts/series/test_runner.sh rv64 defconfig plain gcc ubuntu
  | .github/scripts/series/test_runner.sh rv64 defconfig plain gcc alpine

Logs in /build/tests/run_test*

I'll continue to debug in the meantime.


Björn

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2024-01-12 15:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 13:15 [v10, 00/10] riscv: support kernel-mode Vector Andy Chiu
2024-01-11 13:15 ` [v10, 01/10] riscv: Add support for kernel mode vector Andy Chiu
2024-01-11 13:15 ` [v10, 02/10] riscv: vector: make Vector always available for softirq context Andy Chiu
2024-01-11 13:15 ` [v10, 03/10] riscv: Add vector extension XOR implementation Andy Chiu
2024-01-11 13:15 ` [v10, 04/10] riscv: sched: defer restoring Vector context for user Andy Chiu
2024-01-11 13:15 ` [v10, 05/10] riscv: lib: vectorize copy_to_user/copy_from_user Andy Chiu
2024-01-11 13:15 ` [v10, 06/10] riscv: fpu: drop SR_SD bit checking Andy Chiu
2024-01-11 13:15 ` [v10, 07/10] riscv: vector: do not pass task_struct into riscv_v_vstate_{save,restore}() Andy Chiu
2024-01-11 13:15 ` [v10, 08/10] riscv: vector: use a mask to write vstate_ctrl Andy Chiu
2024-01-11 13:15 ` [v10, 09/10] riscv: vector: use kmem_cache to manage vector context Andy Chiu
2024-01-11 13:15 ` [v10, 10/10] riscv: vector: allow kernel-mode Vector with preemption Andy Chiu
2024-01-12  6:30 ` [v10, 00/10] riscv: support kernel-mode Vector patchwork-bot+linux-riscv
2024-01-12 15:29   ` Björn Töpel [this message]
2024-01-12 16:03     ` Andy Chiu
2024-01-12 18:35       ` Palmer Dabbelt
2024-01-12 18:47         ` Andy Chiu
2024-01-12 19:01           ` Palmer Dabbelt
2024-01-12 18:46       ` Andy Chiu
2024-01-12 20:04   ` Lad, Prabhakar
2024-01-13 13:25     ` Andy Chiu
2024-01-15 11:36       ` Lad, Prabhakar

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=87o7dqsh80.fsf@all.your.base.are.belong.to.us \
    --to=bjorn@kernel.org \
    --cc=andy.chiu@sifive.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=charlie@rivosinc.com \
    --cc=ebiggers@kernel.org \
    --cc=greentime.hu@sifive.com \
    --cc=guoren@linux.alibaba.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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