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  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:	Sat, 08 Dec 2007 13:40:25 +0100
From:	Simon Holm Th√łgersen <odie@...aau.dk>
To:	Zach Brown <zach.brown@...cle.com>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Ulrich Drepper <drepper@...hat.com>,
	Arjan van de Ven <arjan@...radead.org>,
	Andrew Morton <akpm@....com.au>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Evgeniy Polyakov <johnpol@....mipt.ru>,
	"David S. Miller" <davem@...emloft.net>,
	Suparna Bhattacharya <suparna@...ibm.com>,
	Davide Libenzi <davidel@...ilserver.org>,
	Jens Axboe <jens.axboe@...cle.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Dan Williams <dan.j.williams@...il.com>,
	Jeff Moyer <jmoyer@...hat.com>, suresh.b.siddha@...el.com
Subject: Re: [PATCH 1/6] indirect: use asmlinkage in i386 syscall table
	prototype


tor, 06 12 2007 kl. 15:20 -0800, skrev Zach Brown:
> call_indirect() was using the wrong calling convention for the system call
> handlers.  system call handlers would get mixed up arguments.
> 
> Signed-off-by: Zach Brown <zach.brown@...cle.com>
> 
> diff --git a/include/asm-x86/indirect_32.h b/include/asm-x86/indirect_32.h
> index a1b72ac..e3dea8e 100644
> --- a/include/asm-x86/indirect_32.h
> +++ b/include/asm-x86/indirect_32.h
> @@ -15,8 +15,8 @@ struct indirect_registers {
>  
>  static inline long call_indirect(struct indirect_registers *regs)
>  {
> -  extern long (*sys_call_table[]) (__u32, __u32, __u32, __u32, __u32, __u32);
> -
> +	extern asmlinkage long (*sys_call_table[])(long, long, long,
This should be something like below instead, otherwise gcc wont parse
asmlinkage as being an attribute of the function signature.
	extern long (asmlinkage *sys_call_table[])(long, long, long,
I don't now if it has changed with recent gcc versions, this works for
me with 4.2.0.
> +						   long, long, long);
>    return sys_call_table[INDIRECT_SYSCALL(regs)](regs->ebx, regs->ecx,
>  						regs->edx, regs->esi,
>  						regs->edi, regs->ebp);


Simon Holm Th√łgersen

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