public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Userspace regression with 6baca7601bde ("scsi: target: drop unused pi_prot_format attribute storage")
@ 2019-02-03 16:56 Laura Abbott
  2019-02-04  0:40 ` David Disseldorp
  0 siblings, 1 reply; 3+ messages in thread
From: Laura Abbott @ 2019-02-03 16:56 UTC (permalink / raw)
  To: David Disseldorp, Christoph Hellwig, Martin K. Petersen
  Cc: Nicholas A. Bellinger, linux-scsi, target-devel,
	Linux Kernel Mailing List

Hi,

Fedora got a bug report of a new permission denied error with 5.0-rc2:

>   File "/usr/lib/python3.7/site-packages/rtslib_fb/utils.py", line 100, in fread
>     with open(path, 'r') as file_fd:
> PermissionError: [Errno 13] Permission denied: '/sys/kernel/config/target/core/fileio_28/xxx/attrib/pi_prot_format'

This looks like an intentional behavior change with

commit 6baca7601bdee2e57f20c45d63eb53b89b33e816
Author: David Disseldorp <ddiss@suse.de>
Date:   Fri Nov 23 18:36:11 2018 +0100

     scsi: target: drop unused pi_prot_format attribute storage
     
     On write, the pi_prot_format configfs attribute invokes the device
     format_prot() callback if present. Read dumps the contents of
     se_dev_attrib.pi_prot_format which is always zero.  Make the configfs
     attribute write-only, and drop the always zero se_dev_attrib.pi_prot_format
     storage.
     
     Signed-off-by: David Disseldorp <ddiss@suse.de>
     Reviewed-by: Christoph Hellwig <hch@lst.de>
     Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


Unfortunately, existing code that's opening with read permissions is now broken.
Can this be reverted? Full bug at https://bugzilla.redhat.com/show_bug.cgi?id=1667505

Thanks,
Laura

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Userspace regression with 6baca7601bde ("scsi: target: drop unused pi_prot_format attribute storage")
  2019-02-03 16:56 Userspace regression with 6baca7601bde ("scsi: target: drop unused pi_prot_format attribute storage") Laura Abbott
@ 2019-02-04  0:40 ` David Disseldorp
  2019-02-04  5:58   ` Laura Abbott
  0 siblings, 1 reply; 3+ messages in thread
From: David Disseldorp @ 2019-02-04  0:40 UTC (permalink / raw)
  To: Laura Abbott
  Cc: Christoph Hellwig, Martin K. Petersen, Nicholas A. Bellinger,
	linux-scsi, target-devel, Linux Kernel Mailing List, Lee Duncan

Hi Laura,

Thanks for the report...

On Sun, 3 Feb 2019 17:56:00 +0100, Laura Abbott wrote:

> Fedora got a bug report of a new permission denied error with 5.0-rc2:
> 
> >   File "/usr/lib/python3.7/site-packages/rtslib_fb/utils.py", line 100, in fread
> >     with open(path, 'r') as file_fd:
> > PermissionError: [Errno 13] Permission denied: '/sys/kernel/config/target/core/fileio_28/xxx/attrib/pi_prot_format'  
> 
> This looks like an intentional behavior change with
> 
> commit 6baca7601bdee2e57f20c45d63eb53b89b33e816
> Author: David Disseldorp <ddiss@suse.de>
> Date:   Fri Nov 23 18:36:11 2018 +0100
> 
>      scsi: target: drop unused pi_prot_format attribute storage
>      
>      On write, the pi_prot_format configfs attribute invokes the device
>      format_prot() callback if present. Read dumps the contents of
>      se_dev_attrib.pi_prot_format which is always zero.  Make the configfs
>      attribute write-only, and drop the always zero se_dev_attrib.pi_prot_format
>      storage.
>      
>      Signed-off-by: David Disseldorp <ddiss@suse.de>
>      Reviewed-by: Christoph Hellwig <hch@lst.de>
>      Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> 
> 
> Unfortunately, existing code that's opening with read permissions is now broken.
> Can this be reverted? Full bug at https://bugzilla.redhat.com/show_bug.cgi?id=1667505

Lee (cc'ed) pinged me a couple of days ago about the same issue.
My preference would be to add back a dummy read handler without the
corresponding (unused) se_dev_attrib.pi_prot_format member.
I'll prepare something tomorrow with this, but if it's urgent then I'd
also be okay with a straight revert.

Cheers, David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Userspace regression with 6baca7601bde ("scsi: target: drop unused pi_prot_format attribute storage")
  2019-02-04  0:40 ` David Disseldorp
@ 2019-02-04  5:58   ` Laura Abbott
  0 siblings, 0 replies; 3+ messages in thread
From: Laura Abbott @ 2019-02-04  5:58 UTC (permalink / raw)
  To: David Disseldorp
  Cc: Christoph Hellwig, Martin K. Petersen, Nicholas A. Bellinger,
	linux-scsi, target-devel, Linux Kernel Mailing List, Lee Duncan

On 2/4/19 1:40 AM, David Disseldorp wrote:
> Hi Laura,
> 
> Thanks for the report...
> 
> On Sun, 3 Feb 2019 17:56:00 +0100, Laura Abbott wrote:
> 
>> Fedora got a bug report of a new permission denied error with 5.0-rc2:
>>
>>>    File "/usr/lib/python3.7/site-packages/rtslib_fb/utils.py", line 100, in fread
>>>      with open(path, 'r') as file_fd:
>>> PermissionError: [Errno 13] Permission denied: '/sys/kernel/config/target/core/fileio_28/xxx/attrib/pi_prot_format'
>>
>> This looks like an intentional behavior change with
>>
>> commit 6baca7601bdee2e57f20c45d63eb53b89b33e816
>> Author: David Disseldorp <ddiss@suse.de>
>> Date:   Fri Nov 23 18:36:11 2018 +0100
>>
>>       scsi: target: drop unused pi_prot_format attribute storage
>>       
>>       On write, the pi_prot_format configfs attribute invokes the device
>>       format_prot() callback if present. Read dumps the contents of
>>       se_dev_attrib.pi_prot_format which is always zero.  Make the configfs
>>       attribute write-only, and drop the always zero se_dev_attrib.pi_prot_format
>>       storage.
>>       
>>       Signed-off-by: David Disseldorp <ddiss@suse.de>
>>       Reviewed-by: Christoph Hellwig <hch@lst.de>
>>       Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
>>
>>
>> Unfortunately, existing code that's opening with read permissions is now broken.
>> Can this be reverted? Full bug at https://bugzilla.redhat.com/show_bug.cgi?id=1667505
> 
> Lee (cc'ed) pinged me a couple of days ago about the same issue.
> My preference would be to add back a dummy read handler without the
> corresponding (unused) se_dev_attrib.pi_prot_format member.
> I'll prepare something tomorrow with this, but if it's urgent then I'd
> also be okay with a straight revert.
> 
> Cheers, David
> 

A fix is fine by me. Thanks for the prompt response.

Thanks,
Laura

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-04  5:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-03 16:56 Userspace regression with 6baca7601bde ("scsi: target: drop unused pi_prot_format attribute storage") Laura Abbott
2019-02-04  0:40 ` David Disseldorp
2019-02-04  5:58   ` Laura Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox