From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9EB853857711; Mon, 4 Dec 2023 16:38:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9EB853857711 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1701707906; bh=WI6yTDCaddrFS2aHTqIDgQqUUOfsBvQHmMPrF+2L3pA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wuZYN/+0KiQcBCRobyDIonVGtT7CKFC8oMydS823Y2uW97bEhj1bDaSG0WPIFV8yc lyCRhXPsTifKTe9+q7QL03XT/ThcbxHHtCWLWqCZF/p4Rcqh+lX+WIXewniKf4kIY4 yBDrOYvcM3/ZEd1mCjBcL2l6MdJ7rnlR5+lmfSFw= From: "wcohen at redhat dot com" To: systemtap@sourceware.org Subject: [Bug runtime/31074] On aarch64 the systemtap.base/set_kernel.stp triggers "Unable to handle kernel paging request" Date: Mon, 04 Dec 2023 16:38:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: runtime X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcohen at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31074 William Cohen changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #8 from William Cohen --- Fixed by commit b84a5e8c2c5a857c0790a71df7824259a95131cf (HEAD -> master, origin/mas= ter, origin/HEAD) Author: William Cohen Date: Mon Dec 4 11:28:10 2023 -0500 PR31074: Ensure that the set_kernel_string* functions limit their writes Both the set_kernel_string and set_kernel_string_n function use the underlying _stp_store_deref_string_ function to write strings. There were two issues with the this function: 1) wrote MAXSTRINGLEN bytes even if string was shorter 2) null write at end could spill past end of buffer The first issue was addressed by stopping to write once a null character is encountered. The second issue is a side effect of C implicit promotion of character constants to ints and was addressed by explicitlying casting the character constants as a char. The pr31074.exp test was added to verify that the write length are limited to string length and the null write does not go beyond the end of the buffer. --=20 You are receiving this mail because: You are the assignee for the bug.=