From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Marek Subject: Re: [PATCH 2/2] kbuild: modversions for exported asm symbols Date: Tue, 1 Nov 2016 16:50:10 +0100 Message-ID: <3e91060f-33bb-2f1d-1e39-7c178913a0cc@suse.com> References: <20161015124352.10795-1-npiggin@gmail.com> <7315031.MmlhY1rulM@wuerfel> <20161020145827.453025a6@roar.ozlabs.ibm.com> <16513464.3RM484EDf1@wuerfel> <20161031221445.34e50e69@roar.ozlabs.ibm.com> <20161102013633.5b437f36@roar.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20161102013633.5b437f36@roar.ozlabs.ibm.com> Sender: linux-kbuild-owner@vger.kernel.org To: Nicholas Piggin Cc: Arnd Bergmann , linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, Al Viro List-Id: linux-arch.vger.kernel.org On 2016-11-01 15:36, Nicholas Piggin wrote: > On Tue, 1 Nov 2016 15:19:59 +0100 > Michal Marek wrote: > >> On 2016-10-31 12:14, Nicholas Piggin wrote: >>> +# This is convoluted. The .S file must first be preprocessed to run guards and >>> +# expand names, then the resulting exports must be constructed into plain >>> +# EXPORT_SYMBOL(symbol); to build our dummy C file, and that gets preprocessed >>> +# to make the genksyms input. >>> # >>> # These mirror gensymtypes_c and co above, keep them in synch. >>> cmd_gensymtypes_S = \ >>> (echo "\#include " ; \ >>> echo "\#include " ; \ >>> - grep EXPORT_SYMBOL $< | sed 's/$$/;/' ) | \ >>> + $(CPP) $(a_flags) $< | \ >>> + grep ^___EXPORT_SYMBOL | \ >>> + sed 's/___EXPORT_SYMBOL \([a-zA-Z0-9_]*\),.*/EXPORT_SYMBOL(\1);/' ) | \ >> >> Is this sed pass necessary? Just add -D__GENKSYMS__ also to the first >> cpp run and EXPORT_SYMBOL will stay intact. > > I can't see how it would work if asm-generic/export.h doesn't have any > tests for GENKSYMS. > >> Anyway, I'm going to merge your patch 2/2 now. > > Okay. We should come to some resolution of the preprocessing issue too. > I'm logging off for tonight, but if you want to tweak or redo the > incremental patch, feel free. I applied the folded patch as is. The preprocessing is not pretty, but the 4.9 regression is more important to be fixed. Thanks, Michal From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:52261 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750926AbcKAPuN (ORCPT ); Tue, 1 Nov 2016 11:50:13 -0400 Subject: Re: [PATCH 2/2] kbuild: modversions for exported asm symbols References: <20161015124352.10795-1-npiggin@gmail.com> <7315031.MmlhY1rulM@wuerfel> <20161020145827.453025a6@roar.ozlabs.ibm.com> <16513464.3RM484EDf1@wuerfel> <20161031221445.34e50e69@roar.ozlabs.ibm.com> <20161102013633.5b437f36@roar.ozlabs.ibm.com> From: Michal Marek Message-ID: <3e91060f-33bb-2f1d-1e39-7c178913a0cc@suse.com> Date: Tue, 1 Nov 2016 16:50:10 +0100 MIME-Version: 1.0 In-Reply-To: <20161102013633.5b437f36@roar.ozlabs.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Nicholas Piggin Cc: Arnd Bergmann , linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, Al Viro Message-ID: <20161101155010._kP-s5YZngcfjqTnAtHf-5_ZyJcWOIZ0ABhNELlUOBk@z> On 2016-11-01 15:36, Nicholas Piggin wrote: > On Tue, 1 Nov 2016 15:19:59 +0100 > Michal Marek wrote: > >> On 2016-10-31 12:14, Nicholas Piggin wrote: >>> +# This is convoluted. The .S file must first be preprocessed to run guards and >>> +# expand names, then the resulting exports must be constructed into plain >>> +# EXPORT_SYMBOL(symbol); to build our dummy C file, and that gets preprocessed >>> +# to make the genksyms input. >>> # >>> # These mirror gensymtypes_c and co above, keep them in synch. >>> cmd_gensymtypes_S = \ >>> (echo "\#include " ; \ >>> echo "\#include " ; \ >>> - grep EXPORT_SYMBOL $< | sed 's/$$/;/' ) | \ >>> + $(CPP) $(a_flags) $< | \ >>> + grep ^___EXPORT_SYMBOL | \ >>> + sed 's/___EXPORT_SYMBOL \([a-zA-Z0-9_]*\),.*/EXPORT_SYMBOL(\1);/' ) | \ >> >> Is this sed pass necessary? Just add -D__GENKSYMS__ also to the first >> cpp run and EXPORT_SYMBOL will stay intact. > > I can't see how it would work if asm-generic/export.h doesn't have any > tests for GENKSYMS. > >> Anyway, I'm going to merge your patch 2/2 now. > > Okay. We should come to some resolution of the preprocessing issue too. > I'm logging off for tonight, but if you want to tweak or redo the > incremental patch, feel free. I applied the folded patch as is. The preprocessing is not pretty, but the 4.9 regression is more important to be fixed. Thanks, Michal