This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Big-endian Gcc on Intel IA32



Linus Torvalds <torvalds at transmeta dot com> wrote...

> (Inside the kernel, I'd love to be able to taint pointers and data that
> came from user space, for example, to make sure that the compiler will
> refuse to even _compile_ code that uses such data without the proper
> safety checks. This is not all that different from keeping track of what
> byte-order a specific datum has).

I would guess that you can do this with C++.

Now I realize that you are not about to rewrite the kernel in C++
(unless you have sampled a bit too much Glogg recently, :-)  What
I am saying is that you could probably make minor changes to the
current source code such that...

1. Its C interpretation does not change.
2. Its C++ interpretation would have a user_data* type and do the
   check you ask for.

I.e., you could use g++ as the San Jose checker, ;-)  The .o files
would not be any good, of course.

I seem to remember that once upon a time you said that you wanted
type int when you deal with ints (as opposed to having some typedef
name like off_t).  If that is still true, I guess you will not like
this kind of approach.

Morten


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]