Re: [PATCH] fbmem: don't allow too huge resolutions

2021-08-31 Thread Daniel Vetter
On Tue, Aug 31, 2021 at 8:56 PM Geert Uytterhoeven wrote: > > Hi Daniel, > > On Tue, Aug 31, 2021 at 8:53 PM Daniel Vetter wrote: > > On Tue, Aug 31, 2021 at 7:19 PM Geert Uytterhoeven > > wrote: > > > On Tue, Aug 31, 2021 at 5:24 PM Tetsuo Handa > > > wrote: > > > > On 2021/08/31 15:48,

Re: [PATCH] fbmem: don't allow too huge resolutions

2021-08-31 Thread Geert Uytterhoeven
Hi Daniel, On Tue, Aug 31, 2021 at 8:53 PM Daniel Vetter wrote: > On Tue, Aug 31, 2021 at 7:19 PM Geert Uytterhoeven > wrote: > > On Tue, Aug 31, 2021 at 5:24 PM Tetsuo Handa > > wrote: > > > On 2021/08/31 15:48, Geert Uytterhoeven wrote: > > > > Furthermore, this restricts the virtual frame

Re: [PATCH] fbmem: don't allow too huge resolutions

2021-08-31 Thread Daniel Vetter
On Tue, Aug 31, 2021 at 7:19 PM Geert Uytterhoeven wrote: > > Hi Handa-san, > > On Tue, Aug 31, 2021 at 5:24 PM Tetsuo Handa > wrote: > > On 2021/08/31 15:48, Geert Uytterhoeven wrote: > > > Furthermore, this restricts the virtual frame buffer size on 64-bit, > > > too, while graphics cards can

Re: [PATCH] fbmem: don't allow too huge resolutions

2021-08-31 Thread Geert Uytterhoeven
Hi Handa-san, On Tue, Aug 31, 2021 at 5:24 PM Tetsuo Handa wrote: > On 2021/08/31 15:48, Geert Uytterhoeven wrote: > > Furthermore, this restricts the virtual frame buffer size on 64-bit, > > too, while graphics cards can have much more than 4 GiB of RAM. > > Excuse me, but do you mean that some

Re: [PATCH] fbmem: don't allow too huge resolutions

2021-08-31 Thread Daniel Vetter
On Tue, Aug 31, 2021 at 5:24 PM Tetsuo Handa wrote: > On 2021/08/31 15:48, Geert Uytterhoeven wrote: > > Furthermore, this restricts the virtual frame buffer size on 64-bit, > > too, while graphics cards can have much more than 4 GiB of RAM. > > Excuse me, but do you mean that some hardware

Re: [PATCH] fbmem: don't allow too huge resolutions

2021-08-31 Thread Tetsuo Handa
On 2021/08/31 15:48, Geert Uytterhoeven wrote: > Furthermore, this restricts the virtual frame buffer size on 64-bit, > too, while graphics cards can have much more than 4 GiB of RAM. Excuse me, but do you mean that some hardware allows allocating more than UINT_MAX bytes of memory for kernel

Re: [PATCH] fbmem: don't allow too huge resolutions

2021-08-31 Thread Geert Uytterhoeven
Hi Tetsuo, Thanks for your patch! On Mon, Aug 30, 2021 at 6:05 PM Tetsuo Handa wrote: > syzbot is reporting page fault at vga16fb_fillrect() [1], for > vga16fb_check_var() is failing to detect multiplication overflow. > > if (vxres * vyres > maxmem) { > vyres = maxmem / vxres; > if

[PATCH] fbmem: don't allow too huge resolutions

2021-08-30 Thread Tetsuo Handa
syzbot is reporting page fault at vga16fb_fillrect() [1], for vga16fb_check_var() is failing to detect multiplication overflow. if (vxres * vyres > maxmem) { vyres = maxmem / vxres; if (vyres < yres) return -ENOMEM; } Since no module would accept too huge resolutions where