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: <1170496175.31373.31.camel@funkylaptop>
Date:	Sat, 03 Feb 2007 10:49:35 +0100
From:	Frédéric Riss <frederic.riss@...il.com>
To:	Andi Kleen <ak@...e.de>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Matt Domsch <Matt_Domsch@...l.com>,
	Adrian Bunk <bunk@...sta.de>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Eric Van Hensbergen <ericvh@...il.com>,
	Trond Myklebust <trond.myklebust@....uio.no>,
	Neil Brown <neilb@...e.de>,
	Stephen Hemminger <shemminger@...ux-foundation.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Jeff Garzik <jeff@...zik.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Francois Romieu <romieu@...zoreil.com>
Subject: Re: 2.6.20-rc7: known regressions

Le samedi 03 février 2007 à 10:33 +0100, Andi Kleen a écrit :
> >  /*
> > + * Wrap all the virtual calls in a way that forces the parameters on the stack.
> > + */
> > +
> > +#define efi_call_virt(f, args...) \
> > +     ((efi_##f##_t __attribute__((regparm(0)))*)efi.systab->runtime->f)(args)
> > +
> > +static efi_status_t virt_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc)
> > +{
> > +	return efi_call_virt(get_time, tm, tc);
> 
> Wouldn't it be better to just declare the pointers in efi.systab with 
> the correct attribute?  Then you wouldn't need all that ugly casting.

Was what I did in the initial patch: 
     http://lkml.org/lkml/2007/1/30/258 

The issue is that the structure definition is used on multiple
architectures (for now ia64 and i386) which might used different calling
conventions. As Bjorn Helgaas pointed out, ia64 already has such wrapper
functions. I agree that the casting isn't the nicest thing, but I prefer
that to writing asm stubs.

Fred

-
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