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:	Fri, 2 Sep 2011 19:56:33 -0700
From:	"H.J. Lu" <hjl.tools@...il.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Arnd Bergmann <arnd@...db.de>, "H. Peter Anvin" <hpa@...or.com>,
	Christoph Hellwig <hch@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Richard Kuo <rkuo@...eaurora.org>,
	Mark Salter <msalter@...hat.com>,
	Jonas Bonn <jonas@...thpole.se>,
	Tobias Klauser <tklauser@...tanz.ch>
Subject: Re: RFD: x32 ABI system call numbers

On Wed, Aug 31, 2011 at 10:05 AM, H.J. Lu <hjl.tools@...il.com> wrote:
> On Wed, Aug 31, 2011 at 9:46 AM, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
>>
>> I really think that "x32" should try to aim *VERY* hard at using the
>> 64-bit system calls, and seeing itself as being a "32-bit application
>> in a 64-bit world".  That's not just true for time_t (which I think
>> should be 64-bit on anything new that expects to survive for any
>> amount of time), but in general.
>>
>
> I have been making x32 to use 64bit system calls as much as possible.
> Hopefully, I will get it to work in a week or 2.
>

I have an x32 kernel which usea 64bit time_t/timespec/timeval and file
system interface:

1. Use 64bit system calls as much as we can.
2. There are 32 compat system calls for x32 to support structure parameters
with pointers and longs.
3. Use x86-64 vDSO relocatable files directly to generate x32 vDSO.

We need to make decision on some system calls which take a pointer
to structure with long.  For example, msg calls take a pointer to

          struct msgbuf {
               long mtype;       /* message type, must be > 0 */
               char mtext[1];    /* message data */
           };

We have 3 choices:

1. Use long long for x32 and use 64bit msg system calls.
2. Keep long for x32 and use compat system call.
3. Add a 4byte padding for x32 and sign-extend from mtype to 4byte
padding before passing to 64bit msg system call.

I implemented option 1.  I can also implement option 2 or 3.

Thanks.


-- 
H.J.
--
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