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, 16 Dec 2013 09:50:01 -0800
From:	Joe Perches <joe@...ches.com>
To:	Neil Horman <nhorman@...driver.com>
Cc:	linux-sctp@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"David S. Miller" <davem@...emloft.net>,
	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2 1/2] printk: Add a pr_warn_deprecated macro

(adding Andrew Morton to cc's)

On Mon, 2013-12-16 at 12:06 -0500, Neil Horman wrote:
> sctp has several points in its setsockopt path in which it issues deprecation
> warnings.  It seems like it might be handy to macrotize such a warning so other
> subsystems can use it easily
[]
> diff --git a/include/linux/printk.h b/include/linux/printk.h
[]
> @@ -336,6 +336,9 @@ extern asmlinkage void dump_stack(void) __cold;
>  	printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
>  /* no pr_cont_ratelimited, don't do that... */
>  
> +#define pr_warn_deprecated(fmt, ...)					\
> +	pr_warn_ratelimited("Deprecated: " fmt, ##__VA_ARGS__)

Continuing the thread from:
http://patchwork.ozlabs.org/patch/301738/

Making this a global kernel #define is different than
using it in your subsystem.

I think this is very analogous to the FW_INFO/FW_WARN
uses and maybe should just have a #define for the
string "deprecated:" inserted as a constant.

ie: just using

	pr_warn_once(DEPRECATED fmt, args...)
or
	pr_warn_ratelimited(DEPRECATED fmt, args...)


--
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