NetBSD Problem Report #58373

From www@netbsd.org  Thu Jun 27 13:08:47 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1C10D1A923A
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 27 Jun 2024 13:08:47 +0000 (UTC)
Message-Id: <20240627130845.E82BF1A923C@mollari.NetBSD.org>
Date: Thu, 27 Jun 2024 13:08:45 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: Missing KDTRACE_HOOKS in Xen kernels
X-Send-Pr-Version: www-1.0

>Number:         58373
>Category:       port-xen
>Synopsis:       Missing KDTRACE_HOOKS in Xen kernels
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    riastradh
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 27 13:10:00 +0000 2024
>Closed-Date:    
>Last-Modified:  Fri May 23 02:50:01 +0000 2025
>Originator:     Taylor R Campbell
>Release:        10
>Organization:
The XenBSDtrace Foundation
>Environment:
>Description:
Committed to HEAD but never pulled up:

https://mail-index.netbsd.org/source-changes/2023/07/21/msg146150.html
https://mail-index.netbsd.org/source-changes/2023/07/21/msg146151.html
https://mail-index.netbsd.org/source-changes/2023/07/21/msg146152.html
https://mail-index.netbsd.org/source-changes/2023/07/22/msg146171.html
https://mail-index.netbsd.org/source-changes/2023/07/22/msg146172.html
https://mail-index.netbsd.org/source-changes/2023/07/22/msg146173.html
>How-To-Repeat:
# modload dtrace
[ 591773.132744] kobj_checksyms, 1004: [solaris]: linker error: symbol `sdt_provider_sdt' not found
[ 591773.132744] WARNING: module error: unable to affix module `solaris', error 8
[ 591773.132744] WARNING: module error: recursive load failed for `dtrace' (`solaris' required), error 8

>Fix:
pull up changes to 10

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-xen-maintainer->riastradh
Responsible-Changed-By: riastradh@NetBSD.org
Responsible-Changed-When: Thu, 27 Jun 2024 13:25:50 +0000
Responsible-Changed-Why:
mine


State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Thu, 27 Jun 2024 13:25:50 +0000
State-Changed-Why:
fixed in HEAD, needs pullup-10
pullup-9 might require more work to test


State-Changed-From-To: needs-pullups->open
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sat, 12 Oct 2024 13:31:37 +0000
State-Changed-Why:
If I recall correctly, on analysis of PR 57535 (which I foolishly
neglected to write down there), the Xen kernel doesn't get loaded with
CTF data, which makes dtrace much less useful.  So that really needs to
be fixed first.

Specifically (going off vague memory), I think the kernel image that
xen_init_ksyms passes through to ksysm_addsyms_elf, whose parameters
have been set up in locore.S, is missing a .SUNW_ctf section.

Need to look closer into this -- it's been a while since I looked at
this and I don't seem to have written it down contemporaneously.


From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58373 CVS commit: src/sys/arch
Date: Fri, 23 May 2025 02:48:19 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Fri May 23 02:48:19 UTC 2025

 Modified Files:
 	src/sys/arch/amd64/amd64: cpufunc.S
 	src/sys/arch/i386/i386: cpufunc.S

 Log Message:
 x86: Expose dtrace_smap_enable/disable symbols even under XENPV.

 They're no-ops in that case, but this enables the dtrace modules to
 load and work.

 PR port-xen/58373: Missing KDTRACE_HOOKS in Xen kernels


 To generate a diff of this commit:
 cvs rdiff -u -r1.68 -r1.69 src/sys/arch/amd64/amd64/cpufunc.S
 cvs rdiff -u -r1.52 -r1.53 src/sys/arch/i386/i386/cpufunc.S

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.