public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* generic uaccess.h
@ 2009-07-24  7:39 Michal Simek
  2009-07-24  9:20 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Simek @ 2009-07-24  7:39 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linux Kernel list, John Williams

Hi Arnd,

I have just look at asm-generic uaccess.h and there is one thing which
seems to me wrong.

For put_user macro - you use __copy_to_user but you have for 64bit case
ifdef CONFIG_64BIT
but  look at fs/eventfd: eventfd_read function. At least for this
function(syscall) is necessary "return" 64bit
value on 32bit machines too.
IMHO that ifdef CONFIG_64BIT shouldn't be there.

What do you think?
If you agree with me, I'll generate proper patch with description.

Thanks,
Michal


diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h
index b218b85..bbbb983 100644
--- a/include/asm-generic/uaccess.h
+++ b/include/asm-generic/uaccess.h
@@ -119,11 +119,9 @@ static inline __must_check long __copy_to_user(void
__user
                case 4:
                        *(u32 __force *)to = *(u32 *)from;
                        return 0;
-#ifdef CONFIG_64BIT
                case 8:
                        *(u64 __force *)to = *(u64 *)from;
                        return 0;
-#endif
                default:
                        break;
                }


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854


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

end of thread, other threads:[~2009-07-27 18:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-24  7:39 generic uaccess.h Michal Simek
2009-07-24  9:20 ` Arnd Bergmann
2009-07-24  9:44   ` Michal Simek
2009-07-27  9:43   ` Michal Simek
2009-07-27 18:18     ` Arnd Bergmann

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