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:   Wed, 8 May 2019 17:58:46 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Alastair D'Silva <alastair@....ibm.com>, alastair@...ilva.org
Cc:     linux-fbdev@...r.kernel.org,
        Stanislaw Gruszka <sgruszka@...hat.com>,
        Petr Mladek <pmladek@...e.com>,
        David Airlie <airlied@...ux.ie>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        dri-devel@...ts.freedesktop.org, devel@...verdev.osuosl.org,
        linux-scsi@...r.kernel.org, Jassi Brar <jassisinghbrar@...il.com>,
        ath10k@...ts.infradead.org, intel-gfx@...ts.freedesktop.org,
        Dan Carpenter <dan.carpenter@...cle.com>,
        Jose Abreu <Jose.Abreu@...opsys.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        linux-fsdevel@...r.kernel.org,
        Steven Rostedt <rostedt@...dmis.org>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Benson Leung <bleung@...omium.org>,
        Kalle Valo <kvalo@...eaurora.org>,
        Karsten Keil <isdn@...ux-pingi.de>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        David Laight <David.Laight@...LAB.COM>,
        Daniel Vetter <daniel@...ll.ch>, netdev@...r.kernel.org,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "David S. Miller" <davem@...emloft.net>,
        Alexander Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH v2 3/7] lib/hexdump.c: Optionally suppress lines of
 repeated bytes

On 5/8/19 12:01 AM, Alastair D'Silva wrote:
> From: Alastair D'Silva <alastair@...ilva.org>
> 
> Some buffers may only be partially filled with useful data, while the rest
> is padded (typically with 0x00 or 0xff).
> 
> This patch introduces a flag to allow the supression of lines of repeated
> bytes, which are replaced with '** Skipped %u bytes of value 0x%x **'
> 
> An inline wrapper function is provided for backwards compatibility with
> existing code, which maintains the original behaviour.
> 
> Signed-off-by: Alastair D'Silva <alastair@...ilva.org>
> ---
>  include/linux/printk.h | 25 +++++++++---
>  lib/hexdump.c          | 91 ++++++++++++++++++++++++++++++++++++------
>  2 files changed, 99 insertions(+), 17 deletions(-)
> 

Hi,
Did you do "make htmldocs" or something similar on this?

> diff --git a/lib/hexdump.c b/lib/hexdump.c
> index 3943507bc0e9..d61a1e4f19fa 100644
> --- a/lib/hexdump.c
> +++ b/lib/hexdump.c
> @@ -212,8 +212,44 @@ int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize,
>  EXPORT_SYMBOL(hex_dump_to_buffer);
>  
>  #ifdef CONFIG_PRINTK
> +
> +/**
> + * Check if a buffer contains only a single byte value
> + * @buf: pointer to the buffer
> + * @len: the size of the buffer in bytes
> + * @val: outputs the value if if the bytes are identical

Does this work without a function name?
Documentation/doc-guide/kernel-doc.rst says the general format is:

  /**
   * function_name() - Brief description of function.
   * @arg1: Describe the first argument.
   * @arg2: Describe the second argument.
   *        One can provide multiple line descriptions
   *        for arguments.
   *

> + */

>  /**
> - * print_hex_dump - print a text hex dump to syslog for a binary blob of data
> + * print_hex_dump_ext: dump a binary blob of data to syslog in hexadecimal

Also not in the general documented format.

>   * @level: kernel log level (e.g. KERN_DEBUG)
>   * @prefix_str: string to prefix each line with;
>   *  caller supplies trailing spaces for alignment if desired


-- 
~Randy

Powered by blists - more mailing lists