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] [day] [month] [year] [list]
Message-ID: <8760ar7lar.fsf@concordia.ellerman.id.au>
Date:   Fri, 03 Nov 2017 20:39:56 +1100
From:   Michael Ellerman <mpe@...erman.id.au>
To:     Andi Kleen <andi@...stfloor.org>, akpm@...ux-foundation.org
Cc:     linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH] Support resetting WARN*_ONCE

Andi Kleen <andi@...stfloor.org> writes:

> diff --git a/kernel/panic.c b/kernel/panic.c
> index bdd18afa19a4..b2d872fa16de 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -587,6 +588,32 @@ void warn_slowpath_null(const char *file, int line)
>  EXPORT_SYMBOL(warn_slowpath_null);
>  #endif
>  
> +#ifdef CONFIG_BUG
> +
> +/* Support resetting WARN*_ONCE state */
> +
> +static int clear_warn_once_set(void *data, u64 val)
> +{
> +	memset(__start_once, 0, __end_once - __start_once);
> +	return 0;
> +}
> +
> +DEFINE_SIMPLE_ATTRIBUTE(clear_warn_once_fops,
> +			NULL,
> +                        clear_warn_once_set,
> +		        "%lld\n");
> +
> +static __init int register_warn_debugfs(void)
> +{
> +	/* Don't care about failure */
> +	debugfs_create_file("clear_warn_once", 0644, NULL,
                                               ^

Wouldn't 0200 be more appropriate if it's only writable?

Otherwise it appears readable, but cat'ing it gives you an error.

cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ