Re: mmotm 2019-05-29-20-52 uploaded (mpls) +linux-next

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 5, 2019 at 12:29 AM Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
>
> On 5/30/19 3:28 PM, Randy Dunlap wrote:
> > On 5/29/19 8:53 PM, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> >> The mm-of-the-moment snapshot 2019-05-29-20-52 has been uploaded to
> >>
> >>    http://www.ozlabs.org/~akpm/mmotm/
> >>
> >> mmotm-readme.txt says
> >>
> >> README for mm-of-the-moment:
> >>
> >> http://www.ozlabs.org/~akpm/mmotm/
> >>
> >> This is a snapshot of my -mm patch queue.  Uploaded at random hopefully
> >> more than once a week.
> >>
> >> You will need quilt to apply these patches to the latest Linus release (5.x
> >> or 5.x-rcY).  The series file is in broken-out.tar.gz and is duplicated in
> >> http://ozlabs.org/~akpm/mmotm/series
> >>
> >> The file broken-out.tar.gz contains two datestamp files: .DATE and
> >> .DATE-yyyy-mm-dd-hh-mm-ss.  Both contain the string yyyy-mm-dd-hh-mm-ss,
> >> followed by the base kernel version against which this patch series is to
> >> be applied.
> >>
> >
> > on i386 or x86_64:
> >
> > when CONFIG_PROC_SYSCTL is not set/enabled:
> >
> > ld: net/mpls/af_mpls.o: in function `mpls_platform_labels':
> > af_mpls.c:(.text+0x162a): undefined reference to `sysctl_vals'
> > ld: net/mpls/af_mpls.o:(.rodata+0x830): undefined reference to `sysctl_vals'
> > ld: net/mpls/af_mpls.o:(.rodata+0x838): undefined reference to `sysctl_vals'
> > ld: net/mpls/af_mpls.o:(.rodata+0x870): undefined reference to `sysctl_vals'
> >
>
> Hi,
> This now happens in linux-next 20190604.
>
>
> --
> ~Randy

Hi,
I've just sent a patch to fix it.

It seems that there is a lot of sysctl related code is built
regardless of the CONFIG_SYSCTL value, but produces a build error only
with my patch because I add a reference to sysctl_vals which is in
kernel/sysctl.c.

And it seems also that the compiler is unable to optimize out the
unused code, which gets somehow in the final binary:

$ grep PROC_SYSCTL .config
# CONFIG_PROC_SYSCTL is not set
$ readelf vmlinux -x .rodata |grep -A 2 platform_lab
  0xffffffff81b09180 2e630070 6c617466 6f726d5f 6c616265 .c.platform_labe
  0xffffffff81b09190 6c730069 705f7474 6c5f7072 6f706167 ls.ip_ttl_propag
  0xffffffff81b091a0 61746500 64656661 756c745f 74746c00 ate.default_ttl.

If the purpose of disabling sysctl is to save space, probably this
code and definitions should all go under an #ifdef

Regards,
-- 
Matteo Croce
per aspera ad upstream



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux