All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5
@ 2006-03-14  4:55 Matt Helsley
  2006-03-14  5:01 ` Matthew L Helsley
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Matt Helsley @ 2006-03-14  4:55 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

On Mon, 2006-03-13 at 20:57 -0800, Matthew L Helsley wrote:
> [Portions of this MIME document are encrypted with a Notes certificate
> and cannot be read.]

Bah. Lotus Notes strikes again!

To avoid this problem please send patches to matthltc@us.ibm.com
instead.

Thanks,
	-Matt Helsley


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5
  2006-03-14  4:55 [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5 Matt Helsley
@ 2006-03-14  5:01 ` Matthew L Helsley
  2006-03-14  7:17 ` Narasimha Sharoff
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Matthew L Helsley @ 2006-03-14  5:01 UTC (permalink / raw)
  To: kernel-janitors

Hi Narasimha,

        Have you compile-tested this? Also, could you resend the patch to 
matthltc@us.ibm.com?

        Technically, you're not supposed to #include headers from a kernel 
in userspace. That said, I'd rather not include time.h if I don't have to 
-- then it may be easier for someone to build the userspace headers. I'll 
take a look at this.

All,
        Please drop mhelsley@us.ibm.com from replies and use 
matthltc@us.ibm.com instead.

Thanks,
        -Matt Helsley





Narasimha Sharoff <njsharoff@yahoo.com>
03/13/2006 12:35 PM
 
        To:     kernel-janitors@osdl.org
        cc:     Matthew L Helsley/Beaverton/IBM@IBMUS
        Subject:        [PATCH] bug fix to include/linux/cn_proc.h for 
2.6.16-rc5


Compilation fails for a test program which includes
cn_proc.h for Process Event Notification.
The Patch below fixes the issue.

Test Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/socket.h>
#include <linux/connector.h>
#include <linux/netlink.h>
#include <linux/cn_proc.h>

main()
{
        printf("hello\n");
}

Results:
$gcc -o b b.c
In file included from cn_proc.h:29,
                 from b.c:13:
/usr/include/linux/time.h:18: error: redefinition of
?struct timeval?

Thanks
Narasimha

Signed-Off-By: njsharoff@yahoo.com
--

include/linux/cn_proc.h |    1 -
 1 files changed, 1 deletion(-)

Index: linux-2.6.16-rc5/include/linux/cn_proc.h
=================================--- linux-2.6.16-rc5.orig/include/linux/cn_proc.h
+++ linux-2.6.16-rc5/include/linux/cn_proc.h
@@ -26,7 +26,6 @@
 #define CN_PROC_H
 
 #include <linux/types.h>
-#include <linux/time.h>
 #include <linux/connector.h>
 
 /*

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5
  2006-03-14  4:55 [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5 Matt Helsley
  2006-03-14  5:01 ` Matthew L Helsley
@ 2006-03-14  7:17 ` Narasimha Sharoff
  2006-03-14 14:38 ` Nishanth Aravamudan
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Narasimha Sharoff @ 2006-03-14  7:17 UTC (permalink / raw)
  To: kernel-janitors

Matt,

Yes, i compile tested this. See the patch below.
Note that the test uses the user space header
/usr/include/linux/cn_proc.h which is the same as the
one found at /usr/src/linux/include/linux.

Thanks
Narasimha

--- Matthew L Helsley <matthelsley@us.ibm.com> wrote:

> Hi Narasimha,
> 
>         Have you compile-tested this? Also, could
> you resend the patch to 
> matthltc@us.ibm.com?
> 
>         Technically, you're not supposed to #include
> headers from a kernel 
> in userspace. That said, I'd rather not include
> time.h if I don't have to 
> -- then it may be easier for someone to build the
> userspace headers. I'll 
> take a look at this.
> 
> All,
>         Please drop mhelsley@us.ibm.com from replies
> and use 
> matthltc@us.ibm.com instead.
> 
> Thanks,
>         -Matt Helsley
> 
> 
> 
> 
> 
> Narasimha Sharoff <njsharoff@yahoo.com>
> 03/13/2006 12:35 PM
>  
>         To:     kernel-janitors@osdl.org
>         cc:     Matthew L
> Helsley/Beaverton/IBM@IBMUS
>         Subject:        [PATCH] bug fix to
> include/linux/cn_proc.h for 
> 2.6.16-rc5
> 
> 
> Compilation fails for a test program which includes
> cn_proc.h for Process Event Notification.
> The Patch below fixes the issue.
> 
> Test Code:
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <stdint.h>
> #include <unistd.h>
> #include <sys/socket.h>
> #include <linux/connector.h>
> #include <linux/netlink.h>
> #include <linux/cn_proc.h>
> 
> main()
> {
>         printf("hello\n");
> }
> 
> Results:
> $gcc -o b b.c
> In file included from cn_proc.h:29,
>                  from b.c:13:
> /usr/include/linux/time.h:18: error: redefinition of
> ?struct timeval?
> 
> Thanks
> Narasimha
> 
> Signed-Off-By: njsharoff@yahoo.com
> --
> 
> include/linux/cn_proc.h |    1 -
>  1 files changed, 1 deletion(-)
> 
> Index: linux-2.6.16-rc5/include/linux/cn_proc.h
>
=================================> --- linux-2.6.16-rc5.orig/include/linux/cn_proc.h
> +++ linux-2.6.16-rc5/include/linux/cn_proc.h
> @@ -26,7 +26,6 @@
>  #define CN_PROC_H
>  
>  #include <linux/types.h>
> -#include <linux/time.h>
>  #include <linux/connector.h>
>  
>  /*
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5
  2006-03-14  4:55 [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5 Matt Helsley
  2006-03-14  5:01 ` Matthew L Helsley
  2006-03-14  7:17 ` Narasimha Sharoff
@ 2006-03-14 14:38 ` Nishanth Aravamudan
  2006-03-14 19:19 ` Matt Helsley
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Nishanth Aravamudan @ 2006-03-14 14:38 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

On 13.03.2006 [23:17:04 -0800], Narasimha Sharoff wrote:
> Matt,
> 
> Yes, i compile tested this. See the patch below.
> Note that the test uses the user space header
> /usr/include/linux/cn_proc.h which is the same as the
> one found at /usr/src/linux/include/linux.

This sounds like something is busted in userspace packaging. I would not
expect these files to be identical. That just sounds like a workaround
to the "don't include kernel files in userspace issue".

Thanks,
Nish

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5
  2006-03-14  4:55 [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5 Matt Helsley
                   ` (2 preceding siblings ...)
  2006-03-14 14:38 ` Nishanth Aravamudan
@ 2006-03-14 19:19 ` Matt Helsley
  2006-03-16 17:56 ` Narasimha Sharoff
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Matt Helsley @ 2006-03-14 19:19 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 819 bytes --]

On Tue, 2006-03-14 at 06:38 -0800, Nishanth Aravamudan wrote:
> On 13.03.2006 [23:17:04 -0800], Narasimha Sharoff wrote:
> > Matt,
> > 
> > Yes, i compile tested this. See the patch below.
> > Note that the test uses the user space header
> > /usr/include/linux/cn_proc.h which is the same as the
> > one found at /usr/src/linux/include/linux.
> 
> This sounds like something is busted in userspace packaging. I would not
> expect these files to be identical. That just sounds like a workaround
> to the "don't include kernel files in userspace issue".
> 
> Thanks,
> Nish

Narasimha,

	Who packaged the headers? Is it a distro package? If so it may be
appropriate to contact them and point out the problem. I'd appreciate
being cc'd just so I can track this.

	Thanks for submitting a report.

Cheers,
	-Matt Helsley


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5
  2006-03-14  4:55 [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5 Matt Helsley
                   ` (3 preceding siblings ...)
  2006-03-14 19:19 ` Matt Helsley
@ 2006-03-16 17:56 ` Narasimha Sharoff
  2006-03-16 18:44 ` Nishanth Aravamudan
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Narasimha Sharoff @ 2006-03-16 17:56 UTC (permalink / raw)
  To: kernel-janitors

If time.h need not be included in cn_proc.h, is there
a reason not to apply this patch?

As i see, not having time.h in cn_proc.h resolves user
space problem i am seeing. Kernel compilation seems to
go ok (tried it on a ppc system,2.6.16-rc5).

I do not know how the header files end up in
/usr/include/linux directory. Is there a standard
process followed while packaging or is this distro
specific? Can someone forward me a pointer?

Thanks
Narasimha

--- Matt Helsley <matthltc@us.ibm.com> wrote:

> On Tue, 2006-03-14 at 06:38 -0800, Nishanth
> Aravamudan wrote:
> > On 13.03.2006 [23:17:04 -0800], Narasimha Sharoff
> wrote:
> > > Matt,
> > > 
> > > Yes, i compile tested this. See the patch below.
> > > Note that the test uses the user space header
> > > /usr/include/linux/cn_proc.h which is the same
> as the
> > > one found at /usr/src/linux/include/linux.
> > 
> > This sounds like something is busted in userspace
> packaging. I would not
> > expect these files to be identical. That just
> sounds like a workaround
> > to the "don't include kernel files in userspace
> issue".
> > 
> > Thanks,
> > Nish
> 
> Narasimha,
> 
> 	Who packaged the headers? Is it a distro package?
> If so it may be
> appropriate to contact them and point out the
> problem. I'd appreciate
> being cc'd just so I can track this.
> 
> 	Thanks for submitting a report.
> 
> Cheers,
> 	-Matt Helsley
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5
  2006-03-14  4:55 [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5 Matt Helsley
                   ` (4 preceding siblings ...)
  2006-03-16 17:56 ` Narasimha Sharoff
@ 2006-03-16 18:44 ` Nishanth Aravamudan
  2006-03-16 21:03 ` Matt Helsley
  2006-03-28 23:29 ` Matt Helsley
  7 siblings, 0 replies; 9+ messages in thread
From: Nishanth Aravamudan @ 2006-03-16 18:44 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 2425 bytes --]

On 16.03.2006 [09:56:13 -0800], Narasimha Sharoff wrote:
> If time.h need not be included in cn_proc.h, is there
> a reason not to apply this patch?

This only applies if there is no reason to include it *in the kernel*.
The fact that it breaks an (arbitrary) userspace build is irrelevant (at
least as far as KJ is concerned).

> As i see, not having time.h in cn_proc.h resolves user space problem i
> am seeing. Kernel compilation seems to go ok (tried it on a ppc
> system,2.6.16-rc5).

I would suggest giving the kernel side justification only, then, as
uerspace should not be using kernel headers directly anyways.

> I do not know how the header files end up in /usr/include/linux
> directory. Is there a standard process followed while packaging or is
> this distro specific? Can someone forward me a pointer?

Distro specific, there's probably a package you can find that put the
header there (apt-file search filename or dpkg -S filename can help on
Debian-based distros). I would figure out why it's there (and if it
should be). Complain to the connector folks about it, as well (or just
bring it to their attention).

Thanks,
Nish

> 
> Thanks
> Narasimha
> 
> --- Matt Helsley <matthltc@us.ibm.com> wrote:
> 
> > On Tue, 2006-03-14 at 06:38 -0800, Nishanth
> > Aravamudan wrote:
> > > On 13.03.2006 [23:17:04 -0800], Narasimha Sharoff
> > wrote:
> > > > Matt,
> > > > 
> > > > Yes, i compile tested this. See the patch below.
> > > > Note that the test uses the user space header
> > > > /usr/include/linux/cn_proc.h which is the same
> > as the
> > > > one found at /usr/src/linux/include/linux.
> > > 
> > > This sounds like something is busted in userspace
> > packaging. I would not
> > > expect these files to be identical. That just
> > sounds like a workaround
> > > to the "don't include kernel files in userspace
> > issue".
> > > 
> > > Thanks,
> > > Nish
> > 
> > Narasimha,
> > 
> > 	Who packaged the headers? Is it a distro package?
> > If so it may be
> > appropriate to contact them and point out the
> > problem. I'd appreciate
> > being cc'd just so I can track this.
> > 
> > 	Thanks for submitting a report.
> > 
> > Cheers,
> > 	-Matt Helsley
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 

-- 
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5
  2006-03-14  4:55 [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5 Matt Helsley
                   ` (5 preceding siblings ...)
  2006-03-16 18:44 ` Nishanth Aravamudan
@ 2006-03-16 21:03 ` Matt Helsley
  2006-03-28 23:29 ` Matt Helsley
  7 siblings, 0 replies; 9+ messages in thread
From: Matt Helsley @ 2006-03-16 21:03 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]

On Thu, 2006-03-16 at 10:44 -0800, Nishanth Aravamudan wrote:
> On 16.03.2006 [09:56:13 -0800], Narasimha Sharoff wrote:
<snip>
> > I do not know how the header files end up in /usr/include/linux
> > directory. Is there a standard process followed while packaging or is
> > this distro specific? Can someone forward me a pointer?
> 
> Distro specific, there's probably a package you can find that put the
> header there (apt-file search filename or dpkg -S filename can help on
> Debian-based distros). I would figure out why it's there (and if it
> should be). Complain to the connector folks about it, as well (or just
> bring it to their attention).

	Perhaps contacting the package maintainer is the correct approach. Have
them remove the #include line from cn_proc.h.

	cn_proc.h should be available to userspace in some form. The event
structures it sends to userspace are defined there. That structure
includes a struct timespec as a timestamp.

	The way I see it, this issue isn't related to connectors. It's related
to process events which send a timestamp with the event to userspace. It
happens to use a connector to send the events. I included time.h because
I needed the timespec struct and getnstimestamp().

Cheers,
	-Matt Helsley


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5
  2006-03-14  4:55 [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5 Matt Helsley
                   ` (6 preceding siblings ...)
  2006-03-16 21:03 ` Matt Helsley
@ 2006-03-28 23:29 ` Matt Helsley
  7 siblings, 0 replies; 9+ messages in thread
From: Matt Helsley @ 2006-03-28 23:29 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]

On Thu, 2006-03-16 at 10:44 -0800, Nishanth Aravamudan wrote:
> On 16.03.2006 [09:56:13 -0800], Narasimha Sharoff wrote:
> > If time.h need not be included in cn_proc.h, is there
> > a reason not to apply this patch?
> 
> This only applies if there is no reason to include it *in the kernel*.
> The fact that it breaks an (arbitrary) userspace build is irrelevant (at
> least as far as KJ is concerned).
> 
> > As i see, not having time.h in cn_proc.h resolves user space problem i
> > am seeing. Kernel compilation seems to go ok (tried it on a ppc
> > system,2.6.16-rc5).
> 
> I would suggest giving the kernel side justification only, then, as
> uerspace should not be using kernel headers directly anyways.
> 
> > I do not know how the header files end up in /usr/include/linux
> > directory. Is there a standard process followed while packaging or is
> > this distro specific? Can someone forward me a pointer?
> 
> Distro specific, there's probably a package you can find that put the
> header there (apt-file search filename or dpkg -S filename can help on
> Debian-based distros). I would figure out why it's there (and if it
> should be). Complain to the connector folks about it, as well (or just
> bring it to their attention).
> 
> Thanks,
> Nish

	OK, I looked into it and the #include <time.h> is cruft leftover from
an attempt to add a nanosecond-scale timestamp function to the kernel. I
eventually stopped pushing that patch because I found a suitable
replacement however I accidentally left #include<time.h> in cn_proc.h

	I'll run some compile-tests with Narasimha's patch and then Ack it
assuming it doesn't break compilation.

Cheers,
	-Matt Helsley


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-03-28 23:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-14  4:55 [KJ] Re: [PATCH] bug fix to include/linux/cn_proc.h for 2.6.16-rc5 Matt Helsley
2006-03-14  5:01 ` Matthew L Helsley
2006-03-14  7:17 ` Narasimha Sharoff
2006-03-14 14:38 ` Nishanth Aravamudan
2006-03-14 19:19 ` Matt Helsley
2006-03-16 17:56 ` Narasimha Sharoff
2006-03-16 18:44 ` Nishanth Aravamudan
2006-03-16 21:03 ` Matt Helsley
2006-03-28 23:29 ` Matt Helsley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.