From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 6CA4F3833035; Tue, 8 Jun 2021 20:48:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CA4F3833035 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/pthread-multiple-fixes] nptl: x32: Fix Race conditions in pthread cancellation [BZ#12683] X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/pthread-multiple-fixes X-Git-Oldrev: 288ffd18196968c8f3257c3304227adb7bb142d2 X-Git-Newrev: f1abcb2c1bbc558a5728d9ddaabbcb755fe7808d Message-Id: <20210608204855.6CA4F3833035@sourceware.org> Date: Tue, 8 Jun 2021 20:48:55 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 20:48:55 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f1abcb2c1bbc558a5728d9ddaabbcb755fe7808d commit f1abcb2c1bbc558a5728d9ddaabbcb755fe7808d Author: Adhemerval Zanella Date: Wed Jun 2 10:43:37 2021 -0300 nptl: x32: Fix Race conditions in pthread cancellation [BZ#12683] This patches adds the x32 modification required for the BZ#12683. It follows the x86_64-x32 kABI for the _SSC macro. Checked on x86_64-linux-gnu-x32. Diff: --- sysdeps/unix/sysv/linux/x86_64/x32/syscall_types.h | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) 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..bc8baa281a --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/x32/syscall_types.h @@ -0,0 +1,32 @@ +/* Types and macros used for syscall issuing. + Copyright (C) 2021 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 + +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