From patchwork Mon Mar 18 10:49:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 160481 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp2500313jad; Mon, 18 Mar 2019 03:49:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1fVAwYKDWE8sj3sA4BXn1Ma79Cs0gP123tpUarcxbouwBgpiMfn4y3qz9ZoXuN7+HTE2x X-Received: by 2002:a63:510a:: with SMTP id f10mr17108990pgb.327.1552906178267; Mon, 18 Mar 2019 03:49:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552906178; cv=none; d=google.com; s=arc-20160816; b=ObYo32CyqZH5DZu9d99tV88J76SdXsJNqXeRapgz52rORbn8Yadi6li0BMNFwEV0kV HYroxwAe6kRdbb8jRVGl4rmOjrb2LG7nOVLWbkzAHZoxPW4gqaFmRADdN/Zltgg3+Vw0 yJGJ3d0vuRxFmpsnyXZwnJ9Bj1THt/lzgIMgrx/37AogwQVQrDGucHfrmZDZxaobNTsv c8ZHA2wAd3uYJ+U2f39i7TaWrgWb7gPmOwaBe6tRC91iUwp6UGUd5GvEg198pzGtFdx3 SzzZqjY2Uh2tnxu+MXWaewBbfkNxoarOF4iumhVKFpg169a2xgDaDx6RuCon2N8vI4KV Gelw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=mfTUbMzviXTCWEC9HgRHM9O9QVjboY3iX+RGl5eTveY=; b=jPeKu6SthPG/lWGU9xghZpvlpi8h6VGhBAn1S55Ouv6GwtY3cYiZNJ4LFklB5f5l2g aJpFZhUVJzKxjNmqvOymVftEKqU4jCMW3qExzW570BSNir5Us523SYsYM35+3udWVnIJ zsh8dZlhWh3DuHfDG+iqkKixC/XqBp8by3fKd9Ux8oaxcMhFnwUeuwBh0kZvKwGPvVBN l4w3BznQRV8RU0QEg5FIS/RX3WhFTqKZdV5zFdAKZclxgw64J4jcgXD49szlbg0RHt+R EN06MhFDVNLera11QDYAjB6SnpJ0xR8JDFbJfCRfVnoLuj8GDXjUM71zjt7lQrXsT8UT xKoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si8472350pgv.349.2019.03.18.03.49.37; Mon, 18 Mar 2019 03:49:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727392AbfCRKtg (ORCPT + 31 others); Mon, 18 Mar 2019 06:49:36 -0400 Received: from foss.arm.com ([217.140.101.70]:59636 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726449AbfCRKtg (ORCPT ); Mon, 18 Mar 2019 06:49:36 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 84F9980D; Mon, 18 Mar 2019 03:49:35 -0700 (PDT) Received: from usa.arm.com (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8FC6F3F614; Mon, 18 Mar 2019 03:49:32 -0700 (PDT) From: Sudeep Holla To: x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: Sudeep Holla , Catalin Marinas , Will Deacon , Oleg Nesterov , Paul Mackerras , Michael Ellerman , Thomas Gleixner , Ingo Molnar , Richard Weinberger , jdike@addtoit.com, Steve Capper , Haibo Xu , Bin Lu , Andy Lutomirski Subject: [PATCH v2 0/6] ptrace: consolidate PTRACE_SYSEMU handling and add support for arm64 Date: Mon, 18 Mar 2019 10:49:19 +0000 Message-Id: <20190318104925.16600-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This patchset evolved from the discussion in the thread[0][1]. When we wanted to add PTRACE_SYSEMU support to ARM64, we thought instead of duplicating what other architectures like x86 and powerpc have done, let consolidate the existing support and move it to the core as there's nothing arch specific in it. v1->v2: - added comment for empty statement after tracehook_report_syscall_entry - dropped x86 change in syscall_slow_exit_work as I had ended up changing logic unintentionally - removed spurious change in powerpc moving user_exit() Regards, Sudeep [0] https://patchwork.kernel.org/patch/10585505/ [1] https://patchwork.kernel.org/patch/10675237/ Sudeep Holla (6): ptrace: move clearing of TIF_SYSCALL_EMU flag to core ptrace: introduce ptrace_syscall_enter to consolidate PTRACE_SYSEMU handling x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook powerpc: use common ptrace_syscall_enter hook to handle _TIF_SYSCALL_EMU arm64: add PTRACE_SYSEMU{,SINGLESTEP} definations to uapi headers arm64: ptrace: add support for syscall emulation arch/arm64/include/asm/thread_info.h | 5 ++- arch/arm64/include/uapi/asm/ptrace.h | 3 ++ arch/arm64/kernel/ptrace.c | 3 ++ arch/powerpc/kernel/ptrace.c | 49 ++++++++++++---------------- arch/x86/entry/common.c | 12 ++----- arch/x86/kernel/ptrace.c | 3 -- include/linux/ptrace.h | 1 + kernel/ptrace.c | 26 +++++++++++++++ 8 files changed, 61 insertions(+), 41 deletions(-) -- 2.17.1