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] [day] [month] [year] [list]
Date:	Tue, 6 May 2014 17:02:59 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	David Laight <David.Laight@...lab.com>
Cc:	Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Ben Dooks <ben.dooks@...ethink.co.uk>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH/RFC] usb: gadget: CONFIG_USB_S3C_HSOTG should depend on HAS_DMA

Hi David,

On Tue, May 6, 2014 at 3:17 PM, David Laight <David.Laight@...lab.com> wrote:
>> If NO_DMA=y:
>>
>> drivers/built-in.o: In function `s3c_hsotg_map_dma':
>> s3c-hsotg.c:(.text+0x375b2c): undefined reference to `usb_gadget_map_request'
>> drivers/built-in.o: In function `s3c_hsotg_unmap_dma':
>> s3c-hsotg.c:(.text+0x376a32): undefined reference to `usb_gadget_unmap_request'
>> make[3]: *** [vmlinux] Error 1
>>
>> Note that all callers of s3c_hsotg_map_dma()/s3c_hsotg_unmap_dma() are
>> protected by a call into the using_dma() checking function:
>>
>> static inline bool using_dma(struct s3c_hsotg *hsotg)
>> {
>>         return false;   /* support is not complete */
>> }
>>
>> but not all versions of gcc manage to optimize the check away, causing a
>> link error.
>
> A have seen gcc optimise away a call, but leave the undefined symbol
> in the symbol table.
> That might be what is happening here.

Indeed, the unused functions s3c_hsotg_{,un}map_dma() are still there,
but the calls to them have been optimized away.

Marking s3c_hsotg_{,un}map_dma() inline fixes that. I'll send a new patch
doing that, as it's a bit silly to require "depends on HAS_DMA" for a driver
which has DMA disabled.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ