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: <20110106154120.b69118c9.akpm@linux-foundation.org>
Date:	Thu, 6 Jan 2011 15:41:20 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Rob Landley <rlandley@...allels.com>
Cc:	<trivial@...nel.org>, <linux-kernel@...r.kernel.org>,
	<linux-embedded@...r.kernel.org>
Subject: Re: [PATCH] Move an assert under DEBUG_KERNEL.

On Thu, 6 Jan 2011 02:13:38 -0600
Rob Landley <rlandley@...allels.com> wrote:

> From: Rob Landley <rlandley@...allels.com>
> 
> Move an assert under DEBUG_KERNEL.
> 
> Signed-off-by: Rob Landley <rlandley@...allels.com>
> ---
> 
> Saves about 3k from x86-64 defconfig according to scripts/bloat-o-meter.
> 
>   include/linux/rtnetlink.h |    4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
> index bbad657..28c4025 100644
> --- a/include/linux/rtnetlink.h
> +++ b/include/linux/rtnetlink.h
> @@ -782,6 +782,7 @@ extern struct netdev_queue 
> *dev_ingress_queue_create(struct net_device *dev);
>   extern void rtnetlink_init(void);
>   extern void __rtnl_unlock(void);
> 
> +#ifdef CONFIG_DEBUG_KERNEL
>   #define ASSERT_RTNL() do { \
>   	if (unlikely(!rtnl_is_locked())) { \
>   		printk(KERN_ERR "RTNL: assertion failed at %s (%d)\n", \
> @@ -789,6 +790,9 @@ extern void __rtnl_unlock(void);
>   		dump_stack(); \
>   	} \
>   } while(0)
> +#else
> +#define ASSERT_RTNL()
> +#endif
> 
>   static inline u32 rtm_get_table(struct rtattr **rta, u8 table)
>   {

Probably a worthwhile thing to do, IMO.  If there's some net-specific
CONFIG_DEBUG_ setting then that wold be a better thing to use.

However the patch was a) wordwrapped, b) space-stuffed and c) not cc'ed
to the networking list.  So its prospects are dim.
--
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