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]
Date:	Wed, 27 Jun 2007 19:18:12 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Joerg Schilling <Joerg.Schilling@...us.fraunhofer.de>
Cc:	arjan@...radead.org, linux-kernel@...r.kernel.org,
	schilling@...us.fraunhofer.de
Subject: Re: Linux Kernel include files

On Wed, Jun 27, 2007 at 03:58:43PM +0200, Joerg Schilling wrote:
> Sam Ravnborg <sam@...nborg.org> wrote:
> 
> > On Mon, Jun 25, 2007 at 04:53:55PM +0200, Joerg Schilling wrote:
> > > 
> > > star needs "ext2_fs.h". This file is not usable at all on many Linux 
> > > distributions, even with GCC.
> >
> > I was curious so I did:
> >
> > $ mkdir ~/foo
> > $ cd ~/kernel/linux-2.6
> > $ make INSTALL_HDR_PATH=~/foo
> > $ cd ~/foo
> > $ cat j.c
> > #include <stdio.h>
> > #include "etx2_fs.h"
> >
> > main()
> > {
> > 	printf("helloo\n");
> > }
> >
> > $ gcc -o j j.c
> > => No warning, no errors
> >
> 
> On Suse Linux 10.0, I get e.g.:
> 
> cat t.c
> #include <stdio.h>
> #include <linux/ext2_fs.h>
> 
> gcc -c t.c
> In file included from /usr/include/linux/ext2_fs.h:20,
>                  from t.c:2:
> /usr/include/linux/ext2_fs_sb.h:40: error: syntax error before âuid_tâ
> /usr/include/linux/ext2_fs_sb.h:49: error: syntax error before âs_next_generationâ
> /usr/include/linux/ext2_fs_sb.h:51: error: syntax error before â*â token
> /usr/include/linux/ext2_fs_sb.h:56: error: syntax error before â}â token

Hi Jörg.

For my test I used latest -git of the Linux kernel.
In this version the include of ext2_fs_bh.h is guarded
by __KERNEL__ like this:

#ifdef __KERNEL__
#include <linux/ext2_fs_sb.h>
static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb)
{
        return sb->s_fs_info;
}

And therefore the include statement is removed in the exported set of kernel
include files.
So this particular issue is solved with the latest kernel and using the headers
prepared for export.

This tells me that we are on the right track with exporting the headers and sanitize them.

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