lkml.org 
[lkml]   [2003]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Announcement] "Exec Shield", new Linux security feature
Date
Followup to:  <20030504222227.GB6808@twiddle.net>
By author: Richard Henderson <rth@twiddle.net>
In newsgroup: linux.dev.kernel
>
> On Sun, May 04, 2003 at 10:25:26AM -0400, Chuck Ebbert wrote:
> > asmlinkage int sys_iopl(unsigned long unused)
> > {
> > struct pt_regs * regs = (struct pt_regs *) &unused; <== yuck!
> [...]
> > Shouldnt it be like this?
> >
> > asmlinkage int sys_iopl (struct pt_regs regs)
>
> No, it should be like
>
> int sys_iopl (struct pt_regs *regs)
>
> and assembly language should push the proper address.
>
> The struct-as-argument form allows the compiler to
> smash the entire structure as it sees fit.
>

Hardly - it has to correspond to the ABI for the platform."

Presumably that's where the "asmlinkage" piece comes in.

-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.037 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site