Bug 9260 - tipc_config.h is not installed when doing "make headers_install"
Summary: tipc_config.h is not installed when doing "make headers_install"
Status: CLOSED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Configuration (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Sam Ravnborg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-29 09:10 UTC by Martin Peylo
Modified: 2007-10-31 11:42 UTC (History)
0 users

See Also:
Kernel Version: 2.6.23.1
Tree: Mainline
Regression: ---


Attachments

Description Martin Peylo 2007-10-29 09:10:26 UTC
Most recent kernel where this bug did not occur: 2.6.15.7
Distribution: all
Hardware Environment: all
Software Environment: all

Problem Description:
When doing "make headers_install" the file tipc_config.h is not installed. It describes the interface to configure the TIPC module and it is needed when building the config utility (tipc-config). 
Adding the following line to include/linux/Kbuild solves this:
header-y += tipc_config.h

Steps to reproduce: make headers_install
Comment 1 Anonymous Emailer 2007-10-29 12:07:52 UTC
Reply-To: akpm@linux-foundation.org

On Mon, 29 Oct 2007 09:10:26 -0700 (PDT)
bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=9260
> 
>            Summary: tipc_config.h is not installed when doing "make
>                     headers_install"
>            Product: Other
>            Version: 2.5
>      KernelVersion: 2.6.23.1
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Configuration
>         AssignedTo: zippel@linux-m68k.org
>         ReportedBy: linux@izac.de
> 
> 
> Most recent kernel where this bug did not occur: 2.6.15.7
> Distribution: all
> Hardware Environment: all
> Software Environment: all
> 
> Problem Description:
> When doing "make headers_install" the file tipc_config.h is not installed. It
> describes the interface to configure the TIPC module and it is needed when
> building the config utility (tipc-config). 
> Adding the following line to include/linux/Kbuild solves this:
> header-y += tipc_config.h
> 
> Steps to reproduce: make headers_install
> 
Comment 2 Sam Ravnborg 2007-10-29 12:19:17 UTC
Hi tipc experts.

Do you consider the two tipc heder files: linux/tipc.h and linux/tipc_config.h
as appropriate for exporting to userspace?
I noticed a few inline functions that made me consider if they should be wrapped
in #ifdef __KERNEL__ / #endif
But on the other hand they looked pretty generic.

We have a bugzilla entry requesting them to be added.
See http://bugzilla.kernel.org/show_bug.cgi?id=9260

	Sam
Comment 3 Anonymous Emailer 2007-10-29 12:40:42 UTC
Reply-To: allan.stephens@windriver.com

Hi Sam:

Both files are appropriate for exporting to userspace.  However, there
appears to be an issue with the way tipc_config.h includes the string
library; it should be done as follows:

#ifdef __KERNEL__
#include <linux/string.h>
#else
#include <string.h>
#endif 

so that it will work properly in both userspace and kernel space.

Regards,
Al


> -----Original Message-----
> From: Sam Ravnborg [mailto:sam@ravnborg.org] 
> Sent: Monday, October 29, 2007 3:20 PM
> To: bugme-daemon@bugzilla.kernel.org; jon.maloy@ericsson.com; 
> per.liden@ericsson.com; Stephens, Allan; 
> tipc-discussion@lists.sourceforge.net
> Subject: Re: [Bug 9260] tipc_config.h is not installed when 
> doing "make headers_install"
> 
> Hi tipc experts.
> 
> Do you consider the two tipc heder files: linux/tipc.h and 
> linux/tipc_config.h as appropriate for exporting to userspace?
> I noticed a few inline functions that made me consider if 
> they should be wrapped in #ifdef __KERNEL__ / #endif But on 
> the other hand they looked pretty generic.
> 
> We have a bugzilla entry requesting them to be added.
> See http://bugzilla.kernel.org/show_bug.cgi?id=9260
> 
>       Sam
> 
Comment 4 Sam Ravnborg 2007-10-29 13:46:08 UTC
Hi Allan.
> However, there
> appears to be an issue with the way tipc_config.h includes the string
> library; it should be done as follows:
> 
> #ifdef __KERNEL__
> #include <linux/string.h>
> #else
> #include <string.h>
> #endif


I suggest just killing TCM_SET(...).
It is too big for an inline anyway.
And it is unused in the kernel.
I found no other uses of <linux/string.h>.

And looking at other exported headers very few include inline functions
and if the do they are simpler than TCM_SET().
And no other uses <linux/string.h>.

	Sam
Comment 5 David S. Miller 2007-10-30 01:20:27 UTC
From: Andrew Morton <akpm@linux-foundation.org>
Date: Mon, 29 Oct 2007 12:07:16 -0700

> On Mon, 29 Oct 2007 09:10:26 -0700 (PDT)
> bugme-daemon@bugzilla.kernel.org wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=9260
 ...
> > Problem Description:
> > When doing "make headers_install" the file tipc_config.h is not installed.
> It
> > describes the interface to configure the TIPC module and it is needed when
> > building the config utility (tipc-config). 
> > Adding the following line to include/linux/Kbuild solves this:
> > header-y += tipc_config.h
> > 

Fair enough, I'll commit the following and submit to
-stable as well.

From 502ef38da15d817f8e67acefc12dc2212f7f8aa1 Mon Sep 17 00:00:00 2001
From: David S. Miller <davem@sunset.davemloft.net>
Date: Tue, 30 Oct 2007 01:19:19 -0700
Subject: [PATCH] [TIPC]: Add tipc_config.h to include/linux/Kbuild.

Needed, as reported in:

http://bugzilla.kernel.org/show_bug.cgi?id=9260

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 include/linux/Kbuild |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 6a65231..bd33c22 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -149,6 +149,7 @@ header-y += ticable.h
 header-y += times.h
 header-y += tiocl.h
 header-y += tipc.h
+header-y += tipc_config.h
 header-y += toshiba.h
 header-y += ultrasound.h
 header-y += un.h
Comment 6 Sam Ravnborg 2007-10-31 11:42:13 UTC
The checkin required an additional fix which has hit mainline:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=97ef1bb0c8e371b7988287f38bd107c4aa14d78d

Case is hereby closed.
Thanks for the original report.

/Sam

Note You need to log in before you can comment on or make changes to this bug.