From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751645AbeAOR7G (ORCPT + 1 other); Mon, 15 Jan 2018 12:59:06 -0500 Received: from merlin.infradead.org ([205.233.59.134]:41736 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751228AbeAOR7F (ORCPT ); Mon, 15 Jan 2018 12:59:05 -0500 Date: Mon, 15 Jan 2018 18:58:46 +0100 From: Peter Zijlstra To: Josh Poimboeuf Cc: David Woodhouse , linux-kernel@vger.kernel.org, Dave Hansen , Ashok Raj , Thomas Gleixner , Tim Chen , Andy Lutomirski , Linus Torvalds , Greg KH , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , Dan Williams , Paolo Bonzini , Jun Nakajima , Asit Mallick , Borislav Petkov Subject: Re: [PATCH 3/4] x86/jump_label: Implement arch_static_assert() Message-ID: <20180115175846.GA2269@hirez.programming.kicks-ass.net> References: <20180115164428.498966552@infradead.org> <20180115164909.894255586@infradead.org> <20180115172212.nw5dqjrztqtfyist@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180115172212.nw5dqjrztqtfyist@treble> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Mon, Jan 15, 2018 at 11:22:12AM -0600, Josh Poimboeuf wrote: > On Mon, Jan 15, 2018 at 05:44:31PM +0100, Peter Zijlstra wrote: > > +static __always_inline void arch_static_assert(void) > > +{ > > + asm volatile ("1:\n\t" > > + ".pushsection .discard.jump_assert, \"aw\" \n\t" > > + _ASM_ALIGN "\n\t" > > + _ASM_PTR "1b \n\t" > > + ".popsection \n\t"); > > +} > > + > > This needs a nice comment about what exactly it asserts. Right, I'll go write one, if you don't see anything horrendous in the objtool code ofcourse :-) > And also, people without objtool enabled (i.e., no ORC or livepatch) > won't see the assertion. Do we care about those people? :-) Nah, we should get plenty of build coverage with the others I think.