From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 3879F3858433; Thu, 18 Nov 2021 13:33:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3879F3858433 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AICMeuK021930; Thu, 18 Nov 2021 13:33:52 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3cdpsksrbj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Nov 2021 13:33:52 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1AIDV0hA009393; Thu, 18 Nov 2021 13:33:52 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 3cdpsksrax-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Nov 2021 13:33:51 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1AIDHQIw004376; Thu, 18 Nov 2021 13:33:50 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06ams.nl.ibm.com with ESMTP id 3ca4mke9cy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Nov 2021 13:33:50 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1AIDQlqL33882476 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Nov 2021 13:26:47 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9E955A405B; Thu, 18 Nov 2021 13:33:47 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5E2D4A4055; Thu, 18 Nov 2021 13:33:47 +0000 (GMT) Received: from [9.145.72.154] (unknown [9.145.72.154]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 18 Nov 2021 13:33:47 +0000 (GMT) Message-ID: Date: Thu, 18 Nov 2021 14:33:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: glibc build failure due to Systemtap probe change Content-Language: en-US To: Florian Weimer , Stan Cox Cc: Arjun Shankar , libc-alpha@sourceware.org, systemtap@sourceware.org References: <87a6i4e9ej.fsf@oldenburg.str.redhat.com> From: Stefan Liebler In-Reply-To: <87a6i4e9ej.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: gYZq2OxqApvz-c15GuSgEcznrk2MWnn- X-Proofpoint-ORIG-GUID: UzMdfU4pYqVxZFOnxaYMglyV4w7PrQWk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-18_05,2021-11-17_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1011 mlxlogscore=999 bulkscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 phishscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111180077 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2021 13:33:54 -0000 On 16/11/2021 10:29, Florian Weimer wrote: > On Fedora rawhide, glibc no longer builds: > > In file included from ../include/stap-probe.h:25, > from ../sysdeps/s390/s390-64/__longjmp.c:24: > ../sysdeps/s390/s390-64/__longjmp.c: In function '__longjmp': > ../sysdeps/s390/s390-64/__longjmp.c:52:50: error: expected ':' or ')' before numeric constant > 52 | LIBC_PROBE_ASM (longjmp, 8@%1 -4@%0 8@%%r4) > | ^ > ../sysdeps/s390/s390-64/__longjmp.c:52:25: note: in expansion of macro 'LIBC_PROBE_ASM' > 52 | LIBC_PROBE_ASM (longjmp, 8@%1 -4@%0 8@%%r4) > | ^~~~~~~~~~~~~~ > > This is because of a Systemtap probe: > > | /* Jump to the position specified by ENV, causing the > | setjmp call there to return VAL, or 1 if VAL is 0. */ > | void > | __longjmp (__jmp_buf env, int val) > | { > | #ifdef PTR_DEMANGLE > | uintptr_t guard = THREAD_GET_POINTER_GUARD (); > | # ifdef CHECK_SP > | CHECK_SP (env, guard); > | # endif > | #elif defined CHECK_SP > | CHECK_SP (env, 0); > | #endif > | register long int r2 __asm__ ("%r2") = val == 0 ? 1 : val; > | #ifdef PTR_DEMANGLE > | register uintptr_t r3 __asm__ ("%r3") = guard; > | register void *r1 __asm__ ("%r1") = (void *) env; > | #endif > | /* Restore registers and jump back. */ > | __asm__ __volatile__ ( > | /* longjmp probe expects longjmp first argument, second > | argument and target address. */ > | #ifdef PTR_DEMANGLE > | "lmg %%r4,%%r5,64(%1)\n\t" > | "xgr %%r4,%2\n\t" > | "xgr %%r5,%2\n\t" > | LIBC_PROBE_ASM (longjmp, 8@%1 -4@%0 8@%%r4) > | #else > | LIBC_PROBE_ASM (longjmp, 8@%1 -4@%0 8@%%r14) > | #endif > > My guess this is related to the macro changes to support floating point > values in probes added in this commit: > > commit eaa15b047688175a94e3ae796529785a3a0af208 > Author: Stan Cox > Date: Thu Sep 30 16:11:29 2021 -0400 > > PR27829: Support floating point values passed through sdt.h markers > > Add the type to the individual arg entries in the .notes.stapsdt section; > currently SP@A, where S is optional '-' sign, P is precision of type and A is > address. Revised format is SPT@A where T is optional 'f' for float variables. > Add x8664 float registers xmm8 - xmm15 and aarch64 float registers v8 - v31. > Parse the type field; result is currently ignored. asm statements are > restricted to 30 arguments; sdt probes can have up to 12 arguments. To fit > this into a single asm statement, precision and type are encoded into a single > field: 0xSSTT where SS is the precision and TT is the type as encoded by > __builtin_classify_type. The sign S, precision P, and type T are decoded by > _SDT_SIGN, _SDT_SIZE, and _SDT_TYPE. Test that the revised > .notes.stapsdt section interacts correctly with eu-elfutils and gdb. > > The macro changes in this commit seem to trigger additional macro > expansion in the preprocessor, and therefore require syntax closer to C. > > LIBC_PROBE_ASM was added to longjmp to support GDB, but if GDB really > needs this, I'm not sure if Systemtap probes (via ) are the > right mechanism because building with Systemtap support is optional. > Maybe we should copy into the glibc sources, and then we > could drop the floating point support again. 8-/ > > Or we could rewrite s390/s390x __longjmp in assembler. It's mostly > assembler anyway. Stefan, what do you think? I would prefer to keep the c-code with inline-assembly as is. Then we don't need to reimplement the macros in assembler. But let's wait for Stan's experiments with the preprocessed files. > > Thanks, > Florian >