Re: call_rcu from trace_preempt

From: Daniel Wagner
Date: Tue Jun 16 2015 - 02:54:42 EST


On 06/16/2015 08:46 AM, Alexei Starovoitov wrote:
> On 6/15/15 11:34 PM, Daniel Wagner wrote:
>> On 06/16/2015 08:25 AM, Alexei Starovoitov wrote:
>>> On 6/15/15 11:06 PM, Daniel Wagner wrote:
>>>>> with the above 'fix' the trace.patch is now passing.
>>>> It still crashes for me with the original test program
>>>>
>>>> [ 145.908013] [<ffffffff810d1da1>] ? __rcu_reclaim+0x101/0x3d0
>>>> [ 145.908013] [<ffffffff810d1ca0>] ? rcu_barrier_func+0x250/0x250
>>>> [ 145.908013] [<ffffffff810abc03>] ?
>>>> trace_hardirqs_on_caller+0xf3/0x240
>>>> [ 145.908013] [<ffffffff810d9afa>] rcu_do_batch+0x2ea/0x6b0
>>>
>>> yes. full bpf test still crashes.
>>> That's why I said trace.patch is passing ;)
>>> There is something else in there. One 'fix' at a time.
>>
>> Ah, sorry, I read it is working now :) Anyway, I'll keep looking
>> as well.
>>
>> Yesterday I wrote a small torture program for the map
>> implementation. Just to rule out memory corruption there.
>> Are you interested in it? If yes I could clean it a bit.
>
> of course!
> We already have samples/bpf/test_maps.c that stresses map
> access from user space and lib/test_bpf.c that stress JIT
> and interpreter from the kernel.
> Looking at your test, I think it doesn't buy as much doing it
> from the kernel?

No, it doesn't really buy you anything compared to test_maps.c. I was
just ignored to the fact that test_maps.c exists. My goal was to reduce
the problem to a smallest unit and therefore tried to do it inside the
kernel without any additional layers.

> If so, I think would be great to add it to test_maps.c
>
> Will read it more carefully tomorrow.

No need, test_maps.c is far better.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/