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: <c296dd2f66e97ad38d5456c0fab4e0ff99b14634.camel@perches.com>
Date:   Wed, 11 Aug 2021 06:23:41 -0700
From:   Joe Perches <joe@...ches.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Jonathan Toppins <jtoppins@...hat.com>, netdev@...r.kernel.org,
        leon@...nel.org, Jay Vosburgh <j.vosburgh@...il.com>,
        Veaceslav Falico <vfalico@...il.com>,
        Andy Gospodarek <andy@...yhouse.net>,
        "David S. Miller" <davem@...emloft.net>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 2/2] bonding: combine netlink and console
 error messages

On Wed, 2021-08-11 at 05:49 -0700, Jakub Kicinski wrote:
> On Tue, 10 Aug 2021 20:27:01 -0700 Joe Perches wrote:
> > > +#define BOND_NL_ERR(bond_dev, extack, errmsg) do {		\
> > > +	if (extack)						\
> > > +		NL_SET_ERR_MSG(extack, errmsg);			\
> > > +	else							\
> > > +		netdev_err(bond_dev, "Error: %s\n", errmsg);	\
> > > +} while (0)
> > > +
> > > +#define SLAVE_NL_ERR(bond_dev, slave_dev, extack, errmsg) do {		\
> > > +	if (extack)							\
> > > +		NL_SET_ERR_MSG(extack, errmsg);				\
> > > +	else								\
> > > +		slave_err(bond_dev, slave_dev, "Error: %s\n", errmsg);	\
> > > +} while (0)  
> > 
> > Ideally both of these would be static functions and not macros.
> 
> That may break our ability for NL_SET_ERR_MSG to place strings 
> back in a static buffer, no?

Not really.

The most common way to place things in a particular section is to
use __section("whatever")

It's pretty trivial to mark these errmsg strings as above.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ