Skip to contentSkip to conversation

+ git-hdrcleanup-vs-git-klibc-on-ia64.patch added to -mm tree

DISCUSSION David Woodhouse 3 participants 4 messages May 14, 2006

lore
Share & tools
lore
#0 lore raw

Review line 29

Quoted 12 lines · On Sun, 2006-05-14 at 10:54 -0700, [email protected] wrote:

diff -puN include/asm/gcc_intrin.h~git-hdrcleanup-vs-git-klibc-on-ia64 include/asm/gcc_intrin.h
---
25/include/asm/gcc_intrin.h~git-hdrcleanup-vs-git-klibc-on-ia64 Mon May 15 01:33:00 2006
+++ 25-akpm/include/asm/gcc_intrin.h Mon May 15 01:33:00 2006

(quoted diff) +2 -0
@@ -24,7 +24,9 @@
 extern void ia64_bad_param_for_setreg (void);
 extern void ia64_bad_param_for_getreg (void);
 
+#ifdef __KERNEL__
 register unsigned long ia64_r13 asm ("r13") __attribute_used__;
+#endif 

There's more than just that in asm-ia64/intrinsics.h that shouldn't be visible to userspace. In fact I'm not entirely sure how much of intrinsics.h _does_ make sense for userspace at all.

What does asm-ia64/byteorder.h include it for?

Signature · 1 line
dwmw2
#1 lore raw
Quoted 18 lines · David Woodhouse

Review line 29

Quoted 12 lines · On Sun, 2006-05-14 at 10:54 -0700, [email protected] wrote:

diff -puN include/asm/gcc_intrin.h~git-hdrcleanup-vs-git-klibc-on-ia64 include/asm/gcc_intrin.h
---
25/include/asm/gcc_intrin.h~git-hdrcleanup-vs-git-klibc-on-ia64 Mon May 15 01:33:00 2006
+++ 25-akpm/include/asm/gcc_intrin.h Mon May 15 01:33:00 2006

(quoted diff) +2 -0
@@ -24,7 +24,9 @@
 extern void ia64_bad_param_for_setreg (void);
 extern void ia64_bad_param_for_getreg (void);
 
+#ifdef __KERNEL__
 register unsigned long ia64_r13 asm ("r13") __attribute_used__;
+#endif 

There's more than just that in asm-ia64/intrinsics.h that shouldn't be visible to userspace. In fact I'm not entirely sure how much of intrinsics.h _does_ make sense for userspace at all.

Quoted 1 line

What does asm-ia64/byteorder.h include it for?

Using byte swizzling instrincts I supposed. On the other hand asm/byteorder.h really shouldn't be user-exposed to start with.

#2 lore raw
In reply to David Woodhouse
Quoted 2 lines · Christoph Hellwig

Using byte swizzling instrincts I supposed. On the other hand asm/byteorder.h really shouldn't be user-exposed to start with.

A whole bunch of things include byteorder.h

Quoted 5 lines · Christoph Hellwig

elf.h shouldn't be exported to userspace at all. there's a separate incarnation of elf.h in userland, so anyone importing the kernel one is plain stupid.

similarly no one should be using page.h, there is nothing in there userspace should ever look at

ucontext.h includes elf.h for elf_gregset_t.
elf.h includes page.h (probably for PAGE_SIZE).

Yes, they do want cleaning up -- but I want the first set of stuff in the hdrcleanup git tree to be _entirely_ simple and uncontentious. We can get on to the more interesting stuff later.

Signature · 1 line
dwmw2
#3 lore raw
In reply to David Woodhouse
Quoted 3 lines · Christoph Hellwig

Using byte swizzling instrincts I supposed. On the other hand asm/byteorder.h really shouldn't be user-exposed to start with.

asm/byteorder.h is at least useful for klibc; it can, of course, be completely done in klibc itself as long as bi-endian platforms have appropriate intrinsic defines.

klibc (ab)uses the __le16_to_cpu() et al macros; the reason for that is just to cut down on the amount of architecture-specific code that has to be written for klibc itself.

-hpa