Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752279AbdGGSnh (ORCPT ); Fri, 7 Jul 2017 14:43:37 -0400 Received: from mail-io0-f177.google.com ([209.85.223.177]:36713 "EHLO mail-io0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751089AbdGGSng (ORCPT ); Fri, 7 Jul 2017 14:43:36 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170706002718.GA102852@beast> <1499363602.26846.3.camel@redhat.com> From: Kees Cook Date: Fri, 7 Jul 2017 11:43:33 -0700 X-Google-Sender-Auth: X7INKhx-KBjW5gftFXLNnsaz9WY Message-ID: Subject: Re: [PATCH v3] mm: Add SLUB free list pointer obfuscation To: Christoph Lameter Cc: Rik van Riel , Andrew Morton , Pekka Enberg , David Rientjes , Joonsoo Kim , "Paul E. McKenney" , Ingo Molnar , Josh Triplett , Andy Lutomirski , Nicolas Pitre , Tejun Heo , Daniel Mack , Sebastian Andrzej Siewior , Sergey Senozhatsky , Helge Deller , Linux-MM , Tycho Andersen , LKML , "kernel-hardening@lists.openwall.com" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 863 Lines: 22 On Fri, Jul 7, 2017 at 10:06 AM, Christoph Lameter wrote: > On Fri, 7 Jul 2017, Kees Cook wrote: > >> If we also added a >0 offset, that would make things even less >> deterministic. Though I wonder if it would make the performance impact >> higher. The XOR patch right now is very light. > > There would be barely any performance impact if you keep the offset within > a cacheline since most objects start on a cacheline boundary. The > processor has to fetch the cacheline anyways. Sure, this seems like a nice additional bit of hardening, even if we're limited to a cacheline. I'd still want to protect the spray and index attacks though (which the XOR method covers), but we can do both. We should keep them distinct patches, though. If you'll Ack the XOR patch, I can poke at adding offset randomization? -Kees -- Kees Cook Pixel Security