diff mbox series

linux-next: manual merge of the net-next tree with the kbuild tree

Message ID 20190816124143.2640218a@canb.auug.org.au
State Not Applicable
Delegated to: David Miller
Headers show
Series linux-next: manual merge of the net-next tree with the kbuild tree | expand

Commit Message

Stephen Rothwell Aug. 16, 2019, 2:41 a.m. UTC
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  scripts/link-vmlinux.sh

between commit:

  e167191e4a8a ("kbuild: Parameterize kallsyms generation and correct reporting")

from the kbuild tree and commits:

  341dfcf8d78e ("btf: expose BTF info through sysfs")
  7fd785685e22 ("btf: rename /sys/kernel/btf/kernel into /sys/kernel/btf/vmlinux")

from the net-next tree.

I fixed it up (I think - see below) and can carry the fix as necessary.
This is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

Comments

Andrii Nakryiko Aug. 16, 2019, 5:21 a.m. UTC | #1
On Thu, Aug 15, 2019 at 7:42 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> Today's linux-next merge of the net-next tree got a conflict in:
>
>   scripts/link-vmlinux.sh
>
> between commit:
>
>   e167191e4a8a ("kbuild: Parameterize kallsyms generation and correct reporting")
>
> from the kbuild tree and commits:
>
>   341dfcf8d78e ("btf: expose BTF info through sysfs")
>   7fd785685e22 ("btf: rename /sys/kernel/btf/kernel into /sys/kernel/btf/vmlinux")
>
> from the net-next tree.
>
> I fixed it up (I think - see below) and can carry the fix as necessary.

Thanks, Stephen! Looks good except one minor issue below.

> This is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc scripts/link-vmlinux.sh
> index 2438a9faf3f1,c31193340108..000000000000
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@@ -56,11 -56,10 +56,11 @@@ modpost_link(
>   }
>
>   # Link of vmlinux
> - # ${1} - optional extra .o files
> - # ${2} - output file
> + # ${1} - output file
> + # ${@:2} - optional extra .o files
>   vmlinux_link()
>   {
>  +      info LD ${2}

This needs to be ${1}.

>         local lds="${objtree}/${KBUILD_LDS}"
>         local objects
>
> @@@ -139,18 -149,6 +150,18 @@@ kallsyms(
>         ${CC} ${aflags} -c -o ${2} ${afile}
>   }
>
>  +# Perform one step in kallsyms generation, including temporary linking of
>  +# vmlinux.
>  +kallsyms_step()
>  +{
>  +      kallsymso_prev=${kallsymso}
>  +      kallsymso=.tmp_kallsyms${1}.o
>  +      kallsyms_vmlinux=.tmp_vmlinux${1}
>  +
> -       vmlinux_link "${kallsymso_prev}" ${kallsyms_vmlinux}
> ++      vmlinux_link ${kallsyms_vmlinux} "${kallsymso_prev}" ${btf_vmlinux_bin_o}
>  +      kallsyms ${kallsyms_vmlinux} ${kallsymso}
>  +}
>  +
>   # Create map file with all symbols from ${1}
>   # See mksymap for additional details
>   mksysmap()
> @@@ -228,8 -227,14 +240,15 @@@ ${MAKE} -f "${srctree}/scripts/Makefile
>   info MODINFO modules.builtin.modinfo
>   ${OBJCOPY} -j .modinfo -O binary vmlinux.o modules.builtin.modinfo
>
> + btf_vmlinux_bin_o=""
> + if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
> +       if gen_btf .tmp_vmlinux.btf .btf.vmlinux.bin.o ; then
> +               btf_vmlinux_bin_o=.btf.vmlinux.bin.o
> +       fi
> + fi
> +
>   kallsymso=""
>  +kallsymso_prev=""
>   kallsyms_vmlinux=""
>   if [ -n "${CONFIG_KALLSYMS}" ]; then
>
> @@@ -268,11 -285,8 +287,7 @@@
>         fi
>   fi
>
> - vmlinux_link "${kallsymso}" vmlinux
> -
> - if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
> -       gen_btf vmlinux
> - fi
>  -info LD vmlinux
> + vmlinux_link vmlinux "${kallsymso}" "${btf_vmlinux_bin_o}"
>
>   if [ -n "${CONFIG_BUILDTIME_EXTABLE_SORT}" ]; then
>         info SORTEX vmlinux
Stephen Rothwell Aug. 16, 2019, 6:01 a.m. UTC | #2
Hi Andrii,

On Thu, 15 Aug 2019 22:21:29 -0700 Andrii Nakryiko <andrii.nakryiko@gmail.com> wrote:
>
> Thanks, Stephen! Looks good except one minor issue below.

Thanks for checking.

> >   vmlinux_link()
> >   {
> >  +      info LD ${2}  
> 
> This needs to be ${1}.

At least its only an information message and doesn't affect the build.
I will fix my resolution for Monday.
Stephen Rothwell Aug. 16, 2019, 12:39 p.m. UTC | #3
Hi all,

On Fri, 16 Aug 2019 16:01:28 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 15 Aug 2019 22:21:29 -0700 Andrii Nakryiko <andrii.nakryiko@gmail.com> wrote:
> >
> > Thanks, Stephen! Looks good except one minor issue below.  
> 
> Thanks for checking.
> 
> > >   vmlinux_link()
> > >   {
> > >  +      info LD ${2}    
> > 
> > This needs to be ${1}.  
> 
> At least its only an information message and doesn't affect the build.
> I will fix my resolution for Monday.

I also fixed it up in today's linux-next (just so people aren't
suprised and report it :-)).
Kees Cook Aug. 16, 2019, 6:03 p.m. UTC | #4
On Thu, Aug 15, 2019 at 10:21:29PM -0700, Andrii Nakryiko wrote:
> On Thu, Aug 15, 2019 at 7:42 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> >
> > Today's linux-next merge of the net-next tree got a conflict in:
> >
> >   scripts/link-vmlinux.sh
> >
> > between commit:
> >
> >   e167191e4a8a ("kbuild: Parameterize kallsyms generation and correct reporting")
> >
> > from the kbuild tree and commits:
> >
> >   341dfcf8d78e ("btf: expose BTF info through sysfs")
> >   7fd785685e22 ("btf: rename /sys/kernel/btf/kernel into /sys/kernel/btf/vmlinux")
> >
> > from the net-next tree.
> >
> > I fixed it up (I think - see below) and can carry the fix as necessary.
> 
> Thanks, Stephen! Looks good except one minor issue below.
> 
> > This is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging.  You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> >
> > --
> > Cheers,
> > Stephen Rothwell
> >
> > diff --cc scripts/link-vmlinux.sh
> > index 2438a9faf3f1,c31193340108..000000000000
> > --- a/scripts/link-vmlinux.sh
> > +++ b/scripts/link-vmlinux.sh
> > @@@ -56,11 -56,10 +56,11 @@@ modpost_link(
> >   }
> >
> >   # Link of vmlinux
> > - # ${1} - optional extra .o files
> > - # ${2} - output file
> > + # ${1} - output file
> > + # ${@:2} - optional extra .o files
> >   vmlinux_link()
> >   {
> >  +      info LD ${2}
> 
> This needs to be ${1}.
> 
> >         local lds="${objtree}/${KBUILD_LDS}"
> >         local objects
> >
> > @@@ -139,18 -149,6 +150,18 @@@ kallsyms(
> >         ${CC} ${aflags} -c -o ${2} ${afile}
> >   }
> >
> >  +# Perform one step in kallsyms generation, including temporary linking of
> >  +# vmlinux.
> >  +kallsyms_step()
> >  +{
> >  +      kallsymso_prev=${kallsymso}
> >  +      kallsymso=.tmp_kallsyms${1}.o
> >  +      kallsyms_vmlinux=.tmp_vmlinux${1}
> >  +
> > -       vmlinux_link "${kallsymso_prev}" ${kallsyms_vmlinux}
> > ++      vmlinux_link ${kallsyms_vmlinux} "${kallsymso_prev}" ${btf_vmlinux_bin_o}

Good cleanup on the "optional .o files" reordering! With your ordering
change, I think the ""s around ${kallsymso_prev} here are no longer needed
(which makes it read a bit more nicely).

> >  +      kallsyms ${kallsyms_vmlinux} ${kallsymso}
> >  +}
> >  +
> >   # Create map file with all symbols from ${1}
> >   # See mksymap for additional details
> >   mksysmap()
> > @@@ -228,8 -227,14 +240,15 @@@ ${MAKE} -f "${srctree}/scripts/Makefile
> >   info MODINFO modules.builtin.modinfo
> >   ${OBJCOPY} -j .modinfo -O binary vmlinux.o modules.builtin.modinfo
> >
> > + btf_vmlinux_bin_o=""
> > + if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
> > +       if gen_btf .tmp_vmlinux.btf .btf.vmlinux.bin.o ; then
> > +               btf_vmlinux_bin_o=.btf.vmlinux.bin.o
> > +       fi
> > + fi
> > +
> >   kallsymso=""
> >  +kallsymso_prev=""
> >   kallsyms_vmlinux=""
> >   if [ -n "${CONFIG_KALLSYMS}" ]; then
> >
> > @@@ -268,11 -285,8 +287,7 @@@
> >         fi
> >   fi
> >
> > - vmlinux_link "${kallsymso}" vmlinux
> > -
> > - if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
> > -       gen_btf vmlinux
> > - fi
> >  -info LD vmlinux
> > + vmlinux_link vmlinux "${kallsymso}" "${btf_vmlinux_bin_o}"

And, I think, also not here for either trailing argument.

> >
> >   if [ -n "${CONFIG_BUILDTIME_EXTABLE_SORT}" ]; then
> >         info SORTEX vmlinux

-Kees
diff mbox series

Patch

diff --cc scripts/link-vmlinux.sh
index 2438a9faf3f1,c31193340108..000000000000
--- a/scripts/link-vmlinux.sh