Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp3222050ima; Sun, 3 Feb 2019 16:45:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN4bOUIyboH+/DzhD8Utby5/g5qMYHZOH5ADiWHmsyjL1qfrXXVyHJZYfG9u0PwWvzNJVumt X-Received: by 2002:a62:fc8a:: with SMTP id e132mr48316272pfh.176.1549241146350; Sun, 03 Feb 2019 16:45:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549241146; cv=none; d=google.com; s=arc-20160816; b=AUVcQ7OuUbGVhFWE/VzDKZ7Dfe6Tkvv46QgO63Zgy1sXJIoklC3wE7VVhg6E2ayQev x8Y34vMnaCAhsrH+SDIkU4z9apN0gfeoZ0YODj927Ye2+RLdmhFkISq9KJIXOKi39DB7 ojnp33ZlzBq7HzqKnUxxpictpnHpEj/9/Rs4Z6yDPg2x7XfwbIAFUq45JHz4Hfz3Z5QB R0Lrv3vLOFe0W2+sgwHaSe7O3dBmR3z+43ET39E/lVLlL+7+e2Ri20ht/GpnvmDj/0Id +eGM6ViHdKbxlnAu4AF7zS9qJyYvQfFaSw6zgERoobB3u7nA9j1xEXatWc0PiG55/8pK BjaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=IHdkvegfN4vQFLFAvhmSbtFcKtcAtu1oi3Y1OzhDLS8=; b=mACcZaj0VLrqQ6vooeywd6Vw51Qlv2WId7ZIr7+9JXVPs8n/jpl6EAw1+xa3NuFw11 P4GcZwg7aHooTbWeFYgyEJDJdWCTUclEfMbP/LTntBT6Zfb7s+bTxOimqIxqXv0/UO5H JrpiONavPsB1ME8GLxf95MSJhbwX+rlwACbMcvYWIBduN+qKMH78EgsGgenxdGx9OM1Z LCW57YqZW13ix2Q/ylwW7TRx8jv4q29O5lxJhVKeVDfB8j4a0nR30kDTKYcpgv0pbiCi NHREIKLf7Eqfl6khC+gdzmdfntfntS6/KfBSY3PLd+TdeSa236yHSSs4SCO6CS7h9v93 ORjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s38si13853921pga.38.2019.02.03.16.44.55; Sun, 03 Feb 2019 16:45:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727757AbfBDAkw (ORCPT + 99 others); Sun, 3 Feb 2019 19:40:52 -0500 Received: from mx2.suse.de ([195.135.220.15]:47654 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727526AbfBDAkw (ORCPT ); Sun, 3 Feb 2019 19:40:52 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B64B5AC3E; Mon, 4 Feb 2019 00:40:50 +0000 (UTC) Date: Mon, 4 Feb 2019 01:40:48 +0100 From: David Disseldorp To: Laura Abbott Cc: Christoph Hellwig , "Martin K. Petersen" , "Nicholas A. Bellinger" , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, Linux Kernel Mailing List , Lee Duncan Subject: Re: Userspace regression with 6baca7601bde ("scsi: target: drop unused pi_prot_format attribute storage") Message-ID: <20190204014048.1cf91326@suse.de> In-Reply-To: <57120b72-2ab9-bfa5-f69c-31aee78d5936@redhat.com> References: <57120b72-2ab9-bfa5-f69c-31aee78d5936@redhat.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 > Reviewed-by: Christoph Hellwig > Signed-off-by: Martin K. Petersen > > > 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