From patchwork Thu Feb 28 19:38:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dmitry V. Levin" X-Patchwork-Id: 10833635 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C7F511575 for ; Thu, 28 Feb 2019 19:38:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABEA92F381 for ; Thu, 28 Feb 2019 19:38:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BC5E2F42E; Thu, 28 Feb 2019 19:38:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 255E62F381 for ; Thu, 28 Feb 2019 19:38:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730845AbfB1Ti5 (ORCPT ); Thu, 28 Feb 2019 14:38:57 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:34322 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729936AbfB1Ti5 (ORCPT ); Thu, 28 Feb 2019 14:38:57 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 02ED372CA65; Thu, 28 Feb 2019 22:38:56 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id EB4177CC74D; Thu, 28 Feb 2019 22:38:55 +0300 (MSK) Date: Thu, 28 Feb 2019 22:38:55 +0300 From: "Dmitry V. Levin" To: Helge Deller , "James E.J. Bottomley" , linux-parisc@vger.kernel.org Cc: Elvira Khabirova , Eugene Syromyatnikov , Oleg Nesterov , Andy Lutomirski , linux-kernel@vger.kernel.org Subject: [PATCH v7 15/22] parisc: define syscall_get_error() Message-ID: <20190228193855.GA13217@altlinux.org> References: <20190107025101.GA1182@altlinux.org> <20190107025414.GO1207@altlinux.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190107025414.GO1207@altlinux.org> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP syscall_get_error() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_return_value(), and syscall_get_arch() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Cc: Helge Deller Cc: James E.J. Bottomley Cc: Oleg Nesterov Cc: Andy Lutomirski Cc: Elvira Khabirova Cc: Eugene Syromyatnikov Cc: linux-parisc@vger.kernel.org Signed-off-by: Dmitry V. Levin Acked-by: Helge Deller # parisc --- This is just a gentle ping, the patch is unchanged. Notes: v7: unchanged v6: unchanged v5: initial revision arch/parisc/include/asm/syscall.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/parisc/include/asm/syscall.h b/arch/parisc/include/asm/syscall.h index 8bff1a58c97f..477511ff7546 100644 --- a/arch/parisc/include/asm/syscall.h +++ b/arch/parisc/include/asm/syscall.h @@ -43,6 +43,13 @@ static inline void syscall_get_arguments(struct task_struct *tsk, } } +static inline long syscall_get_error(struct task_struct *task, + struct pt_regs *regs) +{ + unsigned long error = regs->gr[28]; + return IS_ERR_VALUE(error) ? error : 0; +} + static inline long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) {