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: 50376 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0F9DD228FD for ; Fri, 26 Jun 2015 19:45:39 +0000 (UTC) Received: by widjy10 with SMTP id jy10sf6538188wid.3 for ; Fri, 26 Jun 2015 12:45:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-subscribe:list-archive:list-post:list-help :sender:delivered-to:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding:x-original-sender :x-original-authentication-results; bh=iS6RLfXVW1Qo74rCrozmVx7pqGXUiz4Ws4pw97RgBrI=; b=DSN/JKFAxhSiDuvNRRBGBGzFPuzIWU+8L+1MaFKAA1VzvzJtVkAPeA/YXqg/eZBUuW Uyac3dLFNILPZaudP7qa/1giME2znEWYdZHl1t93AdEfRDhjEjCQTthLVDI9r6U5A2TE 51hzBdP5mOkOHqTRv/sQ8aC8jBMTjcqqae+TEp2toEhUVNxP8x0n3XwRlKZXH8vDFRLg QKogIp7krGA4ITlIfCs4Gdg/k5Pjco7Zuw2b9vh7ZU5QkIYDPCCIBp1Jpq7eDmV/hHzs v1zi9H+ozOqrhiVyebnX3hzl36MY2ByhqDqo7mKPGWCn82JH722gnW3iD6M6u7aQF+Ym BkJA== X-Gm-Message-State: ALoCoQlmALzOMc0BbvJHWnda3LhnhcBx1y69+BLLVjDZTsUPkOOXKpyJLVHMAu5BH7xqrTenfbUg X-Received: by 10.112.40.45 with SMTP id u13mr2194120lbk.0.1435347938214; Fri, 26 Jun 2015 12:45:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.103 with SMTP id kx7ls577458lac.62.gmail; Fri, 26 Jun 2015 12:45:38 -0700 (PDT) X-Received: by 10.112.160.73 with SMTP id xi9mr3047541lbb.92.1435347938073; Fri, 26 Jun 2015 12:45:38 -0700 (PDT) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com. [2a00:1450:4010:c04::234]) by mx.google.com with ESMTPS id kq9si10697182lac.78.2015.06.26.12.45.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jun 2015 12:45:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::234 as permitted sender) client-ip=2a00:1450:4010:c04::234; Received: by lbnk3 with SMTP id k3so70525279lbn.1 for ; Fri, 26 Jun 2015 12:45:38 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr2984743lac.41.1435347937986; Fri, 26 Jun 2015 12:45:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp134901lbb; Fri, 26 Jun 2015 12:45:37 -0700 (PDT) X-Received: by 10.70.41.78 with SMTP id d14mr6581842pdl.35.1435347936385; Fri, 26 Jun 2015 12:45:36 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id jc6si51752472pbd.221.2015.06.26.12.45.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jun 2015 12:45:36 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-60445-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 91129 invoked by alias); 26 Jun 2015 19:45:16 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 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-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) X-Original-Sender: adhemerval.zanella@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::234 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 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