From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 721D93857C4B; Fri, 1 Dec 2023 16:45:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 721D93857C4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1701449105; bh=auVoOk/6If95bF0N2lI/PkCgQ42YZJfyTBBW7MuAqTI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Gtw3JAmw9AONYxKRQtE+EnaEXgHb6EDX+1tx0BujXqSciLtwQW1deVrSFNJ73RQrz cU/QsgJPUoUnPiWHmVQkH1/mrSHI2PszhQ2GDCb52WTmzmbH0o7wiwKc4oHuMax/Xk dwM6xx3vpBwivlv81dweVc4teeo1oZl4VpaGAxVU= 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: Fri, 01 Dec 2023 16:45:04 +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: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 --- Comment #6 from William Cohen --- The code in loc2c-runtime.c _stp_store_deref_string_() looks like it can w= rite past the end of the buffer. The for loop has a loop test of "i < len-1". = When the for loop exits i =3D=3D len. The statement after the for loop is: err =3D __stp_put_either('\0', (u8 *)addr + i, seg); This would be effectively addressing addr + len. The ranges accessing the buffer should be 0 to len-1. For aarch64 the buffer for set_kernel.stp get_buffer function and the tracepoint_table butt up to each other no padding between them. Some tracepoints on aarch64 map to the tracepoint_table[0] which is getting corrupted. On x86_64 either nothing is getting mapped to tracepoint_table[= 0] or there is some space between the end of buffer and the beginning of tracepoint_table. On aarch64 sizeof('\0') is returning 4 rather than 1 as expected for a character. This would explain 4 bytes of tracepoint_table[0] being 0. --=20 You are receiving this mail because: You are the assignee for the bug.=