Messages in this thread | | | Date | Wed, 19 Feb 2014 14:00:21 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH] Set bounds on what /proc/self/make-it-fail accepts. |
| |
On Wed, 19 Feb 2014 16:55:05 -0500 Dave Jones <davej@redhat.com> wrote:
> On Wed, Feb 19, 2014 at 01:40:25PM -0800, Andrew Morton wrote: > > > Switching `make_it_fail' to unsigned makes the test simpler but it does > > rather muck up the typing in there. task_struct.make_it_fail is still > > an int, we should now use simple_strtoul rather than simple_strtol, > > proc_fault_inject_read()'s snprintf() should now use %u, etc. None of > > which actually matters, but still... > > I toyed with the idea of changing task_struct.make_it_fail to unsigned too, > but only realized I missed that after I'd sent out the diff.
If we're touching the task_struct we could make it a bool.
Or just a single bit(field). task_struct already has a bunch of bitfields in it (strangely, they aren't contiguous). But some locking would be needed if tasks-other-than-current can modify the bit.
| |