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: <1391933733.1014.25.camel@wall-e.seibold.net>
Date:	Sun, 09 Feb 2014 09:15:33 +0100
From:	Stefani Seibold <stefani@...bold.net>
To:	Andi Kleen <ak@...ux.intel.com>
Cc:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
	x86@...nel.org, tglx@...utronix.de, mingo@...hat.com,
	hpa@...or.com, aarcange@...hat.com, john.stultz@...aro.org,
	luto@...capital.net, xemul@...allels.com, gorcunov@...nvz.org,
	andriy.shevchenko@...ux.intel.com, Martin.Runge@...de-schwarz.com,
	Andreas.Brief@...de-schwarz.com
Subject: Re: [PATCH v13 8/9] Add 32 bit VDSO time support for 32 bit kernel

Am Samstag, den 08.02.2014, 23:21 -0800 schrieb Andi Kleen:
> On Sat, Feb 08, 2014 at 09:22:30PM -0800, Andi Kleen wrote:
> > > +notrace static long vdso_fallback_gettime(long clock, struct timespec *ts)
> > > +{
> > > +	long ret;
> > > +
> > > +	asm(
> > > +		"push %%ebx \n"
> > > +		"mov %2,%%ebx \n"
> > > +		"call VDSO32_vsyscall \n"
> > > +		"pop %%ebx \n"
> > > +		: "=a" (ret)
> > > +		: "0" (__NR_clock_gettime), "d" (clock), "c" (ts)
> > > +		: "memory");
> > 
> > The push/mov/pop could be just replaced with "b"?
> 
> Actually thinking about it more you likely did that to avoid errors
> with -fPIC right? In this case you still need to supply correct dwarf2
> unwind annotations.
> 

Right... But i have no idea why and how to supply dwarf2 unwind
annotations. Can you give my some hints?

> Also this change is still needed:
> 
> > Also I if this calls syscall.S:__kernel_vsyscall it clobbers more registers
> > (ecx at least?) and you need to describe that to gcc with a + 
> > 
> > Same in the other sys calls.
> > 

ECX is still marked as clobberd as is in use for the second parameter.

All other registers will be saved by __kernel_vsyscall, expect the EAX
which is marked as in and out register in the asm() directive.

- Stefani


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