From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51203 invoked by alias); 19 Jul 2017 08:40:35 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 52701 invoked by uid 89); 19 Jul 2017 08:33:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Subject: Re: [PATCH] S390: Sync ptrace.h with kernel. [BZ #21539] To: libc-alpha@sourceware.org References: <20170613200522.GA14306@altlinux.org> <20170718102039.GA20971@altlinux.org> <2e9fcbdc-4060-5e1d-8866-82aaca9316b1@linux.vnet.ibm.com> <20170718141535.GB23830@altlinux.org> From: Stefan Liebler Date: Wed, 19 Jul 2017 08:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170718141535.GB23830@altlinux.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17071908-0012-0000-0000-000005642894 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071908-0013-0000-0000-000018D7D467 Message-Id: <8cb2be0a-794c-c5f4-480b-c246d8ef5603@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-19_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707190139 X-SW-Source: 2017-07/txt/msg00670.txt.bz2 On 07/18/2017 04:15 PM, Dmitry V. Levin wrote: > On Tue, Jul 18, 2017 at 03:41:41PM +0200, Stefan Liebler wrote: >> On 07/18/2017 12:20 PM, Dmitry V. Levin wrote: >>> On Mon, Jun 19, 2017 at 03:10:57PM +0200, Stefan Liebler wrote: > [...] >>> Mark Wielaard has spotted [1] a regression that I missed during review. >>> After this change, this test case fails to compile with the following >>> diagnostics: >>> >>> $ gcc -c -xc -o/dev/null - <<'EOF' >>> #include >>> #include >>> EOF >> Is this order required? > > No, the reversed order also works. > >> I've tried it on x86_64 RHEL 7.3: >> In file included from /usr/include/asm/ptrace.h:5:0, >> from :1: >> /usr/include/sys/ptrace.h:74:4: error: expected identifier before >> numeric constant >> PTRACE_GETREGS = 12, >> ^ > > Interesting. So it means that it didn't work with some old linux headers. > However, it used to work with recent linux headers and glibc-2.25. > >>> In file included from :1:0: >>> /usr/include/sys/ptrace.h:93:3: error: expected identifier before numeric constant >>> PTRACE_SINGLEBLOCK = 12, >>> ^ >>> In file included from :2:0: >>> /usr/include/sys/ptrace.h:158:0: warning: "PTRACE_PEEKUSR_AREA" redefined >>> #define PTRACE_PEEKUSR_AREA PTRACE_PEEKUSR_AREA >>> ^ >>> In file included from :1:0: >>> /usr/include/asm/ptrace.h:392:0: note: this is the location of the previous definition >>> #define PTRACE_PEEKUSR_AREA 0x5000 >>> ^ >>> In file included from :2:0: >>> /usr/include/sys/ptrace.h:161:0: warning: "PTRACE_POKEUSR_AREA" redefined >>> #define PTRACE_POKEUSR_AREA PTRACE_POKEUSR_AREA >>> ^ >>> In file included from :1:0: >>> /usr/include/asm/ptrace.h:393:0: note: this is the location of the previous definition >>> #define PTRACE_POKEUSR_AREA 0x5001 >>> ^ >>> In file included from :2:0: >>> /usr/include/sys/ptrace.h:164:0: warning: "PTRACE_GET_LAST_BREAK" redefined >>> #define PTRACE_GET_LAST_BREAK PTRACE_GET_LAST_BREAK >>> ^ >>> In file included from :1:0: >>> /usr/include/asm/ptrace.h:398:0: note: this is the location of the previous definition >>> #define PTRACE_GET_LAST_BREAK 0x5006 >>> ^ >>> In file included from :2:0: >>> /usr/include/sys/ptrace.h:167:0: warning: "PTRACE_ENABLE_TE" redefined >>> #define PTRACE_ENABLE_TE PTRACE_ENABLE_TE >>> ^ >>> In file included from :1:0: >>> /usr/include/asm/ptrace.h:401:0: note: this is the location of the previous definition >>> #define PTRACE_ENABLE_TE 0x5009 >>> ^ >>> In file included from :2:0: >>> /usr/include/sys/ptrace.h:170:0: warning: "PTRACE_DISABLE_TE" redefined >>> #define PTRACE_DISABLE_TE PTRACE_DISABLE_TE >>> ^ >>> In file included from :1:0: >>> /usr/include/asm/ptrace.h:402:0: note: this is the location of the previous definition >>> #define PTRACE_DISABLE_TE 0x5010 >>> ^ >>> In file included from :2:0: >>> /usr/include/sys/ptrace.h:173:0: warning: "PTRACE_TE_ABORT_RAND" redefined >>> #define PTRACE_TE_ABORT_RAND PTRACE_TE_ABORT_RAND >>> ^ >>> In file included from :1:0: >>> /usr/include/asm/ptrace.h:403:0: note: this is the location of the previous definition >>> #define PTRACE_TE_ABORT_RAND 0x5011 >>> ^ >>> >>> The following change fixes this and similar compilation issues that arise >>> when sys/ptrace.h is included after linux/ptrace.h: >>> >>> --- a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h >>> +++ b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h >>> @@ -24,24 +24,61 @@ >>> #include >>> >>> __BEGIN_DECLS >>> -#ifdef _LINUX_PTRACE_H >>> +#if defined _LINUX_PTRACE_H || defined _S390_PTRACE_H >> Shall we also add "|| defined _UAPI_LINUX_PTRACE_H" here? > > Isn't _UAPI prefix automatically stripped during linux headers export > procedure? > > Yes you are right. I've viewed the file in the kernel-sources and missed this fact.