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]
Message-ID: <20130127203009.GG4503@ZenIV.linux.org.uk>
Date:	Sun, 27 Jan 2013 20:30:09 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Hans-Christian Egtvedt <egtvedt@...fundet.no>
Cc:	Matthias Brugger <matthias.bgg@...il.com>,
	Haavard Skinnemoen <hskinnemoen@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	David Howells <dhowells@...hat.com>,
	Dave Jones <davej@...hat.com>,
	Will Deacon <will.deacon@....com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arch: avr32: add dummy syscalls

On Sun, Jan 27, 2013 at 08:57:14PM +0100, Hans-Christian Egtvedt wrote:
> Around Sun 27 Jan 2013 13:50:15 +0100 or thereabout, Matthias Brugger wrote:
> > This patch adds dummy syscalls so that compiling
> > for this architecture does not provoke warnings when
> > checksyscalls.sh is called.
> 
> Does any of these syscalls take more than 5 arguments? If so, it is also
> needed to do some stack handling. I would rather not add syscalls that cause
> the kernel to misbehave.

BTW, it might make sense to teach SYSCALL_DEFINE6 to generate such a wrapper
on avr32.  How about something along the lines of
* SYSCALL_DEFINE6(foo, ...) generating (via asm volatile, right next to
sys_foo())
__sys_##foo:
        pushm   lr
        st.w    --sp, r3
	call	sys_##foo
        sub     sp, -4
        popm    pc
* SYSCALL_DEFINE[0..5](foo, ...) generating
	SYSCALL_ALIAS(__sys_foo, sys_foo)
* syscall_table.S beginning with
        .section .rodata,"a",@progbits
        .type   sys_call_table,@object
        .global sys_call_table
        .align  2
#define SYS(name) __sys_##name
sys_call_table:
        SYS(restart_syscall)
	SYS(exit)
	SYS(fork)
	...

If you are OK with going that way, I could probably put together patches doing
just that.  Note that for rt_sigsuspend/rt_sigreturn/sigaltstack the wrappers
are not needed at all - they can just use current_pt_regs() in syscall body.
IOW, all of syscall-stubs.S could be killed.
--
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