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, 27 May 2016 07:52:54 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	David Miller <davem@...emloft.net>
Cc:	ynorov@...iumnetworks.com, arnd@...db.de, catalin.marinas@....com,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org, linux-arch@...r.kernel.org,
	linux-s390@...r.kernel.org, libc-alpha@...rceware.org,
	schwidefsky@...ibm.com, pinskia@...il.com, broonie@...nel.org,
	joseph@...esourcery.com, christoph.muellner@...obroma-systems.com,
	bamvor.zhangjian@...wei.com, szabolcs.nagy@....com,
	klimov.linux@...il.com, Nathan_Lynch@...tor.com, agraf@...e.de,
	Prasun.Kapoor@...iumnetworks.com, kilobyte@...band.pl,
	geert@...ux-m68k.org, philipp.tomsich@...obroma-systems.com
Subject: Re: [PATCH 01/23] all: syscall wrappers: add documentation

On Wed, May 25, 2016 at 12:30:17PM -0700, David Miller wrote:
> From: Yury Norov <ynorov@...iumnetworks.com>
> Date: Tue, 24 May 2016 03:04:30 +0300
> 
> > +To clear that top halves, automatic wrappers are introduced. They clear all
> > +required registers before passing control to regular syscall handler.
> 
> Why have one of these for every single compat system call, rather than
> simply clearing the top half of all of these registers unconditionally
> in the 32-bit system call trap before the system call is invoked?
> 
> That's what we do on sparc64.
> 
> And with that, you only need wrappers for the case where there needs
> to be proper sign extention of a 32-bit signed argument.

That would probably also work for arm. On s390 we still have these odd 31
bit pointers in compat mode which require us to clear 33 bits instead of 32
bits. That makes up for appr. one third of all system calls.

The additional wrappers are only for zero/sign extension, where I count a
total of 27 on s390.

The reason for doing this in C was the constant copy-paste error rate, when
adding new system calls plus I got a rid of a lot of unnecessary asm code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ