LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Hans de Goede <hdegoede@redhat.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux-Next Mailing List <linux-next@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: linux-next: Tree for Oct 31 (vboxguest)
Date: Wed, 31 Oct 2018 12:06:58 -0700	[thread overview]
Message-ID: <dab59782-26d4-9b7e-2537-a1d8e578b2d9@infradead.org> (raw)
In-Reply-To: <560c85c8-1ee2-31b0-3148-a08f56a25a2e@redhat.com>

On 10/31/18 9:50 AM, Hans de Goede wrote:
> Hi,
> 
> On 31-10-18 16:51, Randy Dunlap wrote:
>> On 10/30/18 8:59 PM, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Please do not add any v4.21/v5.1 code to your linux-next included trees
>>> until after the merge window closes.
>>>
>>> Changes since 20181030:
>>>
>>
>>
>> on i386:
>>
>> ld: drivers/virt/vboxguest/vboxguest_core.o: in function `vbg_ioctl_hgcm_call':
>> vboxguest_core.c:(.text+0x212b): undefined reference to `vbg_hgcm_call32'
> 
> Are you perhaps using weird compiler options?

Nope, just whatever kbuild gives me.

I could suspect gcc v4.8.5, although I have been using it for quite
awhile now.

> This call should be optimized out on i386 (and we rely on calls being
> removed be dead code elimination to avoid #ifdefs in various places,
> iow this is a normal thing to rely on) :
> 
> First we have:
> 
>     bool f32bit = false;
> 
> ...
> 
>         switch (req_no_size) {
> #ifdef CONFIG_COMPAT
>         case VBG_IOCTL_HGCM_CALL_32(0):
>                 f32bit = true;
>                 /* Fall through */
> #endif
>         case VBG_IOCTL_HGCM_CALL(0):
>                 return vbg_ioctl_hgcm_call(gdev, session, f32bit, data);
>     }
> 
> And then we also have:
> 
> static int vbg_ioctl_hgcm_call(struct vbg_dev *gdev,
>                                struct vbg_session *session, bool f32bit,
>                                struct vbg_ioctl_hgcm_call *call)
> {
>     ...
> 
>         if (f32bit)
>                 ret = vbg_hgcm_call32(gdev, client_id,
>                                       call->function, call->timeout_ms,
>                                       VBG_IOCTL_HGCM_CALL_PARMS32(call),
>                                       call->parm_count, &call->hdr.rc);
>         else
>                 ret = vbg_hgcm_call(gdev, client_id,
>                                     call->function, call->timeout_ms,
>                                     VBG_IOCTL_HGCM_CALL_PARMS(call),
>                                     call->parm_count, &call->hdr.rc);
> }
> 
> So on i386 CONFIG_COMPAT is never set, this f32bit is a 0 const
> and the compiler removes the if branch of the if ... else ...
> 
> This has been upstream like this since 4.16 without any problems sofar.

That's nice.

Here's what building with V=1 tells me for vboxguest_core.c:

  gcc -Wp,-MD,drivers/virt/vboxguest/.vboxguest_core.o.d  -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.8/include -I../arch/x86/include -I./arch/x86/include/generated  -I../include -I./include -I../arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I../include/uapi -I./include/generated/uapi -include ../include/linux/kconfig.h -include ../include/linux/compiler_types.h  -I../drivers/virt/vboxguest -Idrivers/virt/vboxguest -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i586 -Wa,-mtune=generic32 -ffreestanding -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -Wa,arch/x86/kernel/macros.s -Wa,- -fno-delete-null-pointer-checks -Og -Wno-maybe-uninitialized -Wno-maybe-uninitialized --param=allow-store-data-races=0 -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -fno-inline-functions -fno-inline-small-functions -fno-inline-functions-called-once -pg -fno-inline-functions-called-once -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes    -DKBUILD_BASENAME='"vboxguest_core"' -DKBUILD_MODNAME='"vboxguest"' -c -o drivers/virt/vboxguest/.tmp_vboxguest_core.o ../drivers/virt/vboxguest/vboxguest_core.c


thanks.
-- 
~Randy

  reply	other threads:[~2018-10-31 19:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31  3:59 linux-next: Tree for Oct 31 Stephen Rothwell
2018-10-31 15:51 ` linux-next: Tree for Oct 31 (vboxguest) Randy Dunlap
2018-10-31 16:50   ` Hans de Goede
2018-10-31 19:06     ` Randy Dunlap [this message]
2018-10-31 21:41   ` Arnd Bergmann
2018-10-31 21:45     ` Randy Dunlap
2018-11-01  3:32     ` Masahiro Yamada
2018-11-01 14:29       ` Changbin Du
2018-11-02  8:25         ` Masahiro Yamada
2018-11-02 15:54           ` Arnd Bergmann
2018-11-02 23:59             ` Changbin Du
2018-11-04  2:43             ` Masahiro Yamada
2018-11-04 23:38               ` Changbin Du
2018-11-05  3:00                 ` Masahiro Yamada
2018-11-02 23:59           ` Changbin Du

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dab59782-26d4-9b7e-2537-a1d8e578b2d9@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --subject='Re: linux-next: Tree for Oct 31 (vboxguest)' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).