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

2020-08-21 Thread Marco Elver
On Fri, Aug 21, 2020 at 01:51PM +0200, Dmitry Vyukov wrote: ... > > +++ b/lib/fault-inject-usercopy.c > > @@ -0,0 +1,66 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > +#include > > +#include > > +#include > > + > > +static struct { > > + struct fault_attr attr; > > + u32 failsi

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

2020-08-21 Thread Dmitry Vyukov
On Fri, Aug 21, 2020 at 12:50 PM wrote: > > 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

[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