[PATCH] riscv: Fix vdso_install target with CONFIG_COMPAT=y

Guo Ren guoren at kernel.org
Tue Jul 19 03:15:52 PDT 2022


Sorry, I missed your patch. You are the first person to catch that.

+ $(build)=arch/riscv/kernel/compat_vdso compat_$@)

The above is also good for me.

For that one, Could you add "Fixes: 0715372a06ce ("riscv: compat:
vdso: Add COMPAT_VDSO base code ...")" in your next version of the
patch from Ben's and add "Ben Hutchings as Co-developed-by:"?

On Tue, Jul 19, 2022 at 5:50 PM Emil Renner Berthing
<emil.renner.berthing at canonical.com> wrote:
>
> On Mon, 18 Jul 2022 at 01:32, Guo Ren <guoren at kernel.org> wrote:
> >
> > I'm just curious who is using vdso_install, thx. Would you mind put
> > below into the commit log?
> >
> > It broke the Debian package build
> > /usr/bin/make [...] -C debian/build/build_riscv64_none_riscv64
> > vdso_install INSTALL_MOD_PATH='/<<PKGBUILDDIR>>'/debian/linux-image-5.19.0-rc6-riscv64-dbg/usr/lib/debug
> > make[3]: Entering directory
> > '/<<PKGBUILDDIR>>/debian/build/build_riscv64_none_riscv64'
> > [...]
> > make[4]: *** No rule to make target 'vdso_install'.  Stop.
> >
> > Reviewed-by: Guo Ren <guoren at kernel.org>
>
> I don't mind which version goes in, but just for reference there is
> already this patch on the mailing list:
> https://lore.kernel.org/linux-riscv/20220625154207.80972-1-emil.renner.berthing@canonical.com/
>
> /Emil
>
> > On Sun, Jul 17, 2022 at 11:26 PM Ben Hutchings <ben at decadent.org.uk> wrote:
> > >
> > > On Sun, 2022-07-17 at 22:31 +0800, Guo Ren wrote:
> > > > On Thu, Jul 14, 2022 at 7:21 PM Ben Hutchings <ben at decadent.org.uk> wrote:
> > > > >
> > > > > The recipe for vdso_install in arch/riscv/Makefile invokes targets of
> > > > > the same name in arch/riscv/kernel/vdso and .../compat_vdso, but the
> > > > > target in the latter is called compat_vdso_install.  Change the
> > > > > recipe to use the right target name.
> > > > >
> > > > > Fixes: 0715372a06ce ("riscv: compat: vdso: Add COMPAT_VDSO base code ...")
> > > > > Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
> > > > > ---
> > > > >  arch/riscv/Makefile | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> > > > > index 34cf8a598617..ee763562895c 100644
> > > > > --- a/arch/riscv/Makefile
> > > > > +++ b/arch/riscv/Makefile
> > > > > @@ -110,7 +110,7 @@ PHONY += vdso_install
> > > > >  vdso_install:
> > > > >         $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso $@
> > > > >         $(if $(CONFIG_COMPAT),$(Q)$(MAKE) \
> > > > > -               $(build)=arch/riscv/kernel/compat_vdso $@)
> > > > > +               $(build)=arch/riscv/kernel/compat_vdso compat_vdso_install)
> > > > Good catch, but what's the problem you've met?
> > >
> > > It broke the Debian package build
> > > <https://buildd.debian.org/status/fetch.php?pkg=linux&arch=riscv64&ver=5.19%7Erc6-1%7Eexp1&stamp=1657777338&raw=0>:
> > >
> > > [...] /usr/bin/make [...] -C debian/build/build_riscv64_none_riscv64 vdso_install INSTALL_MOD_PATH='/<<PKGBUILDDIR>>'/debian/linux-image-5.19.0-rc6-riscv64-dbg/usr/lib/debug
> > > make[3]: Entering directory '/<<PKGBUILDDIR>>/debian/build/build_riscv64_none_riscv64'
> > > [...]
> > > /usr/bin/make -f /<<PKGBUILDDIR>>/scripts/Makefile.build obj=arch/riscv/kernel/vdso vdso_install
> > > [...]
> > >    gcc-11 -Wp,-MMD,arch/riscv/kernel/vdso/.vgettimeofday.o.d -nostdinc -I/<<PKGBUILDDIR>>/arch/riscv/include -I./arch/riscv/include/generated -I/<<PKGBUILDDIR>>/include -I./include -I/<<PKGBUILDDIR>>/arch/riscv/include/uapi -I./arch/riscv/include/generated/uapi -I/<<PKGBUILDDIR>>/include/uapi -I./include/generated/uapi -include /<<PKGBUILDDIR>>/include/linux/compiler-version.h -include /<<PKGBUILDDIR>>/include/linux/kconfig.h -include /<<PKGBUILDDIR>>/include/linux/compiler_types.h -D__KERNEL__ -DCC_USING_PATCHABLE_FUNCTION_ENTRY -fmacro-prefix-map=/<<PKGBUILDDIR>>/= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu11 -mabi=lp64 -march=rv64imac_zicsr_zifencei -mno-save-restore -DCONFIG_PAGE_OFFSET=0xff60000000000000 -mcmodel=medany -fno-omit-frame-pointer -mstrict-align -fno-delete-null-pointer-checks -Wno-frame-ad
> >  dress -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-stack-clash-protection -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -g -fdebug-prefix-map=/<<PKGBUILDDIR>>/= -fno-stack-protector -fPIC -include /<<PKGBUILDDIR>>/lib/vdso/gettimeofday.c -I /<<PKGBUILDDIR>>/arch/riscv/kernel/vdso -I ./arch/riscv/kernel/vdso    -DKBUILD_MODFILE='"arch/riscv/kernel/vdso/vgettimeofday"' -DKBUILD_BASENAME='"vgettimeofday"' -DKBUILD_MODNAME='"vgettimeofday
> >  "' -D__KBUILD_MODNAME=kmod_vgettimeofday -c -o arch/riscv/kernel/vdso/vgettimeofday.o /<<PKGBUILDDIR>>/arch/riscv/kernel/vdso/vgettimeofday.c
> > > [...]
> > >   /<<PKGBUILDDIR>>/scripts/check-local-export arch/riscv/kernel/vdso/vgettimeofday.o
> > >   if nm arch/riscv/kernel/vdso/vgettimeofday.o 2>/dev/null | grep -q __ksymtab; then  gcc-11 -E -D__GENKSYMS__ -Wp,-MMD,arch/riscv/kernel/vdso/.vgettimeofday.o.d -nostdinc -I/<<PKGBUILDDIR>>/arch/riscv/include -I./arch/riscv/include/generated -I/<<PKGBUILDDIR>>/include -I./include -I/<<PKGBUILDDIR>>/arch/riscv/include/uapi -I./arch/riscv/include/generated/uapi -I/<<PKGBUILDDIR>>/include/uapi -I./include/generated/uapi -include /<<PKGBUILDDIR>>/include/linux/compiler-version.h -include /<<PKGBUILDDIR>>/include/linux/kconfig.h -include /<<PKGBUILDDIR>>/include/linux/compiler_types.h -D__KERNEL__ -DCC_USING_PATCHABLE_FUNCTION_ENTRY -fmacro-prefix-map=/<<PKGBUILDDIR>>/= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu11 -mabi=lp64 -march=rv64imac_zicsr_zifencei -mno-save-restore -DCONFIG_PAGE_OFFSET=0xff60000000000000
> >   -mcmodel=medany -fno-omit-frame-pointer -mstrict-align -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-stack-clash-protection -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -g -fdebug-prefix-map=/<<PKGBUILDDIR>>/= -fno-stack-protector -fPIC -include /<<PKGBUILDDIR>>/lib/vdso/gettimeofday.c -I /<<PKGBUILDDIR>>/arch/riscv/kernel/vdso -I ./arch/riscv/kernel/vdso    -DKBUILD_MODFILE='"arch/r
> >  iscv/kernel/vdso/vgettimeofday"' -DKBUILD_BASENAME='"vgettimeofday"' -DKBUILD_MODNAME='"vgettimeofday"' -D__KBUILD_MODNAME=kmod_vgettimeofday /<<PKGBUILDDIR>>/arch/riscv/kernel/vdso/vgettimeofday.c | scripts/genksyms/genksyms   -r /dev/null >> arch/riscv/kernel/vdso/.vgettimeofday.o.cmd; fi
> > >   ld -melf64lriscv  -shared -S -soname=linux-vdso.so.1 --build-id=sha1 --hash-style=both --eh-frame-hdr -T arch/riscv/kernel/vdso/vdso.lds arch/riscv/kernel/vdso/rt_sigreturn.o arch/riscv/kernel/vdso/vgettimeofday.o arch/riscv/kernel/vdso/getcpu.o arch/riscv/kernel/vdso/flush_icache.o arch/riscv/kernel/vdso/note.o -o arch/riscv/kernel/vdso/vdso.so.dbg.tmp && objcopy  -G __vdso_rt_sigreturn  -G __vdso_vgettimeofday  -G __vdso_getcpu  -G __vdso_flush_icache arch/riscv/kernel/vdso/vdso.so.dbg.tmp arch/riscv/kernel/vdso/vdso.so.dbg && rm arch/riscv/kernel/vdso/vdso.so.dbg.tmp
> > >   cp arch/riscv/kernel/vdso/vdso.so.dbg /<<PKGBUILDDIR>>/debian/linux-image-5.19.0-rc6-riscv64-dbg/usr/lib/debug/lib/modules/5.19.0-rc6-riscv64/vdso/vdso.so
> > >   :
> > > /usr/bin/make -f /<<PKGBUILDDIR>>/scripts/Makefile.build obj=arch/riscv/kernel/compat_vdso vdso_install
> > > [...]
> > > make[4]: *** No rule to make target 'vdso_install'.  Stop.
> > > make[3]: *** [/<<PKGBUILDDIR>>/arch/riscv/Makefile:112: vdso_install] Error 2
> > > make[3]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/build_riscv64_none_riscv64'
> > > make[2]: *** [debian/rules.real:513: install-image-dbg_riscv64_none_riscv64] Error 2
> > > make[2]: *** Waiting for unfinished jobs....
> > >
> > > Ben.
> > >
> > > >
> > > > >
> > > > >  ifeq ($(KBUILD_EXTMOD),)
> > > > >  ifeq ($(CONFIG_MMU),y)
> > > >
> > > >
> > > >
> > >
> > > --
> > > Ben Hutchings
> > > This sentence contradicts itself - no actually it doesn't.
> >
> >
> >
> > --
> > Best Regards
> >  Guo Ren
> >
> > _______________________________________________
> > linux-riscv mailing list
> > linux-riscv at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-riscv



-- 
Best Regards
 Guo Ren



More information about the linux-riscv mailing list