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: <1413215692.1287.11.camel@joe-AO725>
Date:	Mon, 13 Oct 2014 08:54:52 -0700
From:	Joe Perches <joe@...ches.com>
To:	David Herrmann <dh.herrmann@...il.com>
Cc:	Dave Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
	dri-devel <dri-devel@...ts.freedesktop.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm: drm_err: Remove unnecessary __func__ argument

On Mon, 2014-10-13 at 17:46 +0200, David Herrmann wrote:
> Hi
> 
> On Sun, Oct 12, 2014 at 7:08 AM, Joe Perches <joe@...ches.com> wrote:
> > Removing the unnecessary drm_err __func__ argument by using
> > the equivalent %pf and __builtin_return_address(0) makes the
> > code smaller for every use of the DRM_ERROR macro.
> >
> > For instance: (allmodconfig)
> >
> > $ size drivers/gpu/drm/i915/i915.o*
> >    text    data     bss     dec     hex filename
> >  922447  193257  296736 1412440  158d58 drivers/gpu/drm/i915/i915.o.new
> >  928111  193257  296736 1418104  15a378 drivers/gpu/drm/i915/i915.o.old
> 
> You might want to mention that this requires a binary-search through
> kallsyms on each call.

All these calls are infrequently taken error paths
and the cost of the printk itself is _far_ higher
than a binary search for the symbol.

> I guess that's the reason you didn't use it for
> drm_ut_debug_printk()? I'm fine with doing this on drm_err(). Looks
> good.

No, the reason I didn't do it there is that those calls
should really be consolidated and be able to use dynamic_debug.
It'd be a separate patch.

cheers, Joe

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