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: <d5f8d6b58a32cdbf6326ccef7d46a58ba753edc7.camel@perches.com>
Date:   Sat, 30 Jul 2022 10:18:10 -0700
From:   Joe Perches <joe@...ches.com>
To:     Alexander A Sverdlin <alexander.sverdlin@...ia.com>,
        linux-mips@...r.kernel.org
Cc:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Corey Minyard <cminyard@...sta.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] Revert "MIPS: octeon: Remove vestiges of
 CONFIG_CAVIUM_RESERVE32"

On Mon, 2022-07-25 at 11:17 +0200, Alexander A Sverdlin wrote:
> From: Alexander Sverdlin <alexander.sverdlin@...ia.com>
> 
> This reverts commit e98b461bb057aaea6fa766260788c08825213837.
> 
> We actually have been using the CONFIG_CAVIUM_RESERVE32 and previous patch
> defined it in the corresponding Kconfig.

Perhaps all of the uses of

#if defined(CONFIG_CAVIUM_RESERVE32)

should be

#if defined(CONFIG_CAVIUM_RESERVE32) && CONFIG_CAVIUM_RESERVE32

> diff --git a/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c b/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c
[]
> @@ -57,14 +57,27 @@ EXPORT_SYMBOL_GPL(__cvmx_cmd_queue_state_ptr);
>  static cvmx_cmd_queue_result_t __cvmx_cmd_queue_init_state_ptr(void)
>  {
>  	char *alloc_name = "cvmx_cmd_queues";
> +#if defined(CONFIG_CAVIUM_RESERVE32) && CONFIG_CAVIUM_RESERVE32
> +	extern uint64_t octeon_reserve32_memory;
> +#endif

Like these

> +#if defined(CONFIG_CAVIUM_RESERVE32) && CONFIG_CAVIUM_RESERVE32
> +	if (octeon_reserve32_memory)
> +		__cvmx_cmd_queue_state_ptr =
> +		    cvmx_bootmem_alloc_named_range(sizeof(*__cvmx_cmd_queue_state_ptr),
> +						   octeon_reserve32_memory,
> +						   octeon_reserve32_memory +
> +						   (CONFIG_CAVIUM_RESERVE32 <<
> +						    20) - 1, 128, alloc_name);
> +	else
> +#endif
> +		__cvmx_cmd_queue_state_ptr =
> +		    cvmx_bootmem_alloc_named(sizeof(*__cvmx_cmd_queue_state_ptr),
> +					    128,
> +					    alloc_name);

[]

> diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
[]
> @@ -284,6 +284,11 @@ void octeon_crash_smp_send_stop(void)
[]
> +#ifdef CONFIG_CAVIUM_RESERVE32

here.

> +uint64_t octeon_reserve32_memory;
> +EXPORT_SYMBOL(octeon_reserve32_memory);
> +#endif

[]

> @@ -661,7 +666,9 @@ void __init prom_init(void)
>  	int i;
>  	u64 t;
>  	int argc;
> -
> +#ifdef CONFIG_CAVIUM_RESERVE32
> +	int64_t addr = -1;

here

> +#endif
>  	/*
>  	 * The bootloader passes a pointer to the boot descriptor in
>  	 * $a3, this is available as fw_arg3.
> @@ -776,6 +783,25 @@ void __init prom_init(void)
>  		cvmx_write_csr(CVMX_LED_UDD_DATX(1), 0);
>  		cvmx_write_csr(CVMX_LED_EN, 1);
>  	}
> +#ifdef CONFIG_CAVIUM_RESERVE32

etc...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ