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] [day] [month] [year] [list]
Date:	Tue, 03 Feb 2009 20:07:08 +0530
From:	Jaswinder Singh Rajput <jaswinder@...nel.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Ingo Molnar <mingo@...e.hu>, x86 maintainers <x86@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Sam Ravnborg <sam@...nborg.org>,
	David Miller <davem@...emloft.net>,
	LKML <linux-kernel@...r.kernel.org>,
	reiserfs-devel@...r.kernel.org
Subject: Re: [git-pull -tip] fix headers_check warnings

On Mon, 2009-02-02 at 18:49 +0100, Arnd Bergmann wrote:
> On Monday 02 February 2009, Jaswinder Singh Rajput wrote:
> 
> > @@ -6,8 +6,10 @@
> >  #define ARCH_GET_FS 0x1003
> >  #define ARCH_GET_GS 0x1004
> >  
> > -#ifdef CONFIG_X86_64
> > +#ifdef __KERNEL__
> > +# ifdef CONFIG_X86_64
> >  extern long sys_arch_prctl(int, unsigned long);
> > -#endif /* CONFIG_X86_64 */
> > +# endif /* CONFIG_X86_64 */
> > +#endif /* __KERNEL__ */
> 
> The prototype declares a system call and should consequently
> be moved to arch/x86/include/syscalls.h, without the #ifdef.
> Generally, prototypes do not need to be put into #ifdef.
> 

This is already fixed as suggested by Peter.

> > diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
> > index 07ae8f8..6f06352 100644
> > --- a/include/linux/coda_psdev.h
> > +++ b/include/linux/coda_psdev.h
> > @@ -24,7 +24,7 @@ static inline struct venus_comm *coda_vcp(struct super_block *sb)
> >  	return (struct venus_comm *)((sb)->s_fs_info);
> >  }
> >  
> > -
> > +#ifdef __KERNEL__
> >  /* upcalls */
> >  int venus_rootfid(struct super_block *sb, struct CodaFid *fidp);
> >  int venus_getattr(struct super_block *sb, struct CodaFid *fid,
> 
> The definitions preceeding this also should not get exported: struct venus_comm
> and coda_vcp use kernel internal types so they cannot be part of the public
> interface. kstatfs is another internal type.
> 

Fixed.

> > --- a/include/linux/nubus.h
> > +++ b/include/linux/nubus.h
> > @@ -296,6 +296,7 @@ struct nubus_dev {
> >  	struct nubus_board* board;
> >  };
> >  
> > +#ifdef __KERNEL__
> >  /* This is all NuBus devices (used to find devices later on) */
> >  extern struct nubus_dev* nubus_devices;
> >  /* This is all NuBus cards */
> 
> struct nubus_board and struct nubus_dev are clearly kernel internal,
> as they reference a proc_dir_ent.
> 
> > --- a/include/linux/reiserfs_fs.h
> > +++ b/include/linux/reiserfs_fs.h
> 
> The reiserfs_fs.h file is still such a mess that I would think it's
> impossible anyone actually used this from a program. Just try
> gcc -xc -S -o /dev/null -I. -Wall --std=c99 linux/reiserfs_fs.h
> from your usr/include directory!
> 
> It would be possible to use it to describe the on-disk data layout
> to user space, but that is obviously done elsewhere already, so
> I'd think the cleanest way would be to #ifdef __KERNEL__ everything
> except for the REISERFS_IOC_ definitions  (but not REISERFS_IOC32).
> Even that can be argued is pointless because these ioctl numbers are
> now generic across file systems.
> 

Fixed.

> > diff --git a/include/linux/socket.h b/include/linux/socket.h
> > index 20fc4bb..afc0190 100644
> > --- a/include/linux/socket.h
> > +++ b/include/linux/socket.h
> > @@ -24,10 +24,12 @@ struct __kernel_sockaddr_storage {
> >  #include <linux/types.h>		/* pid_t			*/
> >  #include <linux/compiler.h>		/* __user			*/
> >  
> > -#ifdef CONFIG_PROC_FS
> > +#ifdef __KERNEL__
> > +# ifdef CONFIG_PROC_FS
> >  struct seq_file;
> >  extern void socket_seq_show(struct seq_file *seq);
> > -#endif
> > +# endif
> > +#endif /* __KERNEL__ */
> >  
> 
> You can drop the #ifdef CONFIG_PROC_FS here, the prototype does not hurt.

Even using #ifdef CONFIG_PROC_FS will not hurt, I want to stay in safe
side ;-)

Thanks,

--
JSR


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