From patchwork Sat Mar 15 05:39:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 26315 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 38DAA202DD for ; Sat, 15 Mar 2014 05:41:31 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf11931842iec.10 for ; Fri, 14 Mar 2014 22:41:30 -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=Eiu2qNEGz5fVRXE2tsh9aCPRIP+uMWVc/gusoXDYuAw=; b=KJ8rJK8SKyPfd1YaK7xjzy+wLz8DOd4oCHD/YO9h8AOIOyzitVTCD8hWX9sbqpmWU/ NxFwA1SaP7u6jLp/FI2NxzgUh9ZmJgwcUdfw0XQrbSKAwzZo3QS+eiNzNf9pWKvRo9RY dQjqfnCzJ8ZH98epDVzl11LBU93CJMDTkrWADkjfAUn2pRNE7wD+5lrg2ZY95EufxmHI JiBlj/9Rd/52ym6Lt8EPi6tgR+IPpoKbV5b+XGXUW3VU5QVG4UcN312fyE4RlXOgcmCW lUgdCkzhl7LK/B227I7m+zp5GzWSPW27iYsU+bWnrJKk+0BFKmZryTPI7NO50CmSFG5c 6g9Q== X-Gm-Message-State: ALoCoQmYVuBiEy4xfLnFs5n+wi5yEyka41hIGdgU4hIGfxfy7Et9Q+wI/CVtAdCBD+stSeh2VGOC X-Received: by 10.182.186.73 with SMTP id fi9mr4884529obc.48.1394862090386; Fri, 14 Mar 2014 22:41:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.70 with SMTP id u64ls275531qgd.80.gmail; Fri, 14 Mar 2014 22:41:30 -0700 (PDT) X-Received: by 10.52.166.103 with SMTP id zf7mr520769vdb.30.1394862090304; Fri, 14 Mar 2014 22:41:30 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id sq9si70768vdc.197.2014.03.14.22.41.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 22:41:30 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 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.170; Received: by mail-vc0-f170.google.com with SMTP id hu19so3832669vcb.1 for ; Fri, 14 Mar 2014 22:41:30 -0700 (PDT) X-Received: by 10.52.247.231 with SMTP id yh7mr26005vdc.34.1394862089920; Fri, 14 Mar 2014 22:41:29 -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 i9csp72829vck; Fri, 14 Mar 2014 22:41:29 -0700 (PDT) X-Received: by 10.66.147.130 with SMTP id tk2mr13087684pab.125.1394862088765; Fri, 14 Mar 2014 22:41:28 -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.40.58; Fri, 14 Mar 2014 22:40:58 -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 S1754696AbaCOFkc (ORCPT + 26 others); Sat, 15 Mar 2014 01:40:32 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:58262 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752565AbaCOFkI (ORCPT ); Sat, 15 Mar 2014 01:40:08 -0400 Received: by mail-pa0-f48.google.com with SMTP id hz1so3531292pad.35 for ; Fri, 14 Mar 2014 22:40:08 -0700 (PDT) X-Received: by 10.68.245.162 with SMTP id xp2mr12897701pbc.69.1394862008524; Fri, 14 Mar 2014 22:40:08 -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.40.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 22:40:07 -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 4/4] arm64: is_compat_task is defined both in asm/compat.h and linux/compat.h Date: Sat, 15 Mar 2014 14:39:08 +0900 Message-Id: <1394861948-28712-5-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.170 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: , Some kernel files may include both linux/compat.h and asm/compat.h directly or indirectly. Since both header files contain is_compat_task() under !CONFIG_COMPAT, compiling them with !CONFIG_COMPAT will eventually fail. Such files include kernel/auditsc.c, kernel/seccomp.c and init/do_mountfs.c (do_mountfs.c may read asm/compat.h via asm/ftrace.h once ftrace is implemented). So this patch proactively 1) removes is_compat_task() under !CONFIG_COMPAT from asm/compat.h 2) replaces asm/compat.h to linux/compat.h in kernel/*.c, but asm/compat.h is still necessary in ptrace.c and process.c because they use is_compat_thread(). Signed-off-by: AKASHI Takahiro Acked-by: Richard Guy Briggs --- arch/arm64/include/asm/compat.h | 5 ----- arch/arm64/kernel/hw_breakpoint.c | 2 +- arch/arm64/kernel/process.c | 1 + arch/arm64/kernel/ptrace.c | 1 + arch/arm64/kernel/signal.c | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index fda2704..3b334f9 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h @@ -305,11 +305,6 @@ static inline int is_compat_thread(struct thread_info *thread) #else /* !CONFIG_COMPAT */ -static inline int is_compat_task(void) -{ - return 0; -} - static inline int is_compat_thread(struct thread_info *thread) { return 0; diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c index f17f581..a45e2db 100644 --- a/arch/arm64/kernel/hw_breakpoint.c +++ b/arch/arm64/kernel/hw_breakpoint.c @@ -20,6 +20,7 @@ #define pr_fmt(fmt) "hw-breakpoint: " fmt +#include #include #include #include @@ -27,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 1c0a9be..fc8a387 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -20,6 +20,7 @@ #include +#include #include #include #include diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index f606276..c47a3ed 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -19,6 +19,7 @@ * along with this program. If not, see . */ +#include #include #include #include diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index 890a591..4a09989 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -17,6 +17,7 @@ * along with this program. If not, see . */ +#include #include #include #include @@ -25,7 +26,6 @@ #include #include -#include #include #include #include