From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932846AbdGSXaa (ORCPT ); Wed, 19 Jul 2017 19:30:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39342 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932317AbdGSXa2 (ORCPT ); Wed, 19 Jul 2017 19:30:28 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2D2F761E51 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2D2F761E51 Date: Wed, 19 Jul 2017 18:30:24 -0500 From: Josh Poimboeuf To: Kees Cook Cc: Ingo Molnar , Peter Zijlstra , Christoph Hellwig , "Eric W. Biederman" , Andrew Morton , 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 2/2] x86/refcount: Implement fast refcount overflow protection Message-ID: <20170719233024.nt5yr5xoc5woelbk@treble> References: <1500422614-94821-1-git-send-email-keescook@chromium.org> <1500422614-94821-3-git-send-email-keescook@chromium.org> <20170719193718.bvkkde5apbboudrk@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 19 Jul 2017 23:30:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 19, 2017 at 04:12:37PM -0700, Kees Cook wrote: > On Wed, Jul 19, 2017 at 12:37 PM, Josh Poimboeuf wrote: > > +#define ASM_UNREACHABLE \ > > + "999: .pushsection .discard.unreachable\n\t" \ > > + ".long 999b - .\n\t" \ > > + ".popsection\n\t" > > Will this end up running into the same bug fixed with > 3d1e236022cc1426b0834565995ddee2ca231cee and the __LINE__ macro? I > could tell under which conditions gcc would do this kind of merging... I hope not, but objtool should complain about it if it does. We could involve the __LINE__ macro, or some other way to make the labels unique, but that might complicate the code a bit, so we can delay doing that unless necessary. -- Josh