From patchwork Mon Feb 3 06:56:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 3568201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0FD6F9F2F5 for ; Mon, 3 Feb 2014 06:58:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 40B77201BA for ; Mon, 3 Feb 2014 06:58:23 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 606B3201B9 for ; Mon, 3 Feb 2014 06:58:22 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WADTL-0007WB-Be; Mon, 03 Feb 2014 06:57:35 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WADT9-0007Bs-Ik; Mon, 03 Feb 2014 06:57:23 +0000 Received: from mail-pd0-f172.google.com ([209.85.192.172]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WADT6-0007A3-WF for linux-arm-kernel@lists.infradead.org; Mon, 03 Feb 2014 06:57:21 +0000 Received: by mail-pd0-f172.google.com with SMTP id p10so6513402pdj.31 for ; Sun, 02 Feb 2014 22:56:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gEhilywjyGkLsd//pmSv7DiK1xBRYsf/qnrijx/5Ohg=; b=lcbuEfEKW2xSfmPYAnICtT1UWNsdXOg/Fl7vGbWJB06NzwQyvAGOcO3wCx4nV4peP2 PUMWBzNznbYoHa4d5R0Bv8oH6BUBh8BtHguBJgdP8WOy6EKhYdOr5AYSEdHlKpHESBDX AQnn0skNPxDSLpQDpeRO+m273s7JC4A5KNIPp19ZJoJFjt1nhqgcMceCLT77YEub3bZh GxXUAJcCS7/c+lUpUpy8nx4Cjpea2WS9SziTeXyM48IjlMJlfQXwbneDmmMFp+e9Bb4Y YLZ3p2rA1lkfrRJgfqNN7k5HlHfQtNCaBDuONoI0IO8iUBLjyiznzdEhwcPi4EakvzUG mPkA== X-Gm-Message-State: ALoCoQkev3v7Fjtq+mJYe8FP1ktHDnPUjNrfUP1DSC3nPsm0fYkpoURmxh1MalUBs8kvamX7xr4r X-Received: by 10.68.125.164 with SMTP id mr4mr35378292pbb.27.1391410619506; Sun, 02 Feb 2014 22:56:59 -0800 (PST) Received: from localhost.localdomain (KD182249091062.au-net.ne.jp. [182.249.91.62]) by mx.google.com with ESMTPSA id hb10sm52674868pbd.1.2014.02.02.22.56.55 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Feb 2014 22:56:58 -0800 (PST) From: AKASHI Takahiro To: viro@zeniv.linux.org.uk, eparis@redhat.com, rgb@redhat.com, catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH v3 1/3] arm64: Add regs_return_value() in syscall.h Date: Mon, 3 Feb 2014 15:56:28 +0900 Message-Id: <1391410590-4884-2-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1391410590-4884-1-git-send-email-takahiro.akashi@linaro.org> References: <1389946399-4525-1-git-send-email-takahiro.akashi@linaro.org> <1391410590-4884-1-git-send-email-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140203_015721_118991_2D266A4A X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, arndb@arndb.de, linux-kernel@vger.kernel.org, AKASHI Takahiro , linux-audit@redhat.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This macro, regs_return_value, is used mainly for audit to record system call's results, but may also be used in test_kprobes.c. Signed-off-by: AKASHI Takahiro --- arch/arm64/include/asm/ptrace.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index 0e7fa49..5800ec1 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -134,6 +134,11 @@ struct pt_regs { #define user_stack_pointer(regs) \ ((regs)->sp) +static inline unsigned long regs_return_value(struct pt_regs *regs) +{ + return regs->regs[0]; +} + /* * Are the current registers suitable for user mode? (used to maintain * security in signal handlers)