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: <87edonr749.fsf@minerva.mail-host-address-is-not-set>
Date:   Thu, 13 Apr 2023 20:04:38 +0200
From:   Javier Martinez Canillas <javierm@...hat.com>
To:     Pierre Asselin <pa@...ix.com>
Cc:     Pierre Asselin <pa@...ix.com>, tzimmermann@...e.de,
        linux-kernel@...r.kernel.org, jfalempe@...hat.com,
        hdegoede@...hat.com, dri-devel@...ts.freedesktop.org,
        daniel.vetter@...ll.ch, ardb@...nel.org
Subject: Re: [PATCH] firmware/sysfb: Fix wrong stride when bits-per-pixel is
 calculated

"Pierre Asselin" <pa@...ix.com> writes:

>> diff --git a/drivers/firmware/sysfb_simplefb.c
>> b/drivers/firmware/sysfb_simplefb.c
>> index 82c64cb9f531..0ab8c542b1f5 100644
>> --- a/drivers/firmware/sysfb_simplefb.c
>> +++ b/drivers/firmware/sysfb_simplefb.c
>> @@ -55,14 +55,10 @@ __init bool sysfb_parse_mode(const struct screen_info
>> *si,
>>  	 * ignore simplefb formats with alpha bits, as EFI and VESA
>>  	 * don't specify alpha channels.
>>  	 */
>> -	if (si->lfb_depth > 8) {
>> -		bits_per_pixel = max(max3(si->red_size + si->red_pos,
>> -					  si->green_size + si->green_pos,
>> -					  si->blue_size + si->blue_pos),
>> -				     si->rsvd_size + si->rsvd_pos);
>> -	} else {
>> +	if (si->lfb_depth > 8)
>> +		bits_per_pixel = si->lfb_linelength * 8 / si->lfb_width;
>> +	else
>>  		bits_per_pixel = si->lfb_depth;
>> -	}
>>
>>  	for (i = 0; i < ARRAY_SIZE(formats); ++i) {
>>  		const struct simplefb_format *f = &formats[i];
>>
>> base-commit: e62252bc55b6d4eddc6c2bdbf95a448180d6a08d
>> --
>> 2.40.0
>
> Patch is good on both boxes.
>

Thanks for testing it! I'll wait for Thomas though before posting as a
proper patch. I'm sure whether we can rely on lfb_linelength or not...

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ