From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796327916; b=Dt9tXAQWAZBSrj8Px1z+ImjJp2tYGlN3Shv4eIWWNKeGhLz/CxFp/4olaR0qJAW9C2O4 RVeizIShlddcKhgLA95egsZiN7j3UolX6CK0tmo1p5zwicOqNi/iSWnvNTqglVb3LWjLT +f8eUxSZZU4egeEndELmKeRFdWU+gB96qIObPqkk+yFfvAGQ4MfveicFNfV6/4ZTDRWE5 MwEgvND8G2aD4bIfA+zMAe+74JD0dAEZg4O9yL09fCI7lR5GSWbPtohmFinpl+xEieEoQ kHpW7v+KYmUri3YwxDfUoPIj1ezz0vBDnmoX0XhaLnH7tMXIOAho06zCLLWL+An3ojQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796327916; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=yw2iLcQaqPdA84xcwsK8PvmEJyl+ZATfSbiB+43SnQU=; b=OvwT7UdB+dVEK5MJJ7woZFiuOWRoOBSWG4OMYXplk1yg4VsEDvx79KAUrdoN6KlnccLW PzM0aLLrAU86nixSJwhALM50yLZcMbv4AvuhZD0+biv50VlkMbc7vorys8oKy4yqv+1AE ur+mzSZ3W3aQXxI1r8XBZVuaDI28UvhMpf88JqjVC4qbtuThmU6EY5aesCGK6zDIwVg1I orgm2GmXHsMJECSMN1gHEiTJA+h9kC1xXTSLUgbN6mu3C+P5WciZUDtx+SbL3rLSXNeOP TQLTc+rnmMEHeaAHe1Jx/8YxqIKsVploH5Zw0SEJjh6Urwkl7UOFLxBQJbYzlNkYzrw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Emz7zUR7; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92069606A33D for ; Thu, 3 Dec 2026 19:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Emz7zUR7 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57CC11F0092C; Thu, 3 Dec 2026 19:58:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796327916; bh=yw2iLcQaqPdA84xcwsK8PvmEJyl+ZATfSbiB+43SnQU=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=Emz7zUR7jLEuFIsYG7ZlHg6sCcQzs+V4/bvjAFj9YHu+oc4hI40/qx8wmM5o+5SAd 7Q12cXRK9ad5ak/JrL8S08y+k1holJDtB3wM1WfIJP8/P/+BumCMLaTLGCdUWK6feD vXEc7PVZ7ZWf0gSpNWjeg5AlacN/2qRu10PhYGRNTzREilCbT81jORPQ+Z7cRQK+zw GIK0PpE3ZGDC6YcO7hyZANznyVagjOlgCmq+ReMQ5XTaVV4A9M5VSaENuF6MV5wXBf VV2+fKcThB+YSqlvZ/hGBmbiSYoBz73lPYr8sGeGE6NEQ1+9Xou+IrnQB7MfUzIp+g 4ay2dBPzyqrCw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v10 17/19] tracing/remotes: Add trace_remote cmdline options Reply-To: sashiko-reviews@lists.linux.dev To: "Vincent Donnefort" , linux-trace-kernel@vger.kernel.org In-Reply-To: <20261203190007.2431041-18-vdonnefort@google.com> References: <20261203190007.2431041-1-vdonnefort@google.com> <20261203190007.2431041-18-vdonnefort@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 19:58:36 +0000 X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [High] tracing/remotes: trace_remote_apply_cmdline() breaks arm64 non-pKVM nVHE boot - [Low] tracing/remotes: buf_size=3D accepts sub-KiB values causing buffer_size_kb 0 - [Low] tracing/remotes: commit message omits supported trace_remote=3D options -- commit a2c801edeccc3e60146d0407c3cc18baac9e6aec Author: Vincent Donnefort > tracing/remotes: Add trace_remote cmdline options > > Following the same format as trace_instance, add a cmdline to configure > a trace remote on registration: > > trace_remote=3D^^,, > > Enabling events automatically turns on tracing. > > Signed-off-by: Vincent Donnefort [Severity: Low] This isn't a bug, but the commit message only shows ^ placeholders and omits the four options added here (dump_on_panic, dmesg, buf_size=3D, and poll=3D), their units, and support for repeating trace_remote=3D. Even though commit "Documentation/kernel-parameters: Add trace_remote" documents them in kernel-parameters.txt, listing them here would make this changelog self-contained. > diff --git a/kernel/trace/trace_remote.c b/kernel/trace/trace_remote.c > index 7a79e43dcd46a..70415ecf45b72 100644 > --- a/kernel/trace/trace_remote.c > +++ b/kernel/trace/trace_remote.c [ ... ] > @@ -1177,6 +1179,136 @@ static int poll_ms_show(struct seq_file *s, void = *unused) [ ... ] > +static bool trace_remote_apply_cmdline_opts(struct trace_remote *remote,= char *cmdline) > +{ [ ... ] > + } else if (!strncmp(opt, "buf_size=3D", 9)) { > + unsigned long long size; > + char *end; > + > + size =3D memparse(opt + 9, &end); > + if (!*end && size && size < ULONG_MAX) > + WRITE_ONCE(remote->trace_buffer_size, size); > + else > + pr_warn("Invalid trace remote buffer size '%s'\n", opt); [Severity: Low] Should buf_size=3D require at least SZ_1K? memparse() parses bytes, so a sub-KiB value like buf_size=3D512 is accepted here and then displayed as 0 by buffer_size_kb_show() (which shifts trace_buffer_size right by 10), even though buffer_size_kb_write() rejects 0 KiB as invalid. [ ... ] > @@ -1353,6 +1485,7 @@ int trace_remote_register(const char *name, struct = trace_remote_callbacks *cbs, > } > =20 > list_add(&remote->node, &trace_remotes); > + trace_remote_apply_cmdline(name, remote); > retain_and_null_ptr(remote); > =20 > return 0; [Severity: High] Can calling trace_remote_apply_cmdline() synchronously here break arm64 non-pKVM nVHE boot? On non-pKVM nVHE, init_subsystems() calls kvm_hyp_trace_init() -> trace_remote_register("hypervisor", ...) inside a temporary EL2 window and immediately tears EL2 back down: arch/arm64/kvm/arm.c:init_subsystems() { ... err =3D kvm_hyp_trace_init(); if (err) kvm_err("Failed to initialize Hyp tracing\n"); out: if (err) hyp_cpu_pm_exit(); if (err || !is_protected_kvm_enabled()) on_each_cpu(cpu_hyp_uninit, NULL, 1); ... } When booted with trace_remote=3Dhypervisor, or trace_remote=3Dhypervisor^dmesg, trace_remote_apply_cmdline() starts periodic EL2 hypercall workers (hyp_clock.work and/or remote->poll_work) before cpu_hyp_uninit() restores __hyp_stub_vectors. Subsequent kvm_call_hyp_nvhe() calls from those workers then fail against __hyp_stub_vectors and trigger repeated WARN_ON(res.a0 !=3D SMCCC_RET_SUCCE= SS) splats in __kvm_call_hyp_nvhe() (continuously with kvm.enable_virt_at_load= =3D0, or if kvm_init() fails and runs teardown_hyp_mode()). --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203190007.2431= 041-1-vdonnefort@google.com?part=3D17