Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1270341 > unrolled thread

[PATCH] ARM64: do not include ptrace.h from compat.h

Started byArnd Bergmann <arnd@arndb.de>
First post2015-11-16 17:40 +0100
Last post2015-11-17 14:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ARM64: do not include ptrace.h from compat.h Arnd Bergmann <arnd@arndb.de> - 2015-11-16 17:40 +0100
    Re: [PATCH] ARM64: do not include ptrace.h from compat.h Catalin Marinas <catalin.marinas@arm.com> - 2015-11-17 14:30 +0100

#1270341 — [PATCH] ARM64: do not include ptrace.h from compat.h

FromArnd Bergmann <arnd@arndb.de>
Date2015-11-16 17:40 +0100
Subject[PATCH] ARM64: do not include ptrace.h from compat.h
Message-ID<qvuYW-1eV-13@gated-at.bofh.it>
including ptrace.h brings a definition of BITS_PER_PAGE into device
drivers and cause a build warning in allmodconfig builds:

drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined
 #define BITS_PER_PAGE  (1UL << (PAGE_SHIFT + 3))

This uses a slightly different way to express current_pt_regs()
that avoids the use of the header and gets away with the already
included asm/ptrace.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
index 7fbed6919b54..eb8432bb82b8 100644
--- a/arch/arm64/include/asm/compat.h
+++ b/arch/arm64/include/asm/compat.h
@@ -23,7 +23,6 @@
  */
 #include <linux/types.h>
 #include <linux/sched.h>
-#include <linux/ptrace.h>
 
 #define COMPAT_USER_HZ		100
 #ifdef __AARCH64EB__
@@ -234,7 +233,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)
 	return (u32)(unsigned long)uptr;
 }
 
-#define compat_user_stack_pointer() (user_stack_pointer(current_pt_regs()))
+#define compat_user_stack_pointer() (user_stack_pointer(task_pt_regs(current)))
 
 static inline void __user *arch_compat_alloc_user_space(long len)
 {

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1271182

FromCatalin Marinas <catalin.marinas@arm.com>
Date2015-11-17 14:30 +0100
Message-ID<qvOuB-5zN-11@gated-at.bofh.it>
In reply to#1270341
On Mon, Nov 16, 2015 at 05:32:15PM +0100, Arnd Bergmann wrote:
> including ptrace.h brings a definition of BITS_PER_PAGE into device
> drivers and cause a build warning in allmodconfig builds:
> 
> drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined
>  #define BITS_PER_PAGE  (1UL << (PAGE_SHIFT + 3))
> 
> This uses a slightly different way to express current_pt_regs()
> that avoids the use of the header and gets away with the already
> included asm/ptrace.h.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied. Thanks.

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web