Skip to contentSkip to conversation

arm64: allowing mmap to be traced

PATCH In review Christian Hansen 2 participants 3 messages May 14, 2018 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: allowing mmap to be traced

Adding missing macro which is present all other system calls to to mmap declaration for ARM. This allows it to appear as a kernel tracing target.

---
 arch/arm64/kernel/sys.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/kernel/sys.c +3 -3
index 72981ba..1ccdbfc 100644
@@ -27,9 +27,9 @@
 #include <linux/syscalls.h>
 #include <asm/cpufeature.h>
 
-asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
-			 unsigned long prot, unsigned long flags,
-			 unsigned long fd, off_t off)
+SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
+		unsigned long, prot, unsigned long, flags,
+		unsigned long, fd, off_t, off)
 {
 	if (offset_in_page(off) != 0)
 		return -EINVAL;
Signature · 1 line
2.5.0
reviewer
#1 lore raw
Quoted 5 lines · Christian Hansen

Adding missing macro which is present all other system calls to to mmap declaration for ARM. This allows it to appear as a kernel tracing target.

FWIW, I sent out a patch doing this earlier today [1], which is identical modulo some spacing.

Mark.

[1] https://lkml.kernel.org/r/20180514094640.27569-17-mark.rutland at arm.com

Quoted 29 lines
---
 arch/arm64/kernel/sys.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/kernel/sys.c +3 -3
index 72981ba..1ccdbfc 100644
@@ -27,9 +27,9 @@
 #include <linux/syscalls.h>
 #include <asm/cpufeature.h>
 
-asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
-			 unsigned long prot, unsigned long flags,
-			 unsigned long fd, off_t off)
+SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
+		unsigned long, prot, unsigned long, flags,
+		unsigned long, fd, off_t, off)
 {
 	if (offset_in_page(off) != 0)
 		return -EINVAL;
Signature · 7 lines
2.5.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw
In reply to Christian Hansen

Indeed, you have the quicker draw. I concede to your patch.

?On 2018-05-14, 10:32 AM, "Christian Hansen (chansen3)" <[email protected]> wrote:

    Adding missing macro which is present all other system calls to
    to mmap declaration for ARM.  This allows it to appear as a kernel
    tracing target.
    
    Signed-off-by: Christian Hansen <[email protected]>
    ---
     arch/arm64/kernel/sys.c | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/arch/arm64/kernel/sys.c b/arch/arm64/kernel/sys.c
    index 72981ba..1ccdbfc 100644
    --- a/arch/arm64/kernel/sys.c
    +++ b/arch/arm64/kernel/sys.c
    @@ -27,9 +27,9 @@
     #include <linux/syscalls.h>
     #include <asm/cpufeature.h>
     
    -asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
    -			 unsigned long prot, unsigned long flags,
    -			 unsigned long fd, off_t off)
    +SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
    +		unsigned long, prot, unsigned long, flags,
    +		unsigned long, fd, off_t, off)
     {
     	if (offset_in_page(off) != 0)
     		return -EINVAL;
    -- 
    2.5.0