[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVGtvgcQuTR9bfMh1cM86TYXSByxJzW5eJtF9A0ZLRF3w@mail.gmail.com>
Date: Thu, 20 Apr 2023 14:25:15 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Thomas Zimmermann <tzimmermann@...e.de>
Cc: Sui Jingfeng <15330273260@....cn>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>, Li Yi <liyi@...ngson.cn>,
Helge Deller <deller@....de>,
Lucas De Marchi <lucas.demarchi@...el.com>,
loongson-kernel@...ts.loongnix.cn, linux-fbdev@...r.kernel.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v5] drm/fbdev-generic: prohibit potential out-of-bounds access
Hi Thomas,
On Thu, Apr 20, 2023 at 1:10 PM Thomas Zimmermann <tzimmermann@...e.de> wrote:
> Am 20.04.23 um 12:04 schrieb Sui Jingfeng:
> > What will happen if the 'screen_size' is not page_size aligned and mmap
> > will mapping in the granularity of pages ?
>
> You need to map at page granularity. If screen_size is not page-size
> aligned, there's this trailing buffer that is accessible, but cannot be
> displayed. But userspace has no direct way of knowing that, so let's
> ignore that problem for now.
Userspace can know, if fb_fix_screeninfo.smem_{start,len} match
the actual offset and size.
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
Powered by blists - more mailing lists