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]
Date:   Tue, 8 Aug 2023 09:09:23 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     linux@...blig.org, mpe@...erman.id.au, npiggin@...il.com,
        christophe.leroy@...roup.eu, sam@...nborg.org,
        benh@...nel.crashing.org
Cc:     linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] powerpc: Use shared font data

Hi--

On 8/6/23 18:07, linux@...blig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@...blig.org>
> 
> PowerPC has a 'btext' font used for the console which is almost identical
> to the shared font_sun8x16, so use it rather than duplicating the data.
> 
> They were actually identical until about a decade ago when
>    commit bcfbeecea11c ("drivers: console: font_: Change a glyph from
>                         "broken bar" to "vertical line"")
> 
> which changed the | in the shared font to be a solid
> bar rather than a broken bar.  That's the only difference.
> 
> This was originally spotted by PMD which noticed that sparc does
> the same thing with the same data, and they also share a bunch
> of functions to manipulate the data.  I've previously posted a near
> identical patch for sparc.
> 
> One difference I notice in PowerPC is that there are a bunch of compile
> options for the .c files for the early code to avoid a bunch of security
> compilation features;  it's not clear to me if this is a problem for
> this font data.
> 
> Tested very lightly with a boot without FS in qemu.
> 
> v2
>   Added 'select FONT_SUPPORT' (to stop modconfig causing the font to be
>    linked into a module rather than the main kernel)
>   Added 'select FONTS' to satisfy requirements in lib/fonts
> 
> Signed-off-by: Dr. David Alan Gilbert <linux@...blig.org>
> ---
>  arch/powerpc/Kconfig.debug  |   3 +
>  arch/powerpc/kernel/btext.c | 360 +-----------------------------------
>  2 files changed, 9 insertions(+), 354 deletions(-)
> 
> diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
> index 2a54fadbeaf51..521c4baf30e88 100644
> --- a/arch/powerpc/Kconfig.debug
> +++ b/arch/powerpc/Kconfig.debug
> @@ -147,6 +147,9 @@ config BDI_SWITCH
>  config BOOTX_TEXT
>  	bool "Support for early boot text console (BootX or OpenFirmware only)"
>  	depends on PPC_BOOK3S
> +	select FONT_SUN8x16
> +	select FONT_SUPPORT
> +	select FONTS
>  	help
>  	  Say Y here to see progress messages from the boot firmware in text
>  	  mode. Requires either BootX or Open Firmware.

kconfig tells me:

WARNING: unmet direct dependencies detected for FONTS
  Depends on [n]: FONT_SUPPORT [=y] && (FRAMEBUFFER_CONSOLE [=n] || STI_CONSOLE [=n])
  Selected by [y]:
  - BOOTX_TEXT [=y] && PPC_BOOK3S [=y]

WARNING: unmet direct dependencies detected for FONT_SUN8x16
  Depends on [n]: FONT_SUPPORT [=y] && FRAMEBUFFER_CONSOLE [=n] && (!SPARC && FONTS [=y] || SPARC)
  Selected by [y]:
  - BOOTX_TEXT [=y] && PPC_BOOK3S [=y]

because FONTS depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE and neither of those is set.


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ