From patchwork Mon Apr 10 19:58:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 67574 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0E5E83857353 for ; Mon, 10 Apr 2023 19:59:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0E5E83857353 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681156784; bh=gH+wsHrA4aMuqPAMIldW3Gv+a4Cx9un1/WXpgvqZQto=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=sdj3/+JogLC6BhZNQnm2tAT1XM9pLQMc8EWtxIY55GDb1kKNA88s7MMY7C5J6co6q 5yureqv97oHoPk3tA12qkxu8D/D9CNbYbvG/cQVt/8E+cnLaJRUvwX/WR/5vZFlBvC 5gDhNrsU2zJW2fzoue7VlJPdBRev4/qTlhm3D9XA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id 704E43858C1F for ; Mon, 10 Apr 2023 19:59:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 704E43858C1F Received: by mail-ot1-x335.google.com with SMTP id bu14-20020a0568300d0e00b0069fab3f4cafso2819470otb.9 for ; Mon, 10 Apr 2023 12:59:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681156757; x=1683748757; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gH+wsHrA4aMuqPAMIldW3Gv+a4Cx9un1/WXpgvqZQto=; b=0sDD38LsXVTEg2waJ6o2umassqLH7RgV+MAubCnckv9l0p6DDqD1QITM/1DYgRBLxA 0sAb1gon4wpueP6D+ZbwGS0Rxirb1jrwvc60rMkqsBAsY1UjbVhWA5w6QjFQfRpA7Gbv qS6ViLUA/DqDbKdHsQX+YZTgRuC4wORs8EuCZ+CIhW7KErsEKvRzRBtUWAsL1BvWoRdo 2bUEF2MekSiFX+gq39V2Or6R2eL7ykZziwnfV2Vh4sdUT1iCEO97xLuIpxKyZojigAIF iz6U90UFZSHflqJNv7w8774wlOG1GMpEDI94CHM+7efj9Pz+3s9ATV/3HPRrajPzr1F3 vtWw== X-Gm-Message-State: AAQBX9cie6FywOfb1iBFLqgO0Yzgk1Di3th04Y6cLQ/4bzsQE7D+Mz+1 XLpLuNJb0N+caD7qfaKq2+MzmPYSGpz5kywZA9D1TQ== X-Google-Smtp-Source: AKy350ZNNNqaw/cWefe1LT4rxONkFeuaqXuwXnPpw4anq9BiVlBYalW4iy69TfOFxFQ4U5O3RzfPIQ== X-Received: by 2002:a05:6830:1bf4:b0:69f:91eb:87da with SMTP id k20-20020a0568301bf400b0069f91eb87damr4853007otb.16.1681156757198; Mon, 10 Apr 2023 12:59:17 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:55a1:d59a:609a:284:6ed]) by smtp.gmail.com with ESMTPSA id r7-20020a9d7507000000b006a30260ccfdsm4673293otk.11.2023.04.10.12.59.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 12:59:16 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH v5 03/22] x32: Fix Race conditions in pthread cancellation [BZ#12683] Date: Mon, 10 Apr 2023 16:58:48 -0300 Message-Id: <20230410195907.4123869-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410195907.4123869-1-adhemerval.zanella@linaro.org> References: <20230410195907.4123869-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" By adding a x86_64-x32 __SSC macro. Checked on x86_64-linux-gnu-x32. --- .../sysv/linux/x86_64/x32/syscall_types.h | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/x86_64/x32/syscall_types.h diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/syscall_types.h b/sysdeps/unix/sysv/linux/x86_64/x32/syscall_types.h new file mode 100644 index 0000000000..ac2019751d --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/x32/syscall_types.h @@ -0,0 +1,34 @@ +/* Types and macros used for syscall issuing. x86_64/x32 version. + Copyright (C) 2023 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYSCALL_TYPES_H +#define _SYSCALL_TYPES_H + +#include + +typedef long long int __syscall_arg_t; + +/* Syscall arguments for x32 follows x86_64 ABI, however pointers are 32 bits + should be zero extended. */ +#define __SSC(__x) \ + ({ \ + TYPEFY (__x, __tmp) = ARGIFY (__x); \ + (__syscall_arg_t) __tmp; \ + }) + +#endif