From patchwork Tue Nov 24 08:36:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: max X-Patchwork-Id: 547888 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 49A8C1402F0 for ; Tue, 24 Nov 2015 19:36:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=HYRl6bq0; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=V1rVTYDOxvRvA+ejH PXEV1HbyuL5ZyoNG7C1MahbCF7buqxALNP7LyXlwC3bEy4GsMz6Rn+uwPMLR+81R zDKhPunKc7IejKpHzQ26yCehshYObuiM+U0bvwCxqcg7drnL1pnD1Vza4I09Abrz yJhZR0vNzczleETyjlEc/Wln0U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=nYFXWJrmwht7YxDg0xzzjhO C/WE=; b=HYRl6bq0QQGo+Yxfk5bZtQVHBbWQbQMGrNJLFGVbKsl21avdN4kB0qI xjaJzCYHXZyKrtw8Wv4V8XARTXLZ+3Q6zm7/cDneQNMmOnDJ10FKwpPAwO1pDcLK nT2Rfktv9JKprQ5iYHEXaSKbNf5srodbIP2XZ/VP9SFR0FcnHjPQ= Received: (qmail 12775 invoked by alias); 24 Nov 2015 08:36:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 12751 invoked by uid 89); 24 Nov 2015 08:36:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mailout4.w1.samsung.com Received: from mailout4.w1.samsung.com (HELO mailout4.w1.samsung.com) (210.118.77.14) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 24 Nov 2015 08:36:30 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NYB00JSN98QXY40@mailout4.w1.samsung.com> for gcc-patches@gcc.gnu.org; Tue, 24 Nov 2015 08:36:26 +0000 (GMT) Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id F2.43.16778.A8124565; Tue, 24 Nov 2015 08:36:26 +0000 (GMT) Received: from [106.109.128.194] by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NYB00ART98PQM00@eusync4.samsung.com>; Tue, 24 Nov 2015 08:36:26 +0000 (GMT) Subject: Re: [PATCH 1/2] Libsanitizer merge from upstream r253555. To: Jakub Jelinek References: <5652C3E0.4030000@partner.samsung.com> <5652C459.8090500@partner.samsung.com> <20151123080753.GS5675@tucnak.redhat.com> <565307B5.3000901@partner.samsung.com> <20151123124112.GA5675@tucnak.redhat.com> <565312DE.2020207@partner.samsung.com> <20151123132411.GB5675@tucnak.redhat.com> <565416E9.3080905@partner.samsung.com> <20151124082523.GK5675@tucnak.redhat.com> Cc: Christophe Lyon , Kostya Serebryany , GCC Patches , Yury Gribov , Vyacheslav Barinov , Slava Garbuzov , Adhemerval Zanella From: Maxim Ostapenko Message-id: <56542184.5040003@partner.samsung.com> Date: Tue, 24 Nov 2015 11:36:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-version: 1.0 In-reply-to: <20151124082523.GK5675@tucnak.redhat.com> Content-type: multipart/mixed; boundary=------------060104010305000805090109 X-IsSubscribed: yes On 24/11/15 11:25, Jakub Jelinek wrote: > On Tue, Nov 24, 2015 at 10:51:05AM +0300, Maxim Ostapenko wrote: >> Ok, I posted a fix to upstream (http://reviews.llvm.org/D14921) yesterday, >> but it's still not reviewed. So, I'm wondering if I should fix the issue >> locally? >> Attaching proposed fix following Jakub's suggestion. >> >> Christophe could you try the patch? >> diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog >> index b97fc7d..c392c57 100644 >> --- a/libsanitizer/ChangeLog >> +++ b/libsanitizer/ChangeLog >> @@ -1,3 +1,7 @@ >> +2015-11-24 Maxim Ostapenko >> + >> + * include/system/linux/asm/ptrace.h: New header. >> + >> 2015-11-23 Maxim Ostapenko >> >> * All source files: Merge from upstream r253555. >> diff --git a/libsanitizer/include/system/linux/asm/ptrace.h b/libsanitizer/include/system/linux/asm/ptrace.h >> new file mode 100644 >> index 0000000..dbdd58b >> --- /dev/null >> +++ b/libsanitizer/include/system/linux/asm/ptrace.h >> @@ -0,0 +1,8 @@ >> +#include_next >> +#if defined(__arm__) >> +#ifndef ARM_VFPREGS_SIZE >> +/* The size of the user-visible VFP state as seen by PTRACE_GET/SETVFPREGS >> + and core dumps. */ >> +#define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) >> +#endif >> +#endif > You could have just used #if defined(__arm__) && !defined(ARM_VFPREGS_SIZE) > or #ifdef __arm__ > or #if !defined(ARM_VFPREGS_SIZE). > Mixing if defined with ifndef on the next line is just weird. > And, you should mention which kernel version introduced ARM_VFPREGS_SIZE > macro (I believe it was 2011-ish, but have not checked exact kernel > version). > > Jakub Ok, does it look better now? -Maxim diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index b97fc7d..c392c57 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,7 @@ +2015-11-24 Maxim Ostapenko + + * include/system/linux/asm/ptrace.h: New header. + 2015-11-23 Maxim Ostapenko * All source files: Merge from upstream r253555. diff --git a/libsanitizer/include/system/linux/asm/ptrace.h b/libsanitizer/include/system/linux/asm/ptrace.h new file mode 100644 index 0000000..d4249fe --- /dev/null +++ b/libsanitizer/include/system/linux/asm/ptrace.h @@ -0,0 +1,7 @@ +#include_next +/* ARM_VFPREGS_SIZE has been added in 3.0 */ +#if defined(__arm__) && !defined(ARM_VFPREGS_SIZE) +/* The size of the user-visible VFP state as seen by PTRACE_GET/SETVFPREGS + and core dumps. */ +#define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) +#endif