Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1282564ybb; Sun, 29 Mar 2020 00:22:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuHp7tTrksWHW9HKVYFChVO4noWj55XNR76uEz0Qv9n5Fpw9EcRjazdUyPvnY+jzFWpGaJ5 X-Received: by 2002:a05:6830:4038:: with SMTP id i24mr5311812ots.0.1585466572397; Sun, 29 Mar 2020 00:22:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585466572; cv=none; d=google.com; s=arc-20160816; b=cVd2kYuePXdlAQ9MSaTTYxqY6TYT6cyaelfTgc1YiCpf5MwRRwi+CNTNHfCM5v85LE lTSPNtj9dZyyyVZ8QIRzh0FPup8WU154fi8ukbrzoOyx21TNIUX6VTneCeilfJrkOSXj KVVXc4JpP6Dml1Ugq53Vfris4+3m9Xt8CtsMC/AufmBzF/EurZB0+WokdgV0LCSxPgQq 1UHGdtNlALeKoxrwLKsnCjWCK12/b9XfFgiQ4cbNzCbW3+tVv5ZmSa8WnZqtxJQczGD3 W9Jtmf5mCyjv8VBZ58kUV1rnojNQfWjq6rw8/d7Oyk3DzaxogIEbYaIthuzn9nlsSoda nsGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MBRt8+k2paszDjk+AWvvybbznwwY03OoRZexgAwjbK0=; b=qEYm+s5XHw6Z68sr/5cQCbgInNuK0fkqZxWvaOuYiVZY9VWTGShRMe4D4ZaastMw1X FliJv1Wua5fz0oHqD4329jZ8AucXtYckW/aQBfD1WRP2Xl4aW1ROqU8j15sYUZqvTPJN M2P84S6uviQjlbX0LRcJKABTYMm9p86/AaffgaAMQGYBXwGwClPlRiReyDfhkf/sgrok daiJoDFJVkulI9JIE+C3V4+mocfbJKze8w16Irthof/kYcjUGr4II1fqxOt3RV/J/1KT tmoKiP6ZIvEYPMAh2W6OECjYg++cGb74Ft8husN2b1d20rKURVLoRMN7iuHIr5ww3eec heUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=egGUiNae; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l21si4365746otq.144.2020.03.29.00.22.39; Sun, 29 Mar 2020 00:22:52 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=egGUiNae; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727612AbgC2HUz (ORCPT + 99 others); Sun, 29 Mar 2020 03:20:55 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:38018 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726342AbgC2HUz (ORCPT ); Sun, 29 Mar 2020 03:20:55 -0400 Received: by mail-qk1-f196.google.com with SMTP id h14so15712181qke.5; Sun, 29 Mar 2020 00:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MBRt8+k2paszDjk+AWvvybbznwwY03OoRZexgAwjbK0=; b=egGUiNaemesGJM4SizgtC8pV1xeaw2lChfdN3Y6Ap+7kYnUO+3ogshbVDDs5jOWZAE HfWFUW9kQTFi/pycmC6A5s/iChoTAohnpyT1iQiaB3Gcr6ZxjCD1TziriSplir3ZGhdI ssBdo5TmtOTdiwSM8km5QKLuko/WJqPGrbBRmOAGvcbxQ8aAD3Hn7nZFoSq+ScISIoOC eszFVfXTezSaLHoKaQ41U5rVwsf17s/U7rKlndv8CzaZN/u+h9kcgSvExdz3U41/b9PB sceJZCMlBLzCG8kh0gxGCUl49QX7Ne/zOceNkhoPClyWXGqGutjPXRxwMAC6zc0Rp030 jqcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MBRt8+k2paszDjk+AWvvybbznwwY03OoRZexgAwjbK0=; b=dxcfRQluOoOKMuS+AVuzGUOpLMx//moy3wZQaVztvRaCFOGhcIbeVcLXTShWwZ2P6f mxpLUDes0qZkONVOnDCjebLONZJLwJSi/MEZqaO7PrFP5SVcIdMyjuVxAMRb8tw7KwyO LiThARYKG5wUSDIZN4FhSEQcAXDIfcRkfy5IzKUxxVERoznUgxiS00bDHdAx1/i2n9nB QAjK3+VGk1izHNy/Bj39We9AXwtVYPfanru9aL+9v39CtVmuoNYYwsGSo2zg4uqiyjRi qFDvbRZsTpwQ4uA2zHsLXc87rKtV4LKAXYtr7eaNh64RlFKQpUfiWUXwVBEYxcmKd34F zQ2w== X-Gm-Message-State: ANhLgQ09q96NckjgAgIvHVjcVNL2uJ1eGACXvwo/sRtb3T5e5/4nvu1J 27p/vT+zyRyJh4KiIp6HroRsint5jeeLIBYvxio= X-Received: by 2002:a37:4015:: with SMTP id n21mr6220237qka.76.1585466453876; Sun, 29 Mar 2020 00:20:53 -0700 (PDT) MIME-Version: 1.0 References: <20200328195932.GA96482@google.com> In-Reply-To: <20200328195932.GA96482@google.com> From: Kelsey Date: Sun, 29 Mar 2020 01:20:42 -0600 Message-ID: Subject: Re: [Linux-kernel-mentees] [PATCH v2] PCI: sysfs: Change bus_rescan and dev_rescan to rescan To: Bjorn Helgaas Cc: Linux Kernel Mailing List , linux-pci@vger.kernel.org, Kelsey Skunberg , rbilovol@cisco.com, stable , Don Dutile , Ruslan Bilovol , linux-kernel-mentees@lists.linuxfoundation.org, Bodong Wang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 28, 2020 at 1:59 PM Bjorn Helgaas wrote: > > On Thu, Mar 26, 2020 at 12:29:11AM -0600, Kelsey wrote: > > On Wed, Mar 25, 2020 at 4:10 PM Bjorn Helgaas 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