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: <20160926083625.GN28107@nuc-i3427.alporthouse.com>
Date:   Mon, 26 Sep 2016 09:36:25 +0100
From:   Chris Wilson <chris@...is-wilson.co.uk>
To:     Joe Perches <joe@...ches.com>
Cc:     David Airlie <airlied@...ux.ie>, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 2/2] drm: Simplify drm_printk to reduce object size quite
 a bit

On Sun, Sep 25, 2016 at 07:18:34PM -0700, Joe Perches wrote:
> Remove function name and special " *ERROR*" from argument list
> 
> $ size drivers/gpu/drm/built-in.o* (x86-32 defconfig, most drm selected)
>    text	   data	    bss	    dec	    hex	filename
> 5635366	 182579	  14328	5832273	 58fe51	drivers/gpu/drm/built-in.o.new
> 5779552	 182579	  14328	5976459	 5b318b	drivers/gpu/drm/built-in.o.old
> 
> Using "%ps", __builtin_return_address(0) is the same as "%s", __func__
> except for static inlines, but it's more or less the same output.

And for static inlines we more often want to know which of the many
callers triggered the error. We would have to play it by ear to see
which error messages need to be improved in cases where it not obvious
without the context of the static inline function name.

Lgtm, reducing the call size for DRM_DEBUG is a definite improvement.
Reviewed-by: Chris Wilson <chris@...is-wilson.co.uk>

> 
> Miscellanea:
> 
> o Convert args... to ##__VA_ARGS__
> o The equivalent DRM_DEV_<FOO> macros are rarely used and not
>   worth conversion

Today. I would rather see us to migrate to DRM_DEV (i.e. dev_printk) so
that the drm subsystem is consistent with the rest of the kernel and
providing the necessary information for syslog filtering.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ