lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 1 Feb 2012 09:46:21 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	takuo.koguchi.sw@...achi.com
Cc:	linux-kernel@...r.kernel.org, masami.hiramatsu.pt@...achi.com,
	rostedt@...dmis.org, fweisbec@...il.com, mingo@...hat.com,
	jbaron@...hat.com, yrl.pp-manager.tt@...achi.com
Subject: Re: [PATCH] ARM: Wire up HAVE_SYSCALL_TRACEPOINTS

On Thu, Dec 01, 2011 at 08:01:32PM +0900, takuo.koguchi.sw@...achi.com wrote:
> diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
> index 4a11237..f4eac2d 100644
> --- a/arch/arm/include/asm/unistd.h
> +++ b/arch/arm/include/asm/unistd.h
> @@ -405,6 +405,9 @@
>  #define __NR_process_vm_readv		(__NR_SYSCALL_BASE+376)
>  #define __NR_process_vm_writev		(__NR_SYSCALL_BASE+377)
>  
> +#ifndef __ASSEMBLY__
> +#define NR_syscalls		378
> +#endif

So, we have 380 syscalls in the assembly code.  You're telling ftrace
that we have 378.  That's just great, because it means userspace can
trigger this trivially:

int reg_event_syscall_enter(struct ftrace_event_call *call)
{
        int ret = 0;
        int num;

        num = ((struct syscall_metadata *)call->data)->syscall_nr;
        if (WARN_ON_ONCE(num < 0 || num >= NR_syscalls))
                return -ENOSYS;

And what about the ARM private syscalls?

This ftrace NR_syscalls definition would have to be some very large
number to avoid these issuing the above warning.  ftrace really needs
to lose this before ARM can start using it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ