Re: [patch] add epoll compat code to kernel/compat.c ...

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Davide Libenzi
Date: Sunday, February 11, 2007 - 4:18 pm

On Sun, 11 Feb 2007, Heiko Carstens wrote:


Yup, that's broken not only on s390, but on every arch with alignof(u64) == 8
in 32 bits mode.
The assumption was that for cases like the above, you simply wouldn't wire 
the compat_ version. That is true for epoll_wait and epoll_ctl, where the 
only need for compat was the "struct epoll_event". But that's not true for 
epoll_pwait, since this one needs to be wired because of the sigset_t.
On top of sigset_t, epoll_pwait may need "struct epoll_event" translation.
Now, that *really* sux because two versions of compat_epoll_pwait are 
needed, once that does sigset_t translation only, and one that does 
sigset_t + "struct epoll_event".




i386 does not, for example ;)




No, it won't work. Unless there is (or we define) a per-arch macro that 
tells us how the 32 bits mode align an u64, I'm afraid we can't do any 
smart tricks and we need to have the double compat_epoll_pwait.



- Davide


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch] add epoll compat code to kernel/compat.c ..., Davide Libenzi, (Sun Feb 11, 1:15 pm)
Re: [patch] add epoll compat code to kernel/compat.c ..., Heiko Carstens, (Sun Feb 11, 2:47 pm)
Re: [patch] add epoll compat code to kernel/compat.c ..., Davide Libenzi, (Sun Feb 11, 4:18 pm)