lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 10 May 2019 09:12:52 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     <lgirdwood@...il.com>, <rdunlap@...radead.org>,
        <broonie@...nel.org>, <pierre-louis.bossart@...ux.intel.com>,
        <perex@...ex.cz>, <alsa-devel@...a-project.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: SOF: Fix build error with CONFIG_SND_SOC_SOF_NOCODEC=m

On Fri, 10 May 2019 04:36:57 +0200,
YueHaibing wrote:
> 
> Fix gcc build error while CONFIG_SND_SOC_SOF_NOCODEC=m
> 
> sound/soc/sof/core.o: In function `snd_sof_device_probe':
> core.c:(.text+0x4af): undefined reference to `sof_nocodec_setup'
> 
> Change SND_SOC_SOF_NOCODEC to bool to fix this.
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Fixes: c16211d6226d ("ASoC: SOF: Add Sound Open Firmware driver core")
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>

This change would break things severely.  This won't allow to build it
as a module any longer.

A better fix would be to somehow restrict the SND_SOC_SOF_NOCODEC to
align with SND_SOC_SOF, i.e. disallow SND_SOC_SOF=y &&
SND_SOC_SOF_NOCODEC=m.  Because of the complex mix of select and
depends-on in SOF, I'm afraid that it's not that trivial, though.
There might be something I overlooked, hopefully...

An easier alternative would be to replace
IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC) with
IS_REACHABLE(CONFIG_SND_SOC_SOF_NOCODEC).  This assures the condition
at the build time, although the error at probe might be a surprising
to some users that don't know this hidden dependency.


thanks,

Takashi


> ---
>  sound/soc/sof/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig
> index b204c65..9c280c9 100644
> --- a/sound/soc/sof/Kconfig
> +++ b/sound/soc/sof/Kconfig
> @@ -44,7 +44,7 @@ config SND_SOC_SOF_OPTIONS
>  if SND_SOC_SOF_OPTIONS
>  
>  config SND_SOC_SOF_NOCODEC
> -	tristate "SOF nocodec mode Support"
> +	bool "SOF nocodec mode Support"
>  	help
>  	  This adds support for a dummy/nocodec machine driver fallback
>  	  option if no known codec is detected. This is typically only
> -- 
> 2.7.4
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ