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: <ZubY3NtRJWWTS1ON@google.com>
Date: Sun, 15 Sep 2024 12:53:48 +0000
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Javier Martinez Canillas <javierm@...hat.com>
Cc: linux-kernel@...r.kernel.org, Julius Werner <jwerner@...omium.org>,
	Hugues Bruant <hugues.bruant@...il.com>,
	intel-gfx@...ts.freedesktop.org,
	Brian Norris <briannorris@...omium.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	dri-devel@...ts.freedesktop.org, Borislav Petkov <bp@...en8.de>,
	chrome-platform@...ts.linux.dev
Subject: Re: [PATCH v3] firmware: coreboot: Don't register a pdev if
 screen_info data is present

On Fri, Sep 13, 2024 at 11:32:29PM +0200, Javier Martinez Canillas wrote:
> @@ -27,8 +28,10 @@ static int framebuffer_probe(struct coreboot_device *dev)
>  	int i;
>  	u32 length;
>  	struct lb_framebuffer *fb = &dev->framebuffer;
> +	const struct screen_info *si = &screen_info;
>  	struct platform_device *pdev;
>  	struct resource res;
> +	unsigned int type;
>  	struct simplefb_platform_data pdata = {
>  		.width = fb->x_resolution,
>  		.height = fb->y_resolution,
> @@ -36,6 +39,20 @@ static int framebuffer_probe(struct coreboot_device *dev)
>  		.format = NULL,
>  	};
>  
> +	/*
> +	 * On coreboot systems, the advertised LB_TAG_FRAMEBUFFER entry
> +	 * in the coreboot table should only be used if the payload did
> +	 * not pass a framebuffer information to the Linux kernel.
> +	 *
> +	 * If the global screen_info data has been filled, the Generic
> +	 * System Framebuffers (sysfb) will already register a platform
> +	 * device and pass that screen_info as platform_data to a driver
> +	 * that can scan-out using the system provided framebuffer.
> +	 */
> +	type = screen_info_video_type(si);
> +	if (type)
> +		return -ENODEV;

Given that `type` and `si` aren't used in otherwhere, the local variables can
be dropped.

I haven't had chance to see how to fix the 0-day build errors properly.  If you
have chance to send the next versions, please drop the local variables.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ