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]
Date:   Mon, 2 May 2022 07:26:46 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Tonghao Zhang <xiangxia.m.yue@...il.com>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        linux-fsdevel@...r.kernel.org,
        Luis Chamberlain <mcgrof@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Iurii Zaikin <yzaikin@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Paolo Abeni <pabeni@...hat.com>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Simon Horman <horms@...ge.net.au>,
        Julian Anastasov <ja@....bg>,
        Pablo Neira Ayuso <pablo@...filter.org>,
        Jozsef Kadlecsik <kadlec@...filter.org>,
        Florian Westphal <fw@...len.de>, Shuah Khan <shuah@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Lorenz Bauer <lmb@...udflare.com>,
        Akhmat Karakotov <hmukos@...dex-team.ru>
Subject: Re: [net-next v4 3/3] selftests/sysctl: add sysctl macro test

On Sun, 1 May 2022 11:31:47 +0800 Tonghao Zhang wrote:
>  static int __init test_sysctl_init(void)
>  {
> +       int i;
> +

nit: No empty line needed here.

> +       struct {
> +               int defined;
> +               int wanted;
> +       } match_int[] = {
> +               {.defined = *(int *)SYSCTL_ZERO,        .wanted = 0},
> +               {.defined = *(int *)SYSCTL_ONE,         .wanted = 1},
> +               {.defined = *(int *)SYSCTL_TWO,         .wanted = 2},
> +               {.defined = *(int *)SYSCTL_THREE,       .wanted = 3},
> +               {.defined = *(int *)SYSCTL_FOUR,        .wanted = 4},
> +               {.defined = *(int *)SYSCTL_ONE_HUNDRED, .wanted = 100},
> +               {.defined = *(int *)SYSCTL_TWO_HUNDRED, .wanted = 200},
> +               {.defined = *(int *)SYSCTL_ONE_THOUSAND, .wanted = 1000},
> +               {.defined = *(int *)SYSCTL_THREE_THOUSAND, .wanted = 3000},
> +               {.defined = *(int *)SYSCTL_INT_MAX,     .wanted = INT_MAX},
> +               {.defined = *(int *)SYSCTL_MAXOLDUID,   .wanted = 65535},
> +               {.defined = *(int *)SYSCTL_NEG_ONE,     .wanted = -1},
> +       };
> +
> +       for (i = 0; i < ARRAY_SIZE(match_int); i++)
> +               if (match_int[i].defined != match_int[i].wanted)
> +                       match_int_ok = 0;

That's better, thank you!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ