From patchwork Mon Nov 6 04:13:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Cruz X-Patchwork-Id: 1859710 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=VcPPMTyB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SNydk3DhYz1yQY for ; Mon, 6 Nov 2023 15:13:46 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 211AA3858412 for ; Mon, 6 Nov 2023 04:13:44 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by sourceware.org (Postfix) with ESMTPS id 07EB03858D3C for ; Mon, 6 Nov 2023 04:13:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 07EB03858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 07EB03858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::834 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699244016; cv=none; b=iU1GGdFissg0HLMdF/ievdtQbDy2eM7+qr/baQGQgR+gw8/z2sPnQK4/bXMVjmBoQ+HrC6cKRxXJkXJYLOV6dVQlaNo0G6y/t88HMltQPirOJeurgKSaNbarLFl62xuxfjIQtiju7T69PGuYN9q/VgntiwkwtfrwVhDK+UB36qo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699244016; c=relaxed/simple; bh=jyL/BN98Kvktbyn4Ga1LNoskT0omSX0j90z51FBDbv0=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=bysyz/OB7H1hUDH0gZEXjcs64DT5CZZVbtRt+p8HIjGKnBXDubxvD05yRXGiCYbIHzKIbndaSl6d0zGc8TOMydey/8Uqjn0UBGhQdcxO5NfRntbY4L2HXhZH/nz41Mxi+hX9JG+dsTXNNX3u5kAQnC55x5JIvVVrZrkUtI8mIGA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-41b7fd8f458so26406551cf.0 for ; Sun, 05 Nov 2023 20:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699244014; x=1699848814; darn=sourceware.org; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=0WjBel2dC/Y1BdaENndBcABQsAbNBxJ9qZMe5dRcBk8=; b=VcPPMTyBl/dk87p6SZm4n/6Xnt7sNtP65E4j/8tPlR4O4Ax7FJ0HEXqdlu1w6Q99zA 1LvrYoktWLIo4GcxAfq5aOhDO4mbGb4+j6UxL68vqfFlmPSlt1ZLPLMEN/T1QFxiAJFp L2cYJmqHuybTa52v6yZGH3g/MM6COxO834PPcWxbzJmswQ+qpfTnAhfRC+xeg1uHThHT 8GmBS5jEoE4w3cpEnlNsriRlDgxaglV4/G9C0Whfri7zqj++cNJ7MTMdUHuaJMbp1Vof 1wJU8a/uEj9QfqtM6nmamaNP6gyX1PEM8q6WOFfu+bL/F+pzTLdWyyUXdb/Zwa9ISaTW ufEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699244014; x=1699848814; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0WjBel2dC/Y1BdaENndBcABQsAbNBxJ9qZMe5dRcBk8=; b=H3rwb+fDqsL497UWRSohVvjNs2MYPryyXiBFb/5FMOAAoCFh4FMXX788NnnHu8Zv0I OR8/Nm2hDxtmP4Yf7QKqOddYqVststMtdsP4pzZGmhxZsv8BDNHJ/8rOjIssoHD43YGp p/nsPxUTeKQ2q9o2jMWR1AUcag1yl6Xr0F8P8AA+lcX0ekbqEY+AgFW1co28yAl1AQ1S C1gDvTGgrFt8zWJD0qDaI7Y8tbd67i96U1KzwINYWOhQNMpl41E8E22H+/NhzwDONT5F qjRUO3E6axJWzMgb+G9Yq7yLACWGsvkkL1c7yDTRwLfeYWyCVDWSHwkBfkDZdlF1cU5j gX9A== X-Gm-Message-State: AOJu0YysOMaAC5lZoht6EkuXSap1XNpNt6eMpRNIKwjIilSlcj+MRtE2 qXaYpyatX9wKK+peuoxaaDVqZFo83g== X-Google-Smtp-Source: AGHT+IFxjpWpZVhSaG1NxB+aHCaAeoE1AlT+SQBKI8I8wFeMhclFjfI3+OedViVYESeUHD77mC92pQ== X-Received: by 2002:a05:622a:170e:b0:41e:1755:1d5d with SMTP id h14-20020a05622a170e00b0041e17551d5dmr34229502qtk.60.1699244014215; Sun, 05 Nov 2023 20:13:34 -0800 (PST) Received: from jupiter.tail36e24.ts.net (dynamic-acs-24-154-253-225.zoominternet.net. [24.154.253.225]) by smtp.gmail.com with ESMTPSA id g20-20020ac84694000000b00419ab6ffedasm3032554qto.29.2023.11.05.20.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 20:13:33 -0800 (PST) Date: Sun, 5 Nov 2023 23:13:32 -0500 From: Flavio Cruz To: bug-hurd@gnu.org, libc-alpha@sourceware.org Subject: [PATCH glibc] Update BAD_TYPECHECK to work on x86_64 Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org --- sysdeps/mach/mach_rpc.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sysdeps/mach/mach_rpc.h b/sysdeps/mach/mach_rpc.h index 152f057ca7..ed81403be6 100644 --- a/sysdeps/mach/mach_rpc.h +++ b/sysdeps/mach/mach_rpc.h @@ -20,11 +20,8 @@ /* Macro used by MIG to cleanly check the type. */ #define BAD_TYPECHECK(type, check) __glibc_unlikely (({ \ - union { mach_msg_type_t t; uint32_t w; } _t, _c; \ + union { mach_msg_type_t t; uintptr_t w; } _t, _c; \ _t.t = *(type); _c.t = *(check);_t.w != _c.w; })) -/* TODO: add this assertion for x86_64. */ -#ifndef __x86_64__ -_Static_assert (sizeof (uint32_t) == sizeof (mach_msg_type_t), - "mach_msg_type_t needs to be the same size as uint32_t"); -#endif +_Static_assert (sizeof (uintptr_t) == sizeof (mach_msg_type_t), + "mach_msg_type_t needs to be the same size as uintptr_t");