From nobody Thu Aug 17 18:32:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RRYXF09WLz4mWW1; Thu, 17 Aug 2023 18:32:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RRYXD6ZcYz3Rtp; Thu, 17 Aug 2023 18:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692297164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GhfJGQv+HljxxDX2AyWrDVRe1ftO2uGCc3dDQKQO0Rk=; b=A5ctQ59iBnLVhkCqfKfvw92RzYo7HJjE3GVHIlRMD2xAUKQcAgGAWjNpjeIurDg3y5S0N8 N/Nyq9l+0JwhrgAyicUg50zpJCdGYQwlLPG4WuaNJ86Sz4jrtrgoJ6vELmgC1/3ITxsC34 NjKQFCPBYHz5ZhQtPLopb4p7DSr0tvLX15NCCBCJH8S7KfjP0fFI9LlX0ubOd8czugty6w PEui0DPJUNi2jkJjqzMteXSSDZrQAXkFxQqeSB3Fl9cH6yVVrMG4/eE/JNeJaB0Me7kTyC rm0iv8R5sFrnN8KFwWKXxGPnjurAYFHd4lj5bq5Hy+EFeA0/pNng9+CGNKYEqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692297164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GhfJGQv+HljxxDX2AyWrDVRe1ftO2uGCc3dDQKQO0Rk=; b=UQWyI26NdhXDFoXuafG0xP+42Q8O4IxavgpTHGa2K+jNxcetoYLVdzAh/xe4YOhV08e6bZ eDPhv9fif+3IgJF3YxVyvQkHLG+tHanEHD8PYwS5PqKG66cWlWLHrSwHZ3k4JOJ/a/5QQc lMDNUEdVWb2qjapCAxRDFXmaBLlmAkzBf+eySbg0HW3Nq85Qh9Sj7X/mvHuBeop5eiBaov GwVWVSGi4LYOkueDLj+tzuHNHiMdOu9UcR3jaim4qTdrx0qUXBVMf2c9kEtNRul5GBExe5 inGZV16O/VAqn3bk8DfD/1+jE8p28w4qP/rnBji51S5jS9QW9HuQyCnVW+adWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692297164; a=rsa-sha256; cv=none; b=huumuNp5bxsz5A+9le/Ckxz1YCMztr0Ht8N1Ayw3Eqgcaf8GaKaOfsRu6T4/4YqxLD6YW4 nw1sYsoJ6OmnfF9f+cvZj3N4I2fe6Vq1bOMs+bLx0fu1l9RtUSCc0n/oR9bYcFfs/gxwFl gMmfdMsqAEkfb5hw/4Zy9CJR9AhhaRPbQP9LaIUizCyVH1fki3GqDzA0VD4+PsYr4UJpos 0zSyo+p237NLwUl9t+dGo2XaD7K6Z7W0MEBTJc1tPBpGIcZmhsRA5nFLeMeh7yXUgPvBZM iPzYnm0Fduk4sZGWn6Ez/ZkhvJ0qet86tmFss0tz8iccsVjOShu3yhqr4en/1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RRYXD5XyRzlPN; Thu, 17 Aug 2023 18:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37HIWiQY045887; Thu, 17 Aug 2023 18:32:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37HIWinh045884; Thu, 17 Aug 2023 18:32:44 GMT (envelope-from git) Date: Thu, 17 Aug 2023 18:32:44 GMT Message-Id: <202308171832.37HIWinh045884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 638c68897fbd - main - arm64 db_trace: Ensure trapframe pointer is suitably aligned. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 638c68897fbd7623cc0b6fc8e8c31cb124202a55 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=638c68897fbd7623cc0b6fc8e8c31cb124202a55 commit 638c68897fbd7623cc0b6fc8e8c31cb124202a55 Author: John Baldwin AuthorDate: 2023-08-17 18:31:20 +0000 Commit: John Baldwin CommitDate: 2023-08-17 18:32:32 +0000 arm64 db_trace: Ensure trapframe pointer is suitably aligned. Reviewed by: jrtc27, markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D41486 --- sys/arm64/arm64/db_trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/db_trace.c b/sys/arm64/arm64/db_trace.c index 8e8fedc1c5f9..cb1c0789b03f 100644 --- a/sys/arm64/arm64/db_trace.c +++ b/sys/arm64/arm64/db_trace.c @@ -93,7 +93,8 @@ db_stack_trace_cmd(struct thread *td, struct unwind_state *frame) struct trapframe *tf; tf = (struct trapframe *)(uintptr_t)frame->fp - 1; - if (!kstack_contains(td, (vm_offset_t)tf, + if (!__is_aligned(tf, _Alignof(*tf)) || + !kstack_contains(td, (vm_offset_t)tf, sizeof(*tf))) { db_printf("--- invalid trapframe %p\n", tf); break;