linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Kees Cook <keescook@chromium.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vbox: fix link error with 'gcc -Og'
Date: Fri, 2 Nov 2018 20:43:04 +0100	[thread overview]
Message-ID: <143892a9-1382-4f49-95e2-4da3316dfe9f@redhat.com> (raw)
In-Reply-To: <20181102153905.1732199-1-arnd@arndb.de>

Hi,

On 11/2/18 4:38 PM, Arnd Bergmann wrote:
> With the new CONFIG_CC_OPTIMIZE_FOR_DEBUGGING option, we get a link
> error in the vboxguest driver, when that fails to optimize out the
> call to the compat handler:
> 
> drivers/virt/vboxguest/vboxguest_core.o: In function `vbg_ioctl_hgcm_call':
> vboxguest_core.c:(.text+0x1f6e): undefined reference to `vbg_hgcm_call32'
> 
> Another compile-time check documents better what we want and avoids
> the error.
> 
> Acked-by: Randy Dunlap<rdunlap@infradead.org>
> Tested-by: Randy Dunlap<rdunlap@infradead.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thank you, looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>   drivers/virt/vboxguest/vboxguest_core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c
> index 3093655c7b92..1475ed5ffcde 100644
> --- a/drivers/virt/vboxguest/vboxguest_core.c
> +++ b/drivers/virt/vboxguest/vboxguest_core.c
> @@ -1312,7 +1312,7 @@ static int vbg_ioctl_hgcm_call(struct vbg_dev *gdev,
>   		return -EINVAL;
>   	}
>   
> -	if (f32bit)
> +	if (IS_ENABLED(CONFIG_COMPAT) && f32bit)
>   		ret = vbg_hgcm_call32(gdev, client_id,
>   				      call->function, call->timeout_ms,
>   				      VBG_IOCTL_HGCM_CALL_PARMS32(call),
> 

      reply	other threads:[~2018-11-02 19:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 15:38 [PATCH] vbox: fix link error with 'gcc -Og' Arnd Bergmann
2018-11-02 19:43 ` Hans de Goede [this message]

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=143892a9-1382-4f49-95e2-4da3316dfe9f@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).