Re: [PATCH] /proc/sys/kernel/pointer_size

Linus Torvalds
2003-01-08T20:59:46Z

On Wed, 8 Jan 2003, John Levon wrote:
> On Wed, Jan 08, 2003 at 12:28:23PM -0800, Linus Torvalds wrote:
>
> > doesn't change suddenly on the machine, there's no point at all in doing
> > something like this and exporting it through proc, when the information is
> > perfectly available in other ways
>
> What other ways ? Dave M reasonably argued it wasn't part of the
> architecture's ABI, so did not have a place in the headers.

You should certainly see it in "uname -a" output, for example.

> > or could even be a user program config file option.
>
> Eww.

And it's less disgusting than adding a kernel hack for it?

Trust me, kernel stuff is for stuff that _cannot_ be gotten in user space,
not for random hacks.

> It's not silly, it's a necessity on architectures like pa-risc, sparc64,
> ppc64, etc. where pointers are 32 bit in userspace. OProfile simply
> cannot work at all on such systems without being able to figure out the
> units of the oprofile kernel buffer.

So?

The same is true of kernel modules - 32-bit kernel modules do not work at
all when the kernel is 64-bit.

Compile oprofile for the proper architecture if you do it yourself, and
complain to the vendor if the vendor is stupid enough to supply a 32-bit
oprofile with a 64-bit kernel.

There is _no_ excuse to bloat the kernel for user mistakes.

Linus