From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752149AbcAFR74 (ORCPT ); Wed, 6 Jan 2016 12:59:56 -0500 Received: from mail.skyhub.de ([78.46.96.112]:47991 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751605AbcAFR7y (ORCPT ); Wed, 6 Jan 2016 12:59:54 -0500 Date: Wed, 6 Jan 2016 18:59:49 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: Tony Luck , Ingo Molnar , Andrew Morton , Andy Lutomirski , Dan Williams , Robert , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , linux-nvdimm , X86 ML Subject: Re: [PATCH v7 1/3] x86: Add classes to exception tables Message-ID: <20160106175948.GA16647@pd.tnic> References: <20160106123346.GC19507@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 06, 2016 at 09:54:19AM -0800, Andy Lutomirski wrote: > I assume that this zero is to save the couple of bytes for the > relocation entry on relocatable kernels? I didn't want to touch all _ASM_EXTABLE() macro invocations by adding a third param @handler which is redundant as we know which it is. > > + new_ip = ex_fixup_addr(e); > > + handler = ex_fixup_handler(e); > > + > > + if (!handler) > > + handler = ex_handler_default; > > the !handler condition here will never trigger because the offset was > already applied. Actually, if I do "0 - .", that would overflow the int because current location is virtual address and that's 64-bit. Or would gas simply truncate it? Lemme check... Anyway, what we should do instead is simply .long 0 to denote that the @handler is implicit. Right? -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.