From patchwork Thu May 23 09:06:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 164947 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1913608ili; Thu, 23 May 2019 02:06:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIfOqYJoi4+nQzcqcuHAQCSRY94/90gGQLGA4HMwHla14CRPhcijLZAwpyg8okVWTA7WXU X-Received: by 2002:a65:63c8:: with SMTP id n8mr91087428pgv.96.1558602393767; Thu, 23 May 2019 02:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558602393; cv=none; d=google.com; s=arc-20160816; b=fPW1vC+8rGxMOV7gmI4ibCZ8XnNNr8aLqxFyti0MVrndYgNRHlhQfh8UKdwT+6PhzF C7fvfLqJzNDliK99hcKHAK6ofWYaDwUBMHmwWAU51U85W+oELhqdBQ4lxeHHwyIUxFAk u467ZwPL4lEzFrLFNUjS1kaWChpmUoyrO8FqukybejokyMz7UV9tRrjoRgu25pBMo10W t8s7/lOYXEUkt2l+LBVlYrGN2VQsDDsocsIEieTbXw+qec6t2T1DxM9rj6GsBMPpHiRU EE3RaLNKDkbCXLEU0Oy6o3ZemUXin2KyWeaLqA7k8t9dVV0uOL6Ydln/caZSt9HLxtZ/ /EPg== 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=El15cAaO22gmtca4UdMZFkCAGIvJPBtVbrFD6uCsXwk=; b=CGIvTkrYiBM7OC05I/DAhKrzcEHOg//QQ8A202cu28iga0AXUBNsGhe0pX6Hp0lwBg HEjC/MqQSpUcQyYQ9bnUAKC0BKdwh09h0kogCofvZW7XNqnN+FeqCrqeZD4i8x57MAUR sLLQ4wPFOXEOlgsAryNXmp9EtDFiqMLL5DaG8NXMASwdRzgbWCp30IwcWEXnLlgSNJ4l v2TBNYYXvg+9wzluq0s5eeNkIYIIbp2ULDThHtryUF2+/ER9bKw4p9usvjlJXfQJB2Bq +m17wU09s627hhMTppg/ZddagvjSUyVPDo8mDTRPhh5YpDI/hH7cAHXT9/1xTQQQPJUg z2LQ== 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 c129si20061829pga.81.2019.05.23.02.06.33; Thu, 23 May 2019 02:06:33 -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 S1730125AbfEWJGc (ORCPT + 30 others); Thu, 23 May 2019 05:06:32 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40716 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbfEWJGc (ORCPT ); Thu, 23 May 2019 05:06:32 -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 8F923341; Thu, 23 May 2019 02:06:31 -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 7AC733F575; Thu, 23 May 2019 02:06:29 -0700 (PDT) From: Sudeep Holla To: x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , Catalin Marinas , Will Deacon , Oleg Nesterov , Richard Weinberger , jdike@addtoit.com, Steve Capper , Haibo Xu , Bin Lu Subject: [PATCH v4 0/4] ptrace: cleanup PTRACE_SYSEMU handling and add support for arm64 Date: Thu, 23 May 2019 10:06:14 +0100 Message-Id: <20190523090618.13410-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. v3->v4: - Rebased on v5.2-rc1 - Added Oleg's acks for generic and x86 parts v2->v3: - moved clearing of TIF_SYSCALL_EMU to __ptrace_unlink as Oleg suggested - x86 cleanup as per Oleg's suggestion and dropped adding new ptrace_syscall_enter for SYSEMU handling (tested using tools/testing/selftests/x86/ptrace_syscall.c) - Updated arm64 handling accordingly 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 (4): ptrace: move clearing of TIF_SYSCALL_EMU flag to core x86: simplify _TIF_SYSCALL_EMU handling 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 | 6 +++++- arch/powerpc/kernel/ptrace.c | 1 - arch/x86/entry/common.c | 17 ++++++----------- arch/x86/kernel/ptrace.c | 3 --- kernel/ptrace.c | 3 +++ 7 files changed, 21 insertions(+), 17 deletions(-) -- 2.17.1