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:   Thu, 5 Oct 2023 16:54:04 +0100
From:   Quentin Monnet <quentin@...valent.com>
To:     Ian Rogers <irogers@...gle.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        Song Liu <song@...nel.org>,
        Yonghong Song <yonghong.song@...ux.dev>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
        bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/2] bpftool: Align bpf_load_and_run_opts insns and
 data

On 04/10/2023 23:23, Ian Rogers wrote:
> A C string lacks alignment so use aligned arrays to avoid potential
> alignment problems. Switch to using sizeof (less 1 for the \0
> terminator) rather than a hardcode size constant.
> 
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
>  tools/bpf/bpftool/gen.c | 47 ++++++++++++++++++++++-------------------
>  1 file changed, 25 insertions(+), 22 deletions(-)
> 
> diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
> index b8ebcee9bc56..7a545dcabe38 100644
> --- a/tools/bpf/bpftool/gen.c
> +++ b/tools/bpf/bpftool/gen.c
> @@ -408,8 +408,8 @@ static void codegen(const char *template, ...)
>  		/* skip baseline indentation tabs */
>  		for (n = skip_tabs; n > 0; n--, src++) {
>  			if (*src != '\t') {
> -				p_err("not enough tabs at pos %td in template '%s'",
> -				      src - template - 1, template);
> +				p_err("not enough tabs at pos %td in template '%s'\n'%s'",
> +					src - template - 1, template, src);

Nit: This line is no longer aligned with the opening parenthesis.

Other than that:

Acked-by: Quentin Monnet <quenti@...valent.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ