From patchwork Thu Mar 13 10:11:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 3824611 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 65C909F369 for ; Thu, 13 Mar 2014 10:15:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99633201E4 for ; Thu, 13 Mar 2014 10:15:55 +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 A4EE3201D3 for ; Thu, 13 Mar 2014 10:15:54 +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 1WO2eS-0001Ir-7s; Thu, 13 Mar 2014 10:14:13 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WO2e7-0002fN-Ng; Thu, 13 Mar 2014 10:13:51 +0000 Received: from mail-pb0-f44.google.com ([209.85.160.44]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WO2dn-0002Yz-4q for linux-arm-kernel@lists.infradead.org; Thu, 13 Mar 2014 10:13:32 +0000 Received: by mail-pb0-f44.google.com with SMTP id rp16so906177pbb.3 for ; Thu, 13 Mar 2014 03:13:08 -0700 (PDT) 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=9zrmtXpuJ1oY0wnWXl0DbM6GYCLHl3EOB/3dldcc22o=; b=hhiC66Yt/DXHBmSdxMpqSiOxMfLpiSP0APmCV2fLkN28FkvRYiFWuNY76uQjoa3u3/ 6yU97CIxYBb6/3dJB2JMUW+9uoAvH7zyblBAexSekfL+w0WUYkY/HHHprSODnskKSWZS Xtpbgjg/LGWtvTGXFxlF1+u8lW2YtP+QQZHovMQld1MEKSo7L9QWXBCIwul0QsTlHtWV WIkRFirW03yO4NZcreqkW47I4Kp682uUKKL8mrIjTb1pyT4S9mpewNDGzIr3O5clINhH +6MpduyUvFPykkYYZmw/CS9+O7C5yL/Oopfm3DkfLqnJ6fKZN00vPmFbpZShfC0RYezb CzMw== X-Gm-Message-State: ALoCoQmjhKbXrWzoS7N5U/t4CvrpsKQm80qzYoSnTBtFv23TeGv8XcNuFKRVxmTRv/wGfLI/MANi X-Received: by 10.66.121.195 with SMTP id lm3mr1254593pab.154.1394705588494; Thu, 13 Mar 2014 03:13:08 -0700 (PDT) Received: from localhost.localdomain (KD182249091179.au-net.ne.jp. [182.249.91.179]) by mx.google.com with ESMTPSA id fn2sm7487532pab.38.2014.03.13.03.13.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Mar 2014 03:13:07 -0700 (PDT) From: AKASHI Takahiro To: will.deacon@arm.com Subject: [PATCH v4 3/3] arm64: Add regs_return_value() in syscall.h Date: Thu, 13 Mar 2014 19:11:31 +0900 Message-Id: <1394705491-12343-4-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1394705491-12343-1-git-send-email-takahiro.akashi@linaro.org> References: <1393564465-3862-1-git-send-email-takahiro.akashi@linaro.org> <1394705491-12343-1-git-send-email-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140313_061331_316170_481D2BDD X-CRM114-Status: UNSURE ( 9.32 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: linaro-kernel@lists.linaro.org, rgb@redhat.com, catalin.marinas@arm.com, arndb@arndb.de, eparis@redhat.com, linux-kernel@vger.kernel.org, AKASHI Takahiro , dsaxena@linaro.org, viro@zeniv.linux.org.uk, 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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. Acked-by Will Deacon Acked-by: Richard Guy Briggs 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)