From patchwork Wed Apr 30 09:51: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: 29392 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8C2FD203F3 for ; Wed, 30 Apr 2014 09:54:12 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf7603850iec.2 for ; Wed, 30 Apr 2014 02:54:05 -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=TmmjdxLVXu+4isCgw/6TZluA4v3zmZSPXc3RBd3aj0c=; b=Gr47MJHTMfiLFT4jX7urFr4u8H+k6sgDiKeogyMHJso1xw7Soi6z2eofzfQJ3wHW1E EtJLoGneFpsiDsEPqpafsApVDhIaCJuF8IdJ31J2O2jQ5HXrbkdQ3ZLzqqtW9IP0OEmD /deZozTZoZboo2GtBHjtpZLECL7NQMVeVc5aL+2YpkmK2FSbmT4FJZv0/dJvCMW5xI7a BfkyAbb/68BzB9kxsvB1MBbvoTB06x90l84ScMuI/Vxt9mZcL6L9b7GQJbyaSI4qdZuK OLZAPNbzxrSiIh0UiZhZ2NMtN/Jk+4IlAO5pjI+mdSkXRGpz62g2JHQWO2/uHgcm5jxG 6wRg== X-Gm-Message-State: ALoCoQkLz5r7uWiAMeTYRdH9WPLDr0mIN8Dzu1Z+RzHOHexDAesf8ESgGfAFKZxOVBGmmGANGZZ3 X-Received: by 10.182.227.131 with SMTP id sa3mr1843572obc.38.1398851645764; Wed, 30 Apr 2014 02:54:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.210 with SMTP id o76ls444734qga.66.gmail; Wed, 30 Apr 2014 02:54:05 -0700 (PDT) X-Received: by 10.221.37.1 with SMTP id tc1mr659400vcb.32.1398851645651; Wed, 30 Apr 2014 02:54:05 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id tv3si5187453vdc.180.2014.04.30.02.54.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Apr 2014 02:54:05 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id jw12so1808932veb.41 for ; Wed, 30 Apr 2014 02:54:05 -0700 (PDT) X-Received: by 10.220.190.197 with SMTP id dj5mr3064971vcb.19.1398851645561; Wed, 30 Apr 2014 02:54:05 -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.221.72 with SMTP id ib8csp265214vcb; Wed, 30 Apr 2014 02:54:05 -0700 (PDT) X-Received: by 10.67.1.202 with SMTP id bi10mr6915042pad.68.1398851644839; Wed, 30 Apr 2014 02:54:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pn4si16352689pac.339.2014.04.30.02.54.04 for ; Wed, 30 Apr 2014 02:54:04 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933478AbaD3Jxz (ORCPT + 28 others); Wed, 30 Apr 2014 05:53:55 -0400 Received: from mail-ie0-f175.google.com ([209.85.223.175]:36157 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932101AbaD3Jxy (ORCPT ); Wed, 30 Apr 2014 05:53:54 -0400 Received: by mail-ie0-f175.google.com with SMTP id rl12so1572480iec.6 for ; Wed, 30 Apr 2014 02:53:53 -0700 (PDT) X-Received: by 10.50.152.68 with SMTP id uw4mr15883924igb.15.1398851633187; Wed, 30 Apr 2014 02:53:53 -0700 (PDT) Received: from localhost.localdomain (KD182249095136.au-net.ne.jp. [182.249.95.136]) by mx.google.com with ESMTPSA id s8sm4428691ige.4.2014.04.30.02.53.47 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Apr 2014 02:53:52 -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 v6 3/4] arm64: Add regs_return_value() in syscall.h Date: Wed, 30 Apr 2014 18:51:31 +0900 Message-Id: <1398851492-16345-4-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1398851492-16345-1-git-send-email-takahiro.akashi@linaro.org> References: <1394861948-28712-1-git-send-email-takahiro.akashi@linaro.org> <1398851492-16345-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: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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 c7ba261..a429b59 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -135,6 +135,11 @@ struct pt_regs { #define user_stack_pointer(regs) \ (!compat_user_mode(regs)) ? ((regs)->sp) : ((regs)->compat_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)