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: <20141105034929.GA19857@gondor.apana.org.au>
Date:	Wed, 5 Nov 2014 11:49:29 +0800
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Cong Wang <xiyou.wangcong@...il.com>
Cc:	stephen@...workplumber.org, netdev@...r.kernel.org
Subject: Re: [PATCH 02/13] net_sched: introduce qdisc_peek() helper function

Cong Wang <xiyou.wangcong@...il.com> wrote:
> On Tue, Nov 4, 2014 at 10:45 AM, Stephen Hemminger
> <stephen@...workplumber.org> wrote:
>> On Tue,  4 Nov 2014 09:56:25 -0800
>> Cong Wang <xiyou.wangcong@...il.com> wrote:
>>
>>> +static inline void qdisc_warn_nonwc(void *func, struct Qdisc *qdisc)
>>> +{
>>> +     if (!(qdisc->flags & TCQ_F_WARN_NONWC)) {
>>> +             pr_warn("%pf: %s qdisc %X: is non-work-conserving?\n",
>>> +                     func, qdisc->ops->id, qdisc->handle >> 16);
>>> +             qdisc->flags |= TCQ_F_WARN_NONWC;
>>> +     }
>>> +}
>>> +
>>
>> Inilining this and creating N copies of same message is not a step forward.
> 
> Hmm, I think gcc merges same string literals when building Linux kernel?
> But I never verify this.

In general you should try to avoid inlining code that's not in
the fast path as that leads to binary code size bloat.  As errors
shouldn't be in the fast path this function should be inlined.

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ