Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp135346imu; Thu, 6 Dec 2018 17:21:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/U6WHDAiAUNEuitK0qc5lT3tOT/NL9qfkzvU17+bcHHlzF84EOCZWUY7P7Y0pvZ0peNWeh/ X-Received: by 2002:a17:902:22f:: with SMTP id 44mr227649plc.137.1544145679462; Thu, 06 Dec 2018 17:21:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544145679; cv=none; d=google.com; s=arc-20160816; b=v4a0G4JsHQli8be9UD1kfmOn8hxiUOOKzovLYQPCHjPkUmRFO/Zw1KH3BitYQs6jRl PXOVz0ne5jjyu8MfuhMLvFwOhqfDXtwL8+sG1FI5SjQi1AdPBaHnWJGqFWQFtTjGAXqX KvL+DZWJbk3qq6lnYK5h0NwRhWOyW5K96xRs+bOJV2APjOgwk5p7A0aEIlvKi+poro1W hlPk5rHfiSJ/krKHBi5Zq+7u3y2VzEl6QtqVgH4dacHijxcN2AvxsMxS2fzv6yOHaguX uTxWuP6X6koD8Inz5V9pXcPvn0KnMd8ZzkvPbqhDV26eQZrfYt0Jw0/QWw9e9QazqzkV YY9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=kbV8sga6MqyFxQkT0KbZenAYnAD+2F7Q3Kn+K4Ed92Q=; b=gE9wW2DfeYsikfUGWuzKZmbzXJbeD3eXFX+aH+eguMIgUkjVByHbkxdEYiYKX1vrkX H8nNfLcT75k8lMRbDNTk9C/nN7bZs5BSwbr9XkSbHyopEeSQC8NaVOgExSvNXLE4BTDp g/Fwjg6c89OHQHokNNNFEXjEVmP4XF8tT+Mjn8uypx5+Zh+iaGP33VHBpeFaxd1IKp86 SvHM2dYqx9adYUNK7pQj8KtQUf5HjLbsSPNbplv0Q3x1n16OtqybDUchZmyL4OKbQwCC yAc7Y/jIlCAguJ5q20li0miwQzT1Wl+9tgDL7/6BLrSDlIhg6xqZGsqJMQnYixTtdwBD T8WQ== 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 b5si1631630pfg.121.2018.12.06.17.21.03; Thu, 06 Dec 2018 17:21:19 -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 S1726010AbeLGBTu (ORCPT + 99 others); Thu, 6 Dec 2018 20:19:50 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:47540 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbeLGBTu (ORCPT ); Thu, 6 Dec 2018 20:19:50 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 193CF72CC59; Fri, 7 Dec 2018 04:19:47 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 0F8B57CE6D8; Fri, 7 Dec 2018 04:19:47 +0300 (MSK) Date: Fri, 7 Dec 2018 04:19:47 +0300 From: "Dmitry V. Levin" To: Michael Ellerman 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 Message-ID: <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: <20181203031823.GE11573@altlinux.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 03, 2018 at 06:18:23AM +0300, Dmitry V. Levin wrote: > From: Elvira Khabirova >=20 > 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. >=20 > 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-test= ed > v3: add a descriptive comment > v2: explicitly ignore tracehook_report_syscall_entry() return code >=20 > arch/powerpc/kernel/ptrace.c | 54 +++++++++++++++++++++++------------- > 1 file changed, 35 insertions(+), 19 deletions(-) Sorry, this patch does not work, please ignore it. However, the bug blocks PTRACE_GET_SYSCALL_INFO, so please fix it. I'm going to use if (tracehook_report_syscall_entry(regs)) return -1; return -1; in the series until you have a better fix. --=20 ldv --oyUTqETQ0mS9luUI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJcCcqyAAoJEAVFT+BVnCUIv3YQANKh5JInm3LUcCg1Lr4QIFuF tnxoWgCsIctGlXXKzCwFCjeG3M7z8pNZmEkTYYQv1qcj3QVIXl5QT3KHtPx5QL/b wKlgAHXE2NOHetBRmnz6Stj4lBk2LBWHWIO6RxwXvICCTQGF8HBYFjBtXoZALC4x jL6BtMtdoysNm57rOPhagujznHz4qtQ9Q/JsaFO/Y2h0JrnbJ7CE9xi9cOAJuuPM mYx0mN2eIdxQEQRL2UJJUbm0JjVJudC79HosgJ+E9s8uz3L6pb9K4fVkceglqHNe yb51RFDoCSh2ZoJkoCYyDlLfIAUJ8Yca7kxA6on8471AHnyfap69sYsgOPBV05PW 5T+6vFjlrt4DTh1wj+cHgVcV6tH8QnVlIZkeziorizSGueNsgz+aBxrs2kguK454 DHCOcG1RTc4F9tnl+zHeSrh030qxB/ErjQPhmKCKV6YvbQmKheaVd9GvGjMLvdil TQx+2MVHg0CWIv9lhEOYGIpYJsMbhjaJ+Ig/Q8kcc2qeIPi2OAmpuNYxgLKJ0CUE RorHrwwqkRRHlJfo01uoQ++pz54xBT6dNvOlqTWDBoQz8yfkyTS6NDwVh1K5foEe YCIbE0l+tsxIfE/BiMd9J3YYNWbQa8F1gBUj91w6/8qLroFpzpTCsS6iw9MXZH53 iZgyI2xUitmYWWsLTZFs =+OO3 -----END PGP SIGNATURE----- --oyUTqETQ0mS9luUI--