[PATCH v3 1/3] lib, include/linux: add usercopy failure capability

2020-08-31 Thread albert . linde
From: Albert van der Linde Add a failure injection capability to improve testing of fault-tolerance in usages of user memory access functions. Add CONFIG_FAULT_INJECTION_USERCOPY to enable faults in usercopy functions. The should_fail_usercopy function is to be called by these functions (copy_fr

[PATCH v3 2/3] lib, uaccess: add failure injection to usercopy functions

2020-08-31 Thread albert . linde
From: Albert van der Linde To test fault-tolerance of user memory access functions, introduce fault injection to usercopy functions. If a failure is expected return either -EFAULT or the total amount of bytes that were not copied. Reviewed-by: Akinobu Mita Reviewed-by: Alexander Potapenko Sig

[PATCH v3 3/3] x86: add failure injection to get/put/clear_user

2020-08-31 Thread albert . linde
From: Albert van der Linde To test fault-tolerance of user memory acceses in x86, add support for fault injection. Make both put_user() and get_user() fail with -EFAULT, and clear_user() fail by not clearing any bytes. Reviewed-by: Akinobu Mita Reviewed-by: Alexander Potapenko Signed-off-by:

[PATCH v3 0/3] add fault injection to user memory access

2020-08-31 Thread albert . linde
From: Albert van der Linde The goal of this series is to improve testing of fault-tolerance in usages of user memory access functions, by adding support for fault injection. The first patch adds failure injection capability for usercopy functions. The second changes usercopy functions to use thi

[PATCH v2 2/3] lib, uaccess: add failure injection to usercopy functions

2020-08-28 Thread albert . linde
From: Albert van der Linde To test fault-tolerance of user memory access functions, introduce fault injection to usercopy functions. If a failure is expected return either -EFAULT or the total amount of bytes that were not copied. Signed-off-by: Albert van der Linde --- v2: - removed partial

[PATCH v2 1/3] lib, include/linux: add usercopy failure capability

2020-08-28 Thread albert . linde
From: Albert van der Linde Add a failure injection capability to improve testing of fault-tolerance in usages of user memory access functions. Add CONFIG_FAULT_INJECTION_USERCOPY to enable faults in usercopy functions. The should_fail_usercopy function is to be called by these functions (copy_fr

[PATCH v2 0/3] add fault injection to user memory access

2020-08-28 Thread albert . linde
From: Albert van der Linde The goal of this series is to improve testing of fault-tolerance in usages of user memory access functions, by adding support for fault injection. The first patch adds failure injection capability for usercopy functions. The second changes usercopy functions to use thi

[PATCH v2 3/3] x86: add failure injection to get/put/clear_user

2020-08-28 Thread albert . linde
From: Albert van der Linde To test fault-tolerance of user memory acceses in x86, add support for fault injection. Make both put_user() and get_user() fail with -EFAULT, and clear_user() fail by not clearing any bytes. Signed-off-by: Albert van der Linde --- v2: - no significant changes ---

[PATCH 3/3] x86: add failure injection to get/put/clear_user

2020-08-21 Thread albert . linde
From: Albert van der Linde To test fault-tolerance of usercopy accesses in x86, add support for fault injection. Make both put_user() and get_user() fail with -EFAULT, and clear_user() fail by partially clearing fewer bytes. Signed-off-by: Albert van der Linde --- arch/x86/include/asm/uaccess

[PATCH 1/3] lib, include/linux: add usercopy failure capability

2020-08-21 Thread albert . linde
From: Albert van der Linde Add a failure injection capability to improve testing of fault-tolerance in usages of user memory access functions. Adds CONFIG_FAULT_INJECTION_USERCOPY to enable faults in usercopy functions. By default functions are to either fail with -EFAULT or return that no bytes

[PATCH 2/3] lib, uaccess: add failure injection to usercopy functions

2020-08-21 Thread albert . linde
From: Albert van der Linde To test fault-tolerance of usercopy accesses, introduce fault injection in usercopy functions. Adds failure injection to usercopy functions. If a failure is expected we return either the failure or the total amount of bytes. As many usercopy functions can fail partiall

[PATCH 0/3] add fault injection to user memory access functions

2020-08-21 Thread albert . linde
From: Albert van der Linde The goal of this series is to improve testing of fault-tolerance in usages of user memory access functions, by adding support for fault injection. The first patch adds failure injection capability for usercopy functions. The second changes usercopy functions to use thi