From patchwork Fri Jun 26 19:45:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 488979 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B286B14012C for ; Sat, 27 Jun 2015 05:45:32 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=sourceware.org header.i=@sourceware.org header.b=PA5XHAxk; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; q=dns; s=default; b=Lfv wPwGmA0iroCe2EbmPEGEAJXli21KbRK+fcG9FfhgPl/rXCDixnRe3WUGzxXLF4Fc uzXQZGGv9vp/qnAdtMHrYgo05IAE6GNmqEExgBuISk/X35to2C9zDLDZrQi4rMQD FryL13wKvL05LVOulfrVLSwvccxfjmtNrPUHe4Qw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; s=default; bh=6atm2Z6xU CNpIdVppdzaaGyneRc=; b=PA5XHAxki2pSV+a857zS5BirOuGH8uthTiW2RvhpH 6bxD9LcANLpf667FIdJRilE2MIw57tHWJ2n0Zgq10uggV+7Arvn1gOSm0UIdwQo9 ZnXpX23a1HiiwPgp1xeAl09SBYlJ6EK+jr0whnjyQqZqJsKcdoRbzk5MovDG5swX 3E= Received: (qmail 91129 invoked by alias); 26 Jun 2015 19:45:16 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 90941 invoked by uid 89); 26 Jun 2015 19:45:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f178.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=iS6RLfXVW1Qo74rCrozmVx7pqGXUiz4Ws4pw97RgBrI=; b=Lrg7y0WjeqCiYVaEhwpRrKOWCJC4Bhz276MqJvTT19zb5fztggA7qONAmVCQg7uhjq vUVBmzu6LU4NcnfjCWogLEcfKAFjfhDG/DGtSggltT8f0wz1vge7Xs5/0XrPrXz33k4e oFgxwxzfCYhJd6r91V4U2NtbmhsqcUFLKv5rw5l9nxENPr0cZZP0Uee9sLAa4jea4XvH /wNHjwC2RNKF/9aTHfz0hUQgwpIQRpJJpQtKOrI/jr14lYXpHuOzIrCb/c74sSaRNxlp 4dd2oWA5vha8S0ACafhqvdLDC3dPm6nGgRF7SNcFJQJnOJxWxuIbl6LQl2SKxK+WBAF9 oy2g== X-Gm-Message-State: ALoCoQln9+6Vvw/Ip7dEojXJ3zaE9NQ+arUyWv60AbQGBNpV2ztgFZvQRoGZrmQZgNrV0zawFxwm X-Received: by 10.129.48.79 with SMTP id w76mr3798886yww.3.1435347905299; Fri, 26 Jun 2015 12:45:05 -0700 (PDT) Message-ID: <558DABBE.2050308@linaro.org> Date: Fri, 26 Jun 2015 16:45:02 -0300 From: Adhemerval Zanella User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: GNU C Library Subject: [PATCH 04/08] nptl: x32: Fix Race conditions in pthread cancellation (BZ#12683) This patches adds the x32 modification required for the BZ#12683 fix. It basically adjust the syscall size used to pass the arguments to the syscall cancel wrappers. --- * sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h (__syscall_arg_t): Define type for x32. (__SSC): Add platform specific macro. -- diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h index 2324168..f2dc8f0 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h +++ b/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h @@ -18,6 +18,27 @@ #ifndef _LINUX_X32_SYSDEP_H #define _LINUX_X32_SYSDEP_H 1 +#ifndef __ASSEMBLER__ +#include + +typedef long long int __syscall_arg_t; + +/* Syscall arguments for x32 follows x86_64 size, however pointers are 32 + bits in size. This suppress the GCC warning "cast from pointer to + integer of different size" when calling __syscall_cancel with + pointer as arguments. */ +# define __SSC(__x) \ + ({ \ + __syscall_arg_t __ret; \ + DIAG_PUSH_NEEDS_COMMENT; \ + DIAG_IGNORE_NEEDS_COMMENT (4.7, "-Wpointer-to-int-cast"); \ + __ret = (sizeof(1 ? (__x) : 0ULL) < 8 ? \ + (unsigned long int) (__x) : (long long int) (__x)); \ + DIAG_POP_NEEDS_COMMENT; \ + __ret; \ + }) +#endif + /* There is some commonality. */ #include #include