From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753104AbdGXGiP (ORCPT ); Mon, 24 Jul 2017 02:38:15 -0400 Received: from ozlabs.org ([103.22.144.67]:46249 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751663AbdGXGiK (ORCPT ); Mon, 24 Jul 2017 02:38:10 -0400 From: Michael Ellerman To: Kees Cook , Andrew Morton Cc: Ingo Molnar , Peter Zijlstra , Josh Poimboeuf , Christoph Hellwig , "Eric W. Biederman" , Jann Horn , Eric Biggers , Elena Reshetova , Hans Liljestrand , Greg KH , Alexey Dobriyan , "Serge E. Hallyn" , arozansk@redhat.com, Davidlohr Bueso , Manfred Spraul , "axboe\@kernel.dk" , James Bottomley , "x86\@kernel.org" , Arnd Bergmann , "David S. Miller" , Rik van Riel , LKML , linux-arch , "kernel-hardening\@lists.openwall.com" Subject: Re: [PATCH v6 0/2] x86: Implement fast refcount overflow protection In-Reply-To: References: <1500422614-94821-1-git-send-email-keescook@chromium.org> <20170720091106.kigtr6zy7pjgk2s6@gmail.com> <20170721142255.586224f0db9cf0714e654859@linux-foundation.org> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Mon, 24 Jul 2017 16:38:06 +1000 Message-ID: <87zibujq5t.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kees Cook writes: > On Fri, Jul 21, 2017 at 2:22 PM, Andrew Morton >> >> Do we have a feeling for how feasible/difficult it will be for other >> architectures to implement such a thing? > > The PaX atomic_t overflow protection this is heavily based on was > ported to a number of architectures (arm, powerpc, mips, sparc), so I > suspect it shouldn't be too hard to adapt those for the more narrow > refcount_t protection: > https://forums.grsecurity.net/viewtopic.php?f=7&t=4173 The ppc code there appears to be 32-bit only and has other issues so probably isn't something we'd use. I don't think there should be any fundamental problem implementing it. What I'm not entirely clear on is what the best trade off is in terms of overhead vs checks. The summary of behaviour between the fast and full versions you promised Ingo will help there I think. cheers