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, 27 Jun 2017 11:30:47 +0200
From:   Michal Suchánek <msuchanek@...e.de>
To:     Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        Hari Bathini <hbathini@...ux.vnet.ibm.com>,
        Mahesh Salgaonkar <mahesh@...ux.vnet.ibm.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michal Suchanek <msuchanek@...e.de>,
        Colin Ian King <colin.king@...onical.com>,
        linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] powerpc/fadump: return 0 on re-registration

On Mon, 26 Jun 2017 16:06:00 +0200
Michal Suchanek <msuchanek@...e.de> wrote:

> When fadump is already registered return success.
> 
> Currently EEXIST is returned which is difficult to handle race-free in
> userspace when shell scripts are used. If multiple writers are trying
> to write '1' there is no difference in whichever succeeds so just
> return 0 to all.
> 
> Signed-off-by: Michal Suchanek <msuchanek@...e.de>
> ---
>  arch/powerpc/kernel/fadump.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/fadump.c
> b/arch/powerpc/kernel/fadump.c index 436aedf195ab..5a7355381dac 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -1214,7 +1214,6 @@ static ssize_t fadump_register_store(struct
> kobject *kobj, break;
>  	case '1':
>  		if (fw_dump.dump_registered == 1) {
> -			ret = -EEXIST;
>  			goto unlock_out;
>  		}
>  		/* Register Firmware-assisted dump */

Forget about this one.

It breaks another case when fadump is registered and you need to
re-register to account for change in system configuration.

Thanks

Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ