lkml.org 
[lkml]   [2000]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG/PATCH: include/asm-*/fcntl.h
Alber D. Cahalan writes:

> Bernd Kischnick writes:
>
> > An hour ago I posted a patch for asm-ppc/fcntl.h.
> > Now I scanned the other asm-directories and found the same bug in
> ..
> > +struct flock64 {
> > + short l_type;
> > + short l_whence;
> > + loff_t l_start;
> > + loff_t l_len;
> > + pid_t l_pid;
>
> Noooo!!!!!
>
> Your struct likely looks like this on some systems:
>
> 2 bytes l_type
> 2 bytes l_whence
> 4 bytes COMPILER GENERATED CRAP <-- Eeew, gross.
> 8 bytes l_start
> 8 bytes l_len
> 4 bytes l_pid
>
> You didn't follow the rules. (Remember that flamewar?)

Well, sorry :-(

> You waste space and, maybe, leak secret data out of the kernel.
> (if you copy the whole thing, with uninitialized data...)

I didn't invent the definition for struct flock64.
The definition is in the test7-patch, and it's identical in
include/asm-i386/fcntl.h and in include/asm-sparc/fcntl.h
That's why I assumed that this definition might be used for the other
architectures as well (where it was missing in the test7-patch).

If there are problems with the struct, maybe we should consider changing
it for all architectures?

- Bernd

--
- Bernd Kischnick

email kisch@mindless.com tel +49-(0)511-18375

Sent through GMX FreeMail - http://www.gmx.net

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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