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: 26316 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 974A9202DD for ; Sat, 15 Mar 2014 05:42:00 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id r5sf7700004qcx.1 for ; Fri, 14 Mar 2014 22:42:00 -0700 (PDT) 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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=fSC5YHOM2uCXgKgyl0YH/zTQAycz7F8ofLeyKYI2uNc=; b=dWwtKM9ZJ/nwk6WbJ/BZR6E9HZ2YQkO5UkxB2gK2vL0EOi7efW0tB4FiKBOgJ3jhPL V3dH0+50iJyql85tQH1qhbMEtemo3yexvypCo0Zm7nioFN1nIM0mONwGTy99fnmoASeA UQC/kYWGZABYAg/A18F70d3DOeLWuXA7zSDKIddDe7yCAVf+JmT0UlTS5LbkcODLKjxn 1+KlYhsDMDcM7myqx/CzZwM1cCI1twwKw5q0Rf8D0X0NbtBqLGjIwrcWEvMasF4w0CiQ ffdverluh39ArQ691pOn51rtSPAy7Yg85U8IBELkudEY4u6eI5eeLrK+tj+aQYecygSj vFNg== X-Gm-Message-State: ALoCoQnJSqQRR4zkkk4wpGKCHQN72e1RrX5SXm4HCbBjDM7aNqvBqtXzj8eTG/9CNa2E3E/6tUjl X-Received: by 10.224.124.5 with SMTP id s5mr4714328qar.1.1394862120358; Fri, 14 Mar 2014 22:42:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.109.9 with SMTP id k9ls947638qgf.78.gmail; Fri, 14 Mar 2014 22:42:00 -0700 (PDT) X-Received: by 10.52.240.207 with SMTP id wc15mr8262063vdc.14.1394862120278; Fri, 14 Mar 2014 22:42:00 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id sh5si79075vdc.68.2014.03.14.22.42.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 22:42:00 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 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.173; Received: by mail-vc0-f173.google.com with SMTP id il7so3774293vcb.32 for ; Fri, 14 Mar 2014 22:42:00 -0700 (PDT) X-Received: by 10.58.38.166 with SMTP id h6mr635516vek.22.1394862120154; Fri, 14 Mar 2014 22:42:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp72857vck; Fri, 14 Mar 2014 22:41:59 -0700 (PDT) X-Received: by 10.68.244.229 with SMTP id xj5mr13430393pbc.108.1394862119094; Fri, 14 Mar 2014 22:41:59 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tm9si5267409pab.428.2014.03.14.22.41.28; Fri, 14 Mar 2014 22:41:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753396AbaCOFka (ORCPT + 26 others); Sat, 15 Mar 2014 01:40:30 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:59209 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752541AbaCOFkC (ORCPT ); Sat, 15 Mar 2014 01:40:02 -0400 Received: by mail-pb0-f52.google.com with SMTP id rr13so3517491pbb.11 for ; Fri, 14 Mar 2014 22:40:01 -0700 (PDT) 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 Cc: viro@zeniv.linux.org.uk, eparis@redhat.com, rgb@redhat.com, catalin.marinas@arm.com, dsaxena@linaro.org, arndb@arndb.de, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, linux-audit@redhat.com, AKASHI Takahiro 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.173 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org 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. 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)