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:	Mon, 29 Jun 2015 09:25:47 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Finn Thain <fthain@...egraphics.com.au>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Linux/m68k" <linux-m68k@...r.kernel.org>,
	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [RFC v3 24/24] m68k: Dispatch nvram_ops calls to Atari or Mac functions

Hi Finn,

> A multi-platform kernel binary needs to decide at run-time how to dispatch
> the arch_nvram_ops calls. Add platform-independent arch_nvram_ops, for use
> when multiple platform-specific NVRAM ops implementations are needed.
>
> Enable CONFIG_HAVE_ARCH_NVRAM_OPS for Macs.

Thanks for your patch!

On Sun, Jun 28, 2015 at 3:42 AM, Finn Thain <fthain@...egraphics.com.au> wrote:
> --- linux.orig/arch/m68k/kernel/setup_mm.c      2015-06-28 11:41:27.000000000 +1000
> +++ linux/arch/m68k/kernel/setup_mm.c   2015-06-28 11:41:56.000000000 +1000

> @@ -568,3 +569,109 @@ static int __init adb_probe_sync_enable
>
>  __setup("adb_sync", adb_probe_sync_enable);
>  #endif /* CONFIG_ADB */
> +
> +#if IS_ENABLED(CONFIG_NVRAM)
> +extern unsigned char mac_pram_read_byte(int);
> +extern void mac_pram_write_byte(unsigned char, int);
> +extern ssize_t mac_pram_get_size(void);
> +
> +extern ssize_t atari_nvram_read(char *, size_t, loff_t *);
> +extern ssize_t atari_nvram_write(char *, size_t, loff_t *);
> +extern long atari_nvram_set_checksum(void);
> +extern long atari_nvram_initialize(void);
> +extern ssize_t atari_nvram_get_size(void);

Forward declarations belong in a header file, to be included by both
producers and consumers.

> --- linux.orig/arch/m68k/Kconfig        2015-06-28 11:41:39.000000000 +1000
> +++ linux/arch/m68k/Kconfig     2015-06-28 11:41:56.000000000 +1000
> @@ -72,7 +72,7 @@ config PGTABLE_LEVELS
>         default 3
>
>  config HAVE_ARCH_NVRAM_OPS
> -       def_bool ATARI
> +       def_bool ATARI || MAC

For maintainability, it's better to just have "bool" here, and let both the
ATARI and MAC config symbols select HAVE_ARCH_NVRAM_OPS.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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