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: <20131104103739.GD21688@console-pimps.org>
Date:	Mon, 4 Nov 2013 10:37:39 +0000
From:	Matt Fleming <matt@...sole-pimps.org>
To:	Dave Young <dyoung@...hat.com>
Cc:	matt.fleming@...el.com, tglx@...utronix.de, mingo@...hat.com,
	hpa@...or.com, x86@...nel.org, linux-efi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] efi earlyprintk fix

On Sun, 03 Nov, at 08:16:47PM, Dave Young wrote:
> 
> there's below one line shift problem:
> 
>                      ACPI=0xdabfe000  ACPI 2.0=0xdabfe014  SMBIOS=0xdaa9e000
> [    0.000000] efi:  
> 
> In fact check efi_y and the lfb_height should be compared at the begin of the
> loop of early_efi_write
 
Hmm... this is interesting. I can't produce this on any of my machines.
Where did you see this? What hardware?

> Signed-off-by: Dave Young <dyoung@...hat.com>
> ---
>  arch/x86/platform/efi/early_printk.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- linux-2.6.orig/arch/x86/platform/efi/early_printk.c
> +++ linux-2.6/arch/x86/platform/efi/early_printk.c
> @@ -106,6 +106,15 @@ early_efi_write(struct console *con, con
>  		if (count > linemax)
>  			count = linemax;
>  
> +		if (efi_y + font->height >= si->lfb_height) {
> +			u32 i;
> +
> +			efi_y -= font->height;
> +			early_efi_scroll_up();
> +
> +			for (i = 0; i < font->height; i++)
> +				early_efi_clear_scanline(efi_y + i);
> +		}
>  		for (h = 0; h < font->height; h++) {
>  			unsigned int n, x;
>  
> @@ -142,15 +151,6 @@ early_efi_write(struct console *con, con
>  			efi_y += font->height;
>  		}
>  
> -		if (efi_y + font->height >= si->lfb_height) {
> -			u32 i;
> -
> -			efi_y -= font->height;
> -			early_efi_scroll_up();
> -
> -			for (i = 0; i < font->height; i++)
> -				early_efi_clear_scanline(efi_y + i);
> -		}
>  	}
>  }

Notice how we figure out the initial value of efi_y...

static __init int early_efi_setup(struct console *con, char *options)
{
	struct screen_info *si;
	u16 xres, yres;
	u32 i;

	si = &boot_params.screen_info;
	xres = si->lfb_width;
	yres = si->lfb_height;

	....

	efi_y = rounddown(yres, font->height) - font->height;

Every time we enter early_efi_write(), we should have enough space to
write one line, so I'm not at all sure what's going wrong with your
display.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ