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:   Fri, 11 Aug 2023 15:41:58 +0000
From:   "Lopez, Jorge A (Security)" <jorge.lopez2@...com>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
CC:     "hdegoede@...hat.com" <hdegoede@...hat.com>,
        "markgross@...nel.org" <markgross@...nel.org>,
        "platform-driver-x86@...r.kernel.org" 
        <platform-driver-x86@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: RE: [PATCH] platform/x86: hp-bioscfg: Remove useless else

The redundant code is a remnant code from test phase.
I concur with your changes which were approved in a separate email.


Regards,

Jorge Lopez
HP Inc

"Once you stop learning, you start dying"
Albert Einstein

> -----Original Message-----
> From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
> Sent: Friday, August 11, 2023 3:04 AM
> To: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> Cc: Lopez, Jorge A (Security) <jorge.lopez2@...com>;
> hdegoede@...hat.com; markgross@...nel.org; platform-driver-
> x86@...r.kernel.org; LKML <linux-kernel@...r.kernel.org>; Abaci Robot
> <abaci@...ux.alibaba.com>
> Subject: Re: [PATCH] platform/x86: hp-bioscfg: Remove useless else
> 
> CAUTION: External Email
> 
> On Fri, 11 Aug 2023, Jiapeng Chong wrote:
> 
> > The assignment of the else and if branches is the same, so the else
> > here is redundant, so we remove it.
> >
> > ./drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c:545:3-5:
> WARNING: possible condition with no effect (if == else).
> >
> > Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> > Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> > ---
> >  .../platform/x86/hp/hp-bioscfg/passwdobj-attributes.c  | 10
> > ++--------
> >  1 file changed, 2 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
> > b/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
> > index 03d0188804ba..771e554182dc 100644
> > --- a/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
> > +++ b/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
> > @@ -541,14 +541,8 @@ void hp_exit_password_attributes(void)
> >               struct kobject *attr_name_kobj =
> >
> > bioscfg_drv.password_data[instance_id].attr_name_kobj;
> >
> > -             if (attr_name_kobj) {
> > -                     if (!strcmp(attr_name_kobj->name, SETUP_PASSWD))
> > -                             sysfs_remove_group(attr_name_kobj,
> > -                                                &password_attr_group);
> > -                     else
> > -                             sysfs_remove_group(attr_name_kobj,
> > -                                                &password_attr_group);
> > -             }
> > +             if (attr_name_kobj)
> > +                     sysfs_remove_group(attr_name_kobj,
> > + &password_attr_group);
> >       }
> >       bioscfg_drv.password_instances_count = 0;
> >       kfree(bioscfg_drv.password_data);
> 
> While this is a valid observation, I wonder why you didn't change the create
> side too?
> 
> I hope it's not because you never took a look to understand the
> SETUP_PASSWD related code, it'd be pretty impossible to not notice it.
> This could have just as well have been a bug with inconsitent pairing against
> create side, which is why reports from automated tools must not be
> implemented blindly but the related code must be understood first.
> 
> --
>  i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ