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, 11 Feb 2009 13:27:31 -0500
From:	Brian Gerst <brgerst@...il.com>
To:	"H. Peter Anvin" <hpa@...nel.org>
Cc:	Tejun Heo <tj@...nel.org>, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] x86: Pass in pt_regs pointer for syscalls that need 
	it

On Wed, Feb 11, 2009 at 12:52 PM, H. Peter Anvin <hpa@...nel.org> wrote:
> Brian Gerst wrote:
>>  /*
>> + * For syscalls that need a pointer to the pt_regs struct (ie. fork).
>> + * The regs pointer is passed in %eax as the first argument.  The
>> + * remaining function arguments remain on the stack.
>> + */
>> +#define ptregscall __attribute__((regparm(1)))
>
> I was looking a few weeks ago (still a work in progress, but I'm pretty
> close to having something working) at getting rid of asmlinkage and try
> to get everything onto regparm(3).  Adding yet another calling
> convention seems to be a step in the wrong direction -- especially since
> regparm(1) and (2) are unlikely to have been well exercised and
> therefore are likely to attract gcc bugs.
>
> That does *not* mean in any way that I disapprove of the concept of
> accessing pt_regs via a pointer... quite on the contrary, I think it's
> the only sane thing to do.  I would like to see it done without adding
> calling conventions, and preferrably killing some off.
>
>        -hpa
>
>

I guess I could go back to extracting the args from the pt_regs struct
given just the pointer.  How do you intend to handle system calls in
your changes (normal ones, not needing pt_regs)?

--
Brian Gerst
--
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