]> git.karo-electronics.de Git - linux-beck.git/commit
s390/appldata: make copy_from_user() invocations provably correct
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 14 Oct 2013 12:08:35 +0000 (14:08 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 24 Oct 2013 15:17:07 +0000 (17:17 +0200)
commit57f47ba0cb74303230a373d27238a0aaa0df3775
tree92bea4736086a721aafd7d5d0fdcf31b5fc3ba97
parent041058a16a71a1257a1c3c19a55d74641912b918
s390/appldata: make copy_from_user() invocations provably correct

Just change the type of "len" to unsigned int so the compiler can prove
that we don't have a buffer overflow (and generates less code).
We get rid of these:

In function 'copy_from_user',
    inlined from 'appldata_interval_handler' at
    arch/s390/appldata/appldata_base.c:265:
      uaccess.h:303: warning: call to 'copy_from_user_overflow' declared
      with attribute warning: copy_from_user() buffer size is not provably
      correct
In function 'copy_from_user',
    inlined from 'appldata_timer_handler' at
    arch/s390/appldata/appldata_base.c:225:
      uaccess.h:303: warning: call to 'copy_from_user_overflow' declared
      with attribute warning: copy_from_user() buffer size is not provably
      correct
In function 'copy_from_user',
    inlined from 'appldata_generic_handler' at
    arch/s390/appldata/appldata_base.c:333:
      uaccess.h:303: warning: call to 'copy_from_user_overflow' declared
      with attribute warning: copy_from_user() buffer size is not provably
      correct

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/appldata/appldata_base.c