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:   Sun, 29 Mar 2020 01:20:42 -0600
From:   Kelsey <skunberg.kelsey@...il.com>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-pci@...r.kernel.org,
        Kelsey Skunberg <kelsey.skunberg@...il.com>,
        rbilovol@...co.com, stable <stable@...r.kernel.org>,
        Don Dutile <ddutile@...hat.com>,
        Ruslan Bilovol <ruslan.bilovol@...il.com>,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        Bodong Wang <bodong@...lanox.com>
Subject: Re: [Linux-kernel-mentees] [PATCH v2] PCI: sysfs: Change bus_rescan
 and dev_rescan to rescan

On Sat, Mar 28, 2020 at 1:59 PM Bjorn Helgaas <helgaas@...nel.org> wrote:
>
> On Thu, Mar 26, 2020 at 12:29:11AM -0600, Kelsey wrote:
> > On Wed, Mar 25, 2020 at 4:10 PM Bjorn Helgaas <helgaas@...nel.org> wrote:
>
> > > Thanks for taking care of this!  Two questions:
> > >
> > > 1) You supplied permissions of 0220, but DEVICE_ATTR_WO()
> > > uses__ATTR_WO(), which uses 0200.  Shouldn't we keep 0200?
> > >
> >
> > Good catch. Before changing to DEVICE_ATTR_WO(), the permissions used
> > was (S_IWUSR | S_IWGRP), which would be 0220. This means the
> > permissions were mistakenly changed from 0220 to 0200 in the same
> > patch:
> >
> > commit 4e2b79436e4f ("PCI: sysfs: Change DEVICE_ATTR() to DEVICE_ATTR_WO()")
> >
> > To verify DEVICE_ATTR_WO() is using __ATTR_WO() can be seen in
> > /include/linux/device.h
> > To verify permissions for __ATTR_WO() is 0200 can be seen in
> > /inlcude/linux/sysfs.h
> >
> > These attributes had permissions 0220 when first being introduced and
> > before the above mentioned patch, so I'm on the side to believe that
> > 0220 should be used.
>
> I'm not sure it was a mistake that 4e2b79436e4f changed from 0220 to
> 200 or not.  I'd say __ATTR_WO (0200) is the "standard" one, and we
> should have a special reason to use 0220.

Sounds good. I didn't find any information or reason stating the
permissions needed to be 0220. So sounds like 0200 will be the winner.

Appreciate the help and you checking this over!

- Kelsey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ