From patchwork Sat Mar 15 05:39:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 3836331 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 E44A09F44E for ; Sat, 15 Mar 2014 05:42:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 153BF20279 for ; Sat, 15 Mar 2014 05:42:10 +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 D651D20351 for ; Sat, 15 Mar 2014 05:42:07 +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 1WOhLB-00019K-Rl; Sat, 15 Mar 2014 05:41:02 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOhKv-000814-RD; Sat, 15 Mar 2014 05:40:45 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOhKY-0007vg-9p for linux-arm-kernel@lists.infradead.org; Sat, 15 Mar 2014 05:40:24 +0000 Received: by mail-pa0-f49.google.com with SMTP id lj1so3484008pab.8 for ; Fri, 14 Mar 2014 22:40:01 -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=RUNyPXvsmmzbOWLWQZwdGFXuiVUDw/x8dOIXNJlmnO4=; b=l2QpNVlGAkgRAM7adgnk/mnIAjoXc+tjXf4VcvVRb8WKDkrxg7hadxqddps74ZhZC8 ecfjVB9kRzIHd+wr9kgNJn7b1Xwkg4zJIFO4P6v7LwRT87AZLH4qkrhOx2SkrpmCdCKy fXeWVbcoWgGuO3iAV1fjSFwAPskWmBWw6IHq6lnkmFoq+Z5ihmItEoyJMeaLTMl7j5zT D+jRbNrBgwxW8io26iO0NcAslRBVoGQWsRQLAdwR/NxjRghu8v/0fq+WQzblXrQ+8277 3Ju9oJBJ2riy1W8QXc1abkGe/deZH5yedqYyF51pAEb2v6Lcsc0rL5buNWPrP2hmRmfp InWA== X-Gm-Message-State: ALoCoQlCLSERa6b+Ll0OnHySqzDAbN6fkFQMPcjPF/wAyjCvZ7n8VHj8p38WzPdIYVUbhkj7iXbb X-Received: by 10.68.96.99 with SMTP id dr3mr13229099pbb.40.1394862001585; Fri, 14 Mar 2014 22:40:01 -0700 (PDT) Received: from localhost.localdomain (pdddd29.tkyoac00.ap.so-net.ne.jp. [218.221.221.41]) by mx.google.com with ESMTPSA id iv2sm22280176pbc.19.2014.03.14.22.39.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 22:40:00 -0700 (PDT) From: AKASHI Takahiro To: will.deacon@arm.com Subject: [PATCH v5 3/4] arm64: Add regs_return_value() in syscall.h Date: Sat, 15 Mar 2014 14:39:07 +0900 Message-Id: <1394861948-28712-4-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1394861948-28712-1-git-send-email-takahiro.akashi@linaro.org> References: <1394705491-12343-1-git-send-email-takahiro.akashi@linaro.org> <1394861948-28712-1-git-send-email-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140315_014022_554969_CBFCB03D X-CRM114-Status: UNSURE ( 8.99 ) 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)