From patchwork Mon May 10 19:51:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 43361 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 46715383F415; Mon, 10 May 2021 19:51:17 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 23565385802B for ; Mon, 10 May 2021 19:51:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 23565385802B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joseph_myers@mentor.com IronPort-SDR: cP1ySfCsa6aiXUGGlpR88EIqKO6BoVZ04axeYwTevIum7f5jQn6WKJg5+Sd9fpJq8ypPCg6pru kRSMxnbFxExNIkGMlz7SWiCmM8Or1ZzrSXSbyfeWRCyrSYjwO2qupNlBPRoHvLXhKWEf/UUsjo Pp/U2g4k7yepfDFBzd4T/rJNp9NTuJ5Qy6XBkJMMHrHiFgH7tgz2t0PkIqiyyz3rfstoniqZGU uwY4i9U4jAlsYKP9SPqlRxrXvIw9VNkFitK0zQmQCYKJ0n/8q7tYAhDcBwtWUsI9ex/nWleE86 OyM= X-IronPort-AV: E=Sophos;i="5.82,288,1613462400"; d="scan'208";a="61045256" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 10 May 2021 11:51:14 -0800 IronPort-SDR: Ozd7ZyWkdezTAOagdP4Q61drlp4aAx7PC6VsB2Zc+NX0je6LguYoauX3vsZxl0jsPGgwDSOGQB dEEyToAHIRUUfWjU4jaXFampuiHBfCB+crHkZx5Dii4Q5TPXvmH6N/53haR2QYoq+9T652sFYg Dotag59DfT1eMOXzo5kIZYQIwe8FUKU2G94rxbvE/gTMmTTa0BeT2NM8nOEcocrAvBA9TuZqyr UN1R8V+9Zp4UsNW17vA47lqISyKDklEt7uMSzGFhAru0nBRBv8L76k9w8vw9dLzNYdNvz54X4d 4fE= Date: Mon, 10 May 2021 19:51:08 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Subject: Add PTRACE_SYSEMU and PT_SYSEMU_SINGLESTEP from Linux 5.12 for s390 Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3127.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_NUMSUBJECT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Linux 5.12 adds the constants PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP for s390. Add these to glibc. Tested with build-many-glibcs.py for s390-linux-gnu and s390x-linux-gnu. diff --git a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h index 85efbae842..4f3c65726f 100644 --- a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h @@ -39,6 +39,8 @@ __BEGIN_DECLS # undef PTRACE_ATTACH # undef PTRACE_DETACH # undef PTRACE_SYSCALL +# undef PTRACE_SYSEMU +# undef PTRACE_SYSEMU_SINGLESTEP # undef PTRACE_SETOPTIONS # undef PTRACE_GETEVENTMSG # undef PTRACE_GETSIGINFO @@ -146,6 +148,14 @@ enum __ptrace_request PTRACE_SYSCALL = 24, #define PT_SYSCALL PTRACE_SYSCALL + /* Continue and stop at the next syscall, it will not be executed. */ + PTRACE_SYSEMU = 31, +#define PT_SYSEMU PTRACE_SYSEMU + + /* Single step the process, the next syscall will not be executed. */ + PTRACE_SYSEMU_SINGLESTEP = 32, +#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP + /* Set ptrace filter options. */ PTRACE_SETOPTIONS = 0x4200, #define PT_SETOPTIONS PTRACE_SETOPTIONS