Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1292167

Re: use-after-free in __perf_install_in_context

From Dmitry Vyukov <dvyukov@google.com>
Newsgroups linux.kernel
Subject Re: use-after-free in __perf_install_in_context
Date 2015-12-15 14:20 +0100
Message-ID <qFXGi-4AF-5@gated-at.bofh.it> (permalink)
References (6 earlier) <qDJ4K-6qQ-13@gated-at.bofh.it> <qE0yC-Iu-21@gated-at.bofh.it> <qE5oC-47J-7@gated-at.bofh.it> <qEcT8-Dg-25@gated-at.bofh.it> <qEr5L-1BY-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Dec 11, 2015 at 9:14 AM, Ingo Molnar <mingo@kernel.org> wrote:
>
> * Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
>
>> On Thu, Dec 10, 2015 at 10:02:51AM +0100, Peter Zijlstra wrote:
>> > On Wed, Dec 09, 2015 at 07:54:35PM -0800, Alexei Starovoitov wrote:
>> > > Freeing memory is a requirement regardless.
>> > > Even when kernel running with kasan, there must be a way to stop
>> > > stack collection and free that memory.
>> > > You cannot treat kernel as your test program or 'device under test'.
>> >
>> > Relax, that is exactly what lockdep does. It cannot dynamically allocate
>> > things because allocators use lock etc..
>> >
>> > Its fine to build up state for debug bits, esp. if its bounded, like the
>> > number of unique callchains.
>>
>> except the code in question is doing unbounded alloc_pages()
>
> Yes, but the trick is to still have a bound sized debug pool - which runs out of
> entries gracefully.
>
> Which in practice is plenty enough for most types of testing, and is a lot more
> robust than any dynamic scheme.

A hard upper bound on consumed memory would work for us without
introducing any slowdown and without increasing code complexity. So it
sounds good to me.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: use-after-free in __perf_install_in_context Dmitry Vyukov <dvyukov@google.com> - 2015-12-15 14:20 +0100

csiph-web