From patchwork Fri Feb 7 10:10:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 24279 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E01932096A for ; Fri, 7 Feb 2014 10:10:43 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id f11sf6372567qae.3 for ; Fri, 07 Feb 2014 02:10:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=CFO/s//VR7Qi0U9UNdGHRYBrOgMj5UWtVRxpZOYQOAU=; b=Psd3/6d4rpPHsZhTDpyFvHKPpf0S8IKRZ9LaqAn86mwk5gnK0sRdXuJVsQ+KrQlmpu 53EMmkBisLUrwLon5YLa25Uhn3EiG++3mRR9kDRlLTXzCcp0oMB/5tVz8vJRAVMGR3ve oPnyp/LnCwzbyFauuqdW+RnMRO3zMcUiEbCltNlySdc3yST+KU0IfiwFef+VFpyI0ukf bQJ/svA74Qv4ubGC0KC+a+xCr/I7z/EFXgCvCIEQ/dYsyV6Tm3N7d/O2HRxPAX1QGYsM S43xI7IXz63buJ53xa2NbmaD3rb3a60lBntRNhIefZFvzHiSe+qgms6ua9R87jDQUWJN 54hQ== X-Gm-Message-State: ALoCoQny1MgeMGtC3aEvDKyfsDTr7gfAWoBsynlsZYdkc3nTEciCkVfVeNv2y21G/IOtr/9Rf6A+ X-Received: by 10.52.121.68 with SMTP id li4mr4809443vdb.6.1391767843097; Fri, 07 Feb 2014 02:10:43 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.129 with SMTP id g1ls1051202qge.69.gmail; Fri, 07 Feb 2014 02:10:43 -0800 (PST) X-Received: by 10.220.11.141 with SMTP id t13mr704559vct.30.1391767842992; Fri, 07 Feb 2014 02:10:42 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id sx1si47035vdc.10.2014.02.07.02.10.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Feb 2014 02:10:42 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so2509531vcb.9 for ; Fri, 07 Feb 2014 02:10:42 -0800 (PST) X-Received: by 10.58.255.233 with SMTP id at9mr9926369ved.20.1391767842912; Fri, 07 Feb 2014 02:10:42 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp91042vcz; Fri, 7 Feb 2014 02:10:41 -0800 (PST) X-Received: by 10.68.231.169 with SMTP id th9mr18494851pbc.113.1391767841475; Fri, 07 Feb 2014 02:10:41 -0800 (PST) Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by mx.google.com with ESMTPS id ye6si4411694pbc.350.2014.02.07.02.10.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Feb 2014 02:10:41 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.181 is neither permitted nor denied by best guess record for domain of takahiro.akashi@linaro.org) client-ip=209.85.192.181; Received: by mail-pd0-f181.google.com with SMTP id y10so2933610pdj.26 for ; Fri, 07 Feb 2014 02:10:41 -0800 (PST) X-Received: by 10.68.234.230 with SMTP id uh6mr18707932pbc.161.1391767841087; Fri, 07 Feb 2014 02:10:41 -0800 (PST) Received: from localhost.localdomain (KD182249085115.au-net.ne.jp. [182.249.85.115]) by mx.google.com with ESMTPSA id oa3sm12004141pbb.15.2014.02.07.02.10.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Feb 2014 02:10:40 -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 Cc: arndb@arndb.de, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, linux-audit@redhat.com, patches@linaro.org, AKASHI Takahiro Subject: [PATCH v4 1/3] arm64: Add regs_return_value() in syscall.h Date: Fri, 7 Feb 2014 19:10:01 +0900 Message-Id: <1391767803-5350-2-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1391767803-5350-1-git-send-email-takahiro.akashi@linaro.org> References: <1391410590-4884-1-git-send-email-takahiro.akashi@linaro.org> <1391767803-5350-1-git-send-email-takahiro.akashi@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: takahiro.akashi@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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)