public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] s390/compat: build error for large compat syscall args
@ 2016-04-21 13:37 Jungseung Lee
  0 siblings, 0 replies; 2+ messages in thread
From: Jungseung Lee @ 2016-04-21 13:37 UTC (permalink / raw)
  To: heiko.carstens, linux-arm-kernel, linux-kernel

Hello,

> s390/compat: build error for large compat syscall args
>
>   Enforce 32 bit types for all compat syscall argument types.
>
>   This way we can make sure that all arguments get correct sign
>   or zero extension. Otherwise incorrect code would be generated.
>
>   E.g. for a 'long' type the COMPAT_SYSCALL_DEFINE macro wouldn't
>   generate code that would cause sign extension of the passed in 32
>   bit user space parameter.
>   This can cause quite subtle bugs like e.g. the one that was fixed
>   with dfd948e32af2e "fs/compat: fix parameter handling for compat
>   readv/writev syscalls".

include/linux/compat.h
#ifndef __SC_DELOUSE
#define __SC_DELOUSE(t,v) ((t)(unsigned long)(v))
#endif

We couldn't make sure that all compat syscall arguments has 
32 bit types with default definition.
Is there any reason that this patch is only applied for s390?

Please let me know if I miss something. 

BR

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

* RE: [PATCH] s390/compat: build error for large compat syscall args
@ 2016-04-21 13:49 Jungseung Lee
  0 siblings, 0 replies; 2+ messages in thread
From: Jungseung Lee @ 2016-04-21 13:49 UTC (permalink / raw)
  To: heiko.carstens; +Cc: js07.lee, linux-arm-kernel, linux-kernel

Hello,

> s390/compat: build error for large compat syscall args
>
>   Enforce 32 bit types for all compat syscall argument types.
>
>   This way we can make sure that all arguments get correct sign
>   or zero extension. Otherwise incorrect code would be generated.
>
>   E.g. for a 'long' type the COMPAT_SYSCALL_DEFINE macro wouldn't
>   generate code that would cause sign extension of the passed in 32
>   bit user space parameter.
>   This can cause quite subtle bugs like e.g. the one that was fixed
>   with dfd948e32af2e "fs/compat: fix parameter handling for compat
>   readv/writev syscalls".

include/linux/compat.h
#ifndef __SC_DELOUSE
#define __SC_DELOUSE(t,v) ((t)(unsigned long)(v)) #endif

We couldn't make sure that all compat syscall arguments has
32 bit types with default definition.
Is there any reason that this patch is only applied for s390?

Please let me know if I miss something.

BR

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

end of thread, other threads:[~2016-04-21 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-21 13:49 [PATCH] s390/compat: build error for large compat syscall args Jungseung Lee
  -- strict thread matches above, loose matches on Subject: below --
2016-04-21 13:37 Jungseung Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox