Thread (66 messages) 66 messages, 16 authors, 2018-08-08

Re: [PATCH v4 00/17] khwasan: kernel hardware assisted address sanitizer

From: Andrey Konovalov <hidden>
Date: 2018-06-29 14:40:30
Also in: linux-arm-kernel, linux-kbuild, linux-mm, lkml

On Fri, Jun 29, 2018 at 3:01 PM, Mark Rutland [off-list ref] wrote:
On Fri, Jun 29, 2018 at 02:45:08PM +0200, Andrey Konovalov wrote:
quoted
So with clean kernel after boot we get 40 kb memory usage. With KASAN
it is ~120 kb, which is 200% overhead. With KHWASAN it's 50 kb, which
is 25% overhead. This should approximately scale to any amounts of
used slab memory. For example with 100 mb memory usage we would get
+200 mb for KASAN and +25 mb with KHWASAN. (And KASAN also requires
quarantine for better use-after-free detection). I can explicitly
mention the overhead in %s in the changelog.
Could you elaborate on where that SLAB overhead comes from?

IIUC that's not for the shadow itself (since it's allocated up-front and
not accounted to SLAB), and that doesn't take into account the
quarantine, so what's eating that space?
Redzones. KHWASAN doesn't need them since the next slab object is
marked with a different tag (with a high probability) and acts as a
redzone.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help