Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp415580imu; Fri, 7 Dec 2018 03:15:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/WkFRxFbHdy3ZTXRXYakPhE72vO51EGWyXmbPixyitaxgbV24wXsTBZPpky/wBI7jLt8DkW X-Received: by 2002:a63:f444:: with SMTP id p4mr1561970pgk.124.1544181329795; Fri, 07 Dec 2018 03:15:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544181329; cv=none; d=google.com; s=arc-20160816; b=hFR4ufj+mSJA3HAoK67hKltAlSFEgiuB+8ejCWSp9m0f8pyFBSYo7kzdScfKOWz3U9 mtBej0Uc2z3Juq/e25pXtL6NAgLFutoVXhrt8dAYG990VbNC9+YjSgy7Xqfmklt+98Jj Uhieq8TbyH2GV+poeOxFe80BSu9a7lY7TPTl8WWngZWjOUpsw3oE+EDy4WpyfrRxC0hN 0iRsmZj42sIQNQWAb+Rzr7M+JOmhstezP9AIw+OL8vfKa7b4p3zyrMiUm6kLYnKgjcYF HmE25RSPtM5IZoaYXsuhuTk/X+ETtHCpuM40UKS220CW/8cp7tKqAMk4U5uuWIAfzvME J3bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=f6lOTIb8L9+HHoP9nDX6H/9Y9J88wSKyzjsCtozCWfk=; b=IyYZ0b5ivqu7cQovtM05FrPup3lAloWYHo6+mAGOBskHb3RaCA7Qq4NnlQtTYT4ZB9 vp1UBh32VYOOUzBoMRHV/cpgOH/g3IcQCewm9JUtCJxjuIJRWBpr8BwwBU53eH3nIxvv fdM1FSmP6ZOjNCgMFBSMt93viJvxBRgNqWlQDCyqOr8I/i6yZFr8ohSos1Ojw6JT1nnO iQZJx3cGZql1rbQOp2/D7EKHwhfTXp/J5Soo9jrgQ5kzHTopMUKh6Q1o6th0B0nlRNp6 nF1glVydejkekQckTDNUsTsjyV8OWu32XspIU96o1rgD9glDM7kDliLiqtQpvQM6uP+8 bR8g== 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 38si2576566pln.313.2018.12.07.03.15.13; Fri, 07 Dec 2018 03:15:29 -0800 (PST) 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 S1726043AbeLGLMw (ORCPT + 99 others); Fri, 7 Dec 2018 06:12:52 -0500 Received: from ozlabs.org ([203.11.71.1]:40411 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbeLGLMw (ORCPT ); Fri, 7 Dec 2018 06:12:52 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 43B8vj1x8Gz9s0n; Fri, 7 Dec 2018 22:12:49 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: "Dmitry V. Levin" Cc: Benjamin Herrenschmidt , Paul Mackerras , Oleg Nesterov , Breno Leitao , Andy Lutomirski , Eugene Syromyatnikov , Elvira Khabirova , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] powerpc/ptrace: replace ptrace_report_syscall() with a tracehook call In-Reply-To: <20181207011946.GA18558@altlinux.org> References: <20181116121701.14359da0@akathisia> <87ftw12nyn.fsf@concordia.ellerman.id.au> <20181119210139.GA8360@altlinux.org> <87efbe166y.fsf@concordia.ellerman.id.au> <20181203031823.GE11573@altlinux.org> <20181207011946.GA18558@altlinux.org> Date: Fri, 07 Dec 2018 22:12:49 +1100 Message-ID: <87y391k2tq.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Dmitry V. Levin" writes: > On Mon, Dec 03, 2018 at 06:18:23AM +0300, Dmitry V. Levin wrote: >> From: Elvira Khabirova >> >> Arch code should use tracehook_*() helpers, as documented >> in include/linux/tracehook.h, >> ptrace_report_syscall() is not expected to be used outside that file. >> >> Co-authored-by: Dmitry V. Levin >> Fixes: 5521eb4bca2d ("powerpc/ptrace: Add support for PTRACE_SYSEMU") >> Signed-off-by: Elvira Khabirova >> Signed-off-by: Dmitry V. Levin >> --- >> v4: rewritten to call tracehook_report_syscall_entry() once, compile-tested >> v3: add a descriptive comment >> v2: explicitly ignore tracehook_report_syscall_entry() return code >> >> arch/powerpc/kernel/ptrace.c | 54 +++++++++++++++++++++++------------- >> 1 file changed, 35 insertions(+), 19 deletions(-) > > Sorry, this patch does not work, please ignore it. Hmm OK. Why exactly? I wrote more or less the same patch, although I used a temporary bool. > However, the bug blocks PTRACE_GET_SYSCALL_INFO, so please fix it. Sorry, didn't realise it was blocking you. > I'm going to use > if (tracehook_report_syscall_entry(regs)) > return -1; > return -1; > in the series until you have a better fix. Yeah that's fine by me. I could send that to Linus for 4.20 if you want me to, otherwise I'm fine for you to carry it in your series. cheers