Re: [PATCH v4] proc/sysctl: add shared variables for range check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 30, 2019 at 3:47 AM Matteo Croce <mcroce@xxxxxxxxxx> wrote:
>
> On Tue, Apr 30, 2019 at 12:26 AM Matteo Croce <mcroce@xxxxxxxxxx> 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.

Why can't these be converted to const also? I don't see the pointer
changing anywhere. They're created in one place and never changed.

If it's only a couple places, it seems like it'd be nice to get these fixed.

-- 
Kees Cook



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux