From patchwork Tue Feb 25 09:18:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 3713761 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 38934BF13A for ; Tue, 25 Feb 2014 09:20:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 61142201BF for ; Tue, 25 Feb 2014 09:20:26 +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 7788020117 for ; Tue, 25 Feb 2014 09:20:25 +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 1WIEBW-0006Mn-10; Tue, 25 Feb 2014 09:20:18 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WIEBR-0001ZR-Ft; Tue, 25 Feb 2014 09:20:13 +0000 Received: from mail-pb0-f52.google.com ([209.85.160.52]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WIEB8-0001VP-Mr for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2014 09:19:55 +0000 Received: by mail-pb0-f52.google.com with SMTP id rr13so1328820pbb.25 for ; Tue, 25 Feb 2014 01:19:33 -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=ZJvf3wNEGOxN/qlGfGYkdE9NJa0K+I0kTG+J+wq9uCM=; b=XUZA9/f0SseWQKIiKIHborWGS8+SDYSkairSjsGGMpAPHv4Q9iQzF/+f48uEEu1tze ScbRbl8/r+TvWfYCJDfA8dQrqHPS7uFUe3A4tovnrnNjj73II7yWzsuRNJ0DeHmZU/B4 ARtczmn3KcCaQyO3ApdEIOw8UhcAFqOvnPL+0en/09I6tyCDyq7Z/+ZnfjsDQHwNIxYg 1yFeLcE5SacMKdt4Xfj5TpnYAfC7Fdqg835yMg1faw+iKDdmEvHkbgbiCwMokmZ+E6sg ug1+ewh2LR9dkbSq/H7yYaKGU4gdfob7Dx+W4w1tWsylzFNxvmu6rZtsJRyEPMLgB9wJ IUUg== X-Gm-Message-State: ALoCoQmoFq+ELAK2uLPWe/9g/HRcAQ8dyLXnNknLCOLrAl7Qea3RuXeLKTO6mruwyiYbeAuQrTvS X-Received: by 10.68.2.99 with SMTP id 3mr5298108pbt.49.1393319969405; Tue, 25 Feb 2014 01:19:29 -0800 (PST) Received: from localhost.localdomain (KD182249093189.au-net.ne.jp. [182.249.93.189]) by mx.google.com with ESMTPSA id ix2sm8351685pbc.45.2014.02.25.01.19.24 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 01:19:28 -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 v5 1/3] arm64: Add regs_return_value() in syscall.h Date: Tue, 25 Feb 2014 18:18:52 +0900 Message-Id: <1393319934-2810-2-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1393319934-2810-1-git-send-email-takahiro.akashi@linaro.org> References: <1391767803-5350-1-git-send-email-takahiro.akashi@linaro.org> <1393319934-2810-1-git-send-email-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140225_041954_861406_A14A8C90 X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.5 (/) Cc: linaro-kernel@lists.linaro.org, AKASHI Takahiro , arndb@arndb.de, linux-kernel@vger.kernel.org, dsaxena@linaro.org, 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=-1.1 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 Acked-by Will Deacon Acked-by: Richard Guy Briggs --- 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)