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]
Date:   Tue, 10 Dec 2019 14:58:07 -0500
From:   Jason Baron <jbaron@...mai.com>
To:     Jim Cromie <jim.cromie@...il.com>, linux-kernel@...r.kernel.org,
        akpm@...uxfoundation.org
Cc:     gregkh@...uxfoundation.org, linux@...musvillemoes.dk,
        kbuild test robot <lkp@...el.com>
Subject: Re: [PATCH v4 06/16] dyndbg: fix a BUG_ON in ddebug_describe_flags



On 12/9/19 9:27 PM, Jim Cromie wrote:
> ddebug_describe_flags currently fills a caller provided string buffer,
> after testing its size (also passed) in a BUG_ON.  Fix this with a
> struct containing a known-big-enough string buffer, and passing it
> instead.
> 
> Also simplify ddebug_describe_flags sig, and de-ref the struct in the
> caller; this makes function reusable (soon) in contexts where flags
> are already unpacked.
> 
> -v3 fix compile err introduced in patchset grooming.
> Reported-by: kbuild test robot <lkp@...el.com>
> 
> Signed-off-by: Jim Cromie <jim.cromie@...il.com>
> ---
>  lib/dynamic_debug.c | 31 +++++++++++++++----------------
>  1 file changed, 15 insertions(+), 16 deletions(-)
> 
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> index b5fb0aa0fbc3..49cb24948e12 100644
> --- a/lib/dynamic_debug.c
> +++ b/lib/dynamic_debug.c
> @@ -62,6 +62,8 @@ struct ddebug_iter {
>  	unsigned int idx;
>  };
>  
> +struct flagsbuf { char buf[12]; };	/* big enough to hold all the flags */


ARRAY_SIZE(opt_array) + 1

max number of flags + string termination.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ