From patchwork Sun Mar 19 15:09:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 1758652 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=FddwaK6j; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PfhCn72dlz1yWs for ; Mon, 20 Mar 2023 02:11:33 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6C4E63854801 for ; Sun, 19 Mar 2023 15:11:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C4E63854801 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679238690; bh=p/FlQP0C1oC60eD/MrptWJebawxHEhkz2UPsSAmbTDA=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=FddwaK6jGW+q1wcAOpc8YyTu+84kPdkpWyyAFbuz1NxmVILGBBB4qDpx/CUWqznWF 5E3WbrDh5A/hdYGkqhdOy7gaXV4KhPR4/ZFPb9yuugMH7PKDhn5wq6M9SEF1qo71Rj W12NdGnLiZJK/VBlLk7iuCYKmX93nAavHbAfgheo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by sourceware.org (Postfix) with ESMTPS id 426233858423 for ; Sun, 19 Mar 2023 15:11:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 426233858423 Received: by mail-lj1-x22f.google.com with SMTP id a32so9695312ljr.9 for ; Sun, 19 Mar 2023 08:11:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679238659; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p/FlQP0C1oC60eD/MrptWJebawxHEhkz2UPsSAmbTDA=; b=KJWnSwLyMw+ylb8FxQSB9NBMBMqS4rq3+p/sYV+5mRm77rSqq+19vsiI6WDGRF+oC5 2evGSA7igMCNchyTaxGKPNZakqdNNh1E8Om4f/NZNk3BCuwqHjg10F4u6m0Ly3mrhHbF eJn9Ed8LWoN7ACBI+HHrsFuZp1E4M4cFHyy427tt5t3AHoqAh3/olz3rEOpOZj6g+p33 36UUwf+lWBxqGY2sS+GOyICMWa69FpIXDP71CIW+4mjXJdWrJTsjOHPkurQZpO3FTUOm /458IzPq52FWqdst4I61/c+peMbXTXbJdW4aLAj5/v63BCNU0ReRcU7/0PYBcd1xdvW1 XmEQ== X-Gm-Message-State: AO0yUKWfpv1nDrZejE0EmWLpbw1aa0jdI36ANyC5XDHnTMgtl+ORiA+T FjqEcliaNkxETgtPZyvkMlxvKM4I3ttzCw== X-Google-Smtp-Source: AK7set/5LBa88pAMumlQaJnb+KMfZIHYxRWlm22yqXd9lluyifOmClVsgpru4rxxuvUgkmagbg6ODw== X-Received: by 2002:a2e:b895:0:b0:295:a958:2bca with SMTP id r21-20020a2eb895000000b00295a9582bcamr6173648ljp.6.1679238659587; Sun, 19 Mar 2023 08:10:59 -0700 (PDT) Received: from surface-pro-6.. ([2a00:1370:818c:4a57:577a:76f4:df43:5e66]) by smtp.gmail.com with ESMTPSA id m19-20020ac24253000000b004e90dee5469sm1274089lfl.157.2023.03.19.08.10.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 08:10:59 -0700 (PDT) To: libc-alpha@sourceware.org, bug-hurd@gnu.org Cc: Samuel Thibault , Sergey Bugaev Subject: [RFC PATCH glibc 04/34] hurd: Make exception subcode a long Date: Sun, 19 Mar 2023 18:09:47 +0300 Message-Id: <20230319151017.531737-5-bugaevc@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230319151017.531737-1-bugaevc@gmail.com> References: <20230319151017.531737-1-bugaevc@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Sergey Bugaev via Libc-alpha From: Sergey Bugaev Reply-To: Sergey Bugaev Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" On EXC_BAD_ACCESS, exception subcode is used to pass the faulting memory address, so it needs to be (at least) pointer-sized. Thus, make it into a long. This matches the corresponding change in GNU Mach. --- hurd/catch-exc.c | 2 +- hurd/hurd/signal.h | 5 +++-- hurd/hurdfault.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hurd/catch-exc.c b/hurd/catch-exc.c index e8a9c798..5ee2233a 100644 --- a/hurd/catch-exc.c +++ b/hurd/catch-exc.c @@ -31,7 +31,7 @@ _S_catch_exception_raise (mach_port_t port, mach_msg_type_number_t codeCnt #else /* Vanilla Mach 3.0 interface. */ integer_t exception, - integer_t code, integer_t subcode + integer_t code, long_integer_t subcode #endif ) { diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h index 4e9f79b1..c33f974b 100644 --- a/hurd/hurd/signal.h +++ b/hurd/hurd/signal.h @@ -51,9 +51,10 @@ struct hurd_signal_preemptor; /* */ struct hurd_signal_detail { /* Codes from origination Mach exception_raise message. */ - integer_t exc, exc_code, exc_subcode; + integer_t exc, exc_code; + long_integer_t exc_subcode; /* Sigcode as passed or computed from exception codes. */ - integer_t code; + long_integer_t code; /* Error code as passed or extracted from exception codes. */ error_t error; }; diff --git a/hurd/hurdfault.c b/hurd/hurdfault.c index 069c1c26..a81e7280 100644 --- a/hurd/hurdfault.c +++ b/hurd/hurdfault.c @@ -45,7 +45,7 @@ _hurdsig_fault_catch_exception_raise (mach_port_t port, mach_msg_type_number_t codeCnt #else /* Vanilla Mach 3.0 interface. */ integer_t exception, - integer_t code, integer_t subcode + integer_t code, long_integer_t subcode #endif ) {