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]
Message-ID: <b8c3c51e-375f-4139-8336-76b6df56e8ea@lkcamp.dev>
Date: Wed, 9 Oct 2024 10:44:38 -0300
From: Vinicius Peixoto <vpeixoto@...amp.dev>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Fabricio Gasperin <fgasperin@...amp.dev>
Cc: Sudip Mukherjee <sudipm.mukherjee@...il.com>,
 Teddy Wang <teddy.wang@...iconmotion.com>, linux-fbdev@...r.kernel.org,
 linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
 ~lkcamp/patches@...ts.sr.ht
Subject: Re: [PATCH] staging: sm750: Fix missing config in Kconfig

Hi Greg,

On 10/9/24 06:56, Greg Kroah-Hartman wrote:
> On Sat, Sep 21, 2024 at 03:06:09PM -0300, Fabricio Gasperin wrote:
>> Fixes the following compilation error:
>>
>> ERROR: modpost: "fb_io_read" [drivers/staging/sm750fb/sm750fb.ko] undefined!
>> ERROR: modpost: "fb_io_write" [drivers/staging/sm750fb/sm750fb.ko] undefined!
>> ERROR: modpost: "fb_io_mmap" [drivers/staging/sm750fb/sm750fb.ko] undefined!
>>
>> Signed-off-by: Fabricio Gasperin <fgasperin@...amp.dev>
>> ---
>>   drivers/staging/sm750fb/Kconfig | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/staging/sm750fb/Kconfig b/drivers/staging/sm750fb/Kconfig
>> index 08bcccdd0f1c..eca1aa43d725 100644
>> --- a/drivers/staging/sm750fb/Kconfig
>> +++ b/drivers/staging/sm750fb/Kconfig
>> @@ -3,6 +3,7 @@ config FB_SM750
>>   	tristate "Silicon Motion SM750 framebuffer support"
>>   	depends on FB && PCI && HAS_IOPORT
>>   	select FB_MODE_HELPERS
>> +	select FB_IOMEM_FOPS
>>   	select FB_CFB_FILLRECT
>>   	select FB_CFB_COPYAREA
>>   	select FB_CFB_IMAGEBLIT
>> -- 
>> 2.46.1
>>
>>
> 
> What is causing this error? What commit created the problem, and why
> has no one reported it yet?

This happens because drivers/staging/sm750fb/sm750.c, defines an fb_ops 
structure:

static const struct fb_ops lynxfb_ops = {
	.owner = THIS_MODULE,
	FB_DEFAULT_IOMEM_OPS,
	...
};

FB_DEFAULT_IOMEM_OPS expands to the fb_io_* helpers declared in 
include/linux/fb.h and defined in drivers/video/fbdev/core/fb_io_fops.c; 
however, the latter is gated by FB_IOMEM_FOPS, so when compiling a 
kernel with CONFIG_STAGING=y + CONFIG_FB=m + CONFIG_FB_SM750=m, you get 
the following error:

ERROR: modpost: "fb_io_read" [drivers/staging/sm750fb/sm750fb.ko] undefined!
ERROR: modpost: "fb_io_write" [drivers/staging/sm750fb/sm750fb.ko] 
undefined!
ERROR: modpost: "fb_io_mmap" [drivers/staging/sm750fb/sm750fb.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:145: Module.symvers] Error 1

So in order to solve it we select FB_IOMEM_FOPS, much like the other 
FB_* drivers do in drivers/video/fbdev/Kconfig.

Not entirely sure why this wasn't caught before, but the commit that 
broke the build for sm750fb is 6b180f66c0dd ("fbdev: Provide I/O-memory 
helpers as module"), which made the fb_io_* helpers be built as a 
separate module instead of being bundled in fb.o (which is what sm750fb 
was relying on). I think Fabricio can add a "Fixes:" tag in v2.

Thanks,
Vinicius

> 
> confused,
> 
> greg k-h


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ