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, 11 Sep 2019 01:37:25 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>
Subject: Re: [PATCH v4 06/14] software node: get rid of property_set_pointer()

On Wed, Sep 11, 2019 at 11:29:10AM +0300, Andy Shevchenko wrote:
> On Wed, Sep 11, 2019 at 8:15 AM Dmitry Torokhov
> <dmitry.torokhov@...il.com> wrote:
> >
> > Instead of explicitly setting values of integer types when copying
> > property entries lets just copy entire value union when processing
> > non-array values.
> >
> > When handling array values assign the pointer there using the newly
> > introduced "raw" pointer union member. This allows us to remove
> > property_set_pointer().
> >
> > In property_get_pointer() we do not need to handle each data type
> > separately, we can simply return either the raw pointer or pointer to
> > values union.
> 
> Same as before, typechecking is good thing to have for my point of view.
> Others may have different opinions.

OK, I'll just point out that typechecking is a red herring here as
everything was and still is accessed through void pointers, and we
trusted the type set on property. Users of static properties should use
PROPERTY_ENTRY_XXX() for initialization and do not poke into struct
property_entry directly.

I suppose it is up to Rafael to decide here.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ