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]
Message-ID: <CABPJ0vgtpjh2q605TifawiS36qAS+OO_dAnYVGsqd03GSXZp+g@mail.gmail.com>
Date: Mon, 27 Oct 2025 19:02:37 +0100
From: Javier Garcia <rampxxxx@...il.com>
To: deller@....de
Cc: linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org, 
	linux-kernel@...r.kernel.org, shuah@...nel.org
Subject: Re: [PATCH] fbdev: vga16fb: Request memory region.

Hi,

Helge Deller, any comment on this patch?

---
Javier Garcia


On Thu, 16 Oct 2025 at 19:18, Javier Garcia <rampxxxx@...il.com> wrote:
>
> This patch reserve and release VGA memory region with `*_mem_region`
> fn's.
>
> This align with Documentation/drm/todo.rst
> "Request memory regions in all fbdev drivers"
>
> I've tested with kernel and qemu both 32bits.
>
> Signed-off-by: Javier Garcia <rampxxxx@...il.com>
> ---
>
> When I've run the code always return -EBUSY which makes sense as
> mem is already requested,`/proc/iomem` shows `000a0000-000bffff : Video RAM area`.
>
> I've seen that `cirrusfb` has this kind of code wrapped up with `#if 0`, and I
> wonder if it makes sense to also wrap up with `#if 0`, at least , in
> that way the code gets commented about expected behavior.
>
>
>  drivers/video/fbdev/vga16fb.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/video/fbdev/vga16fb.c b/drivers/video/fbdev/vga16fb.c
> index eedab14c7d51..f506bf144a97 100644
> --- a/drivers/video/fbdev/vga16fb.c
> +++ b/drivers/video/fbdev/vga16fb.c
> @@ -1319,6 +1319,11 @@ static int vga16fb_probe(struct platform_device *dev)
>         if (ret)
>                 return ret;
>
> +       if (!request_mem_region(vga16fb_fix.smem_start, vga16fb_fix.smem_len,
> +                               "vga16b")) {
> +               dev_err(&dev->dev,"vga16b: cannot reserve video memory at 0x%lx\n",
> +                      vga16fb_fix.smem_start);
> +       }
>         printk(KERN_DEBUG "vga16fb: initializing\n");
>         info = framebuffer_alloc(sizeof(struct vga16fb_par), &dev->dev);
>
> @@ -1398,6 +1403,8 @@ static int vga16fb_probe(struct platform_device *dev)
>   err_ioremap:
>         framebuffer_release(info);
>   err_fb_alloc:
> +       release_mem_region(vga16fb_fix.smem_start,
> +                   vga16fb_fix.smem_len);
>         return ret;
>  }
>
> --
> 2.50.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ