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  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, 30 Apr 2019 12:46:31 +0200
From:   Matteo Croce <>
To:     LKML <>,,
        Andrew Morton <>
Cc:     Kees Cook <>,
        Matthew Wilcox <>
Subject: Re: [PATCH v4] proc/sysctl: add shared variables for range check

On Tue, Apr 30, 2019 at 12:26 AM Matteo Croce <> wrote:
> Add a const int array containing the most commonly used values,
> some macros to refer more easily to the correct array member,
> and use them instead of creating a local one for every object file.

Ok it seems that this simply can't be done, because there are at least
two points where extra1,2 are set to a non const struct:
in ip_vs_control_net_init_sysctl() it's assigned to struct netns_ipvs,
while in mpls_dev_sysctl_register() it's assigned to a struct mpls_dev
and a struct net.

So, sadly making extra1,2 const is a no-go :(

Andrew, I'm thinking to add the "sad and lame" cast in the macro, to
have a single point where hide it

Matteo Croce
per aspera ad upstream

Powered by blists - more mailing lists