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:	Thu, 2 Feb 2012 11:10:07 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Indan Zupancic <indan@....nu>
Cc:	Takuo Koguchi <takuo.koguchi.sw@...achi.com>,
	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,
	mcgrathr@...gle.com
Subject: Re: [PATCH] ARM: Wire up HAVE_SYSCALL_TRACEPOINTS

On Thu, Feb 02, 2012 at 12:00:30PM +0100, Indan Zupancic wrote:
> On Thu, February 2, 2012 10:21, Takuo Koguchi wrote:
> > Right.  As Russel King suggested, this patch depends on those configs
> > until very large NR_syscalls is properly handled by ftrace.
> 
> It has nothing to do with large NR_syscalls. Supporting OABI is hard,

That's rubbish if you're doing things correctly, where correctly is
defined as 'not assuming that the syscall number is in r7, but reading
it from the thread_info->syscall member.

> e.g. it doesn't put the syscall nr in r7, it's encoded as part of the
> syscall instruction. Also the ABI for some system calls is different,
> with different arg layouts (alignment of 64 bit args is different).

OABI is a lot more simple because you know how the args are layed out
without needing a table to work out where the padding is.  You know
if you have a 64-bit argument that it follows immediately after a
32-bit argument without needing any alignment.

So:

next_arg_reg(current_arg_reg, next_size, oabi)
{
	if (oabi) {
		/* OABI case */
		next_arg_reg = current_arg_reg + 1;
	} else {
		/* EABI case */
		next_arg_reg = current_arg_reg + 1;
		if (next_size == 64 && next_arg_reg & 1)
			next_arg_reg++;
	}
	return next_arg_reg;
}

Notice how the EABI case is a lot more complicated by the alignment
rules than the OABI - not only do you need something like the above
but also you need a table to describe the size of the arguments for
every syscall in the system.
--
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