From: Brian Norris <briannorris@chromium.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-kernel@vger.kernel.org,
Shawn Lin <shawn.lin@rock-chips.com>,
Jeffy Chen <jeffy.chen@rock-chips.com>,
Wenrui Li <wenrui.li@rock-chips.com>,
linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
Ray Jui <rjui@broadcom.com>
Subject: Re: [PATCH v2 3/5] PCI: rockchip: add remove() support
Date: Fri, 31 Mar 2017 09:40:16 -0700 [thread overview]
Message-ID: <20170331164015.GB146301@google.com> (raw)
In-Reply-To: <20170331051702.GA13240@bhelgaas-glaptop.roam.corp.google.com>
Hi Bjorn,
On Fri, Mar 31, 2017 at 12:17:02AM -0500, Bjorn Helgaas wrote:
> On Thu, Mar 30, 2017 at 05:26:09PM -0700, Brian Norris wrote:
> > On Thu, Mar 30, 2017 at 06:28:25PM -0500, Bjorn Helgaas wrote:
> > > Can we fix them all at the same time as you fix Rockchip? Maybe we
> > > should have a series that adds ".suppress_bind_attrs = true" to all
> > > these drivers,
> >
> > Sure, I can do that.
> >
> > > including Rockchip.
> >
> > Huh? Why? So I can revert that in the next patch?
> >
> > > Then you could have this current
> > > series to make Rockchip modular on top, if there's still value in it.
> >
> > I do see value in it. That's the whole reason I wrote this patchset.
> > It's useful for stressing out certain behaviors that will happen all the
> > time (i.e., boot-time initialization, from platform probe, to bus init,
> > to client/EP init), via repeated bind/unbind (or modprobe/rmmod). It's
> > much faster than reboot testing.
>
> I didn't phrase that very well. There's certainly value in stressing
> the bind/unbind paths, but I thought the primary reason you wrote this
> was to fix the fact that you could crash the system like this:
>
> # echo f8000000.pcie > /sys/bus/platform/drivers/rockchip-pcie/unbind
> # lspci
Well, they're kinda two sides of the same coin; I was wanting to test
the bind path, and when I tried this, I noticed that I could trivially
crash the system. The crash seemed like a more important thing to
document (because otherwise, it just looks like I'm adding a feature).
> From my point of view, that's the issue that *has* to be fixed.
> Better test coverage is icing.
I didn't really view messing with /sys/.../unbind as a big issue,
outside of development and testing (there's a lot of damage a malicious
actor can do with unconstrained access to /sys/), so I guess I didn't
put that aspect as super-high priority. If you'd like to prioritize
that, then I'm OK with that.
> It sounds like several drivers have that same issue, and the simplest
> possible fix is to set .suppress_bind_attrs, so I suggested doing that
> so it's easy to analyze the tree as a whole and say "these drivers
> all have the same problem, and all the fixes look the same."
Sure, that is the simplest approach.
> I guess if you'd rather skip that for Rockchip and apply a more
> complicated fix there, I could go along with that. But I don't think
> it would hurt anything to set .suppress_bind_attrs, then remove it
> when you add module support. The concepts of .suppress_bind_attrs and
> modularity are related, and doing this in a separate patch would make
> it a nice example to follow if somebody wants to make other drivers
> modular as well.
I'll leave that up to you, and I can resubmit things if desired. As you
have since noticed, I already sent a patch to add .suppress_bind_attrs
to all the other drivers. If you'd like, feel free to add
pcie-rockchip.c into that mix, it's not hard -- or I can redo it myself.
Then I can modify and resend (or you can do the trivial modification
required to) the current patch set.
Just let me know.
> > Personally, I'd rather just patch the other drivers, and you can wait
> > until I follow through on that promise before applying my existing work
> > for the Rockchip driver, if that's what you'd prefer.
>
> It's not so much a question of using the Rockchip change as a stick.
> I'm just thinking that it makes a more logical progression to fix the
> more important issue globally first.
Sure, I can grok that. Just let me know if you want any more action from
me.
Brian
next prev parent reply other threads:[~2017-03-31 16:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 2:46 [PATCH v2 1/5] PCI: rockchip: fix sign issues for current limits Brian Norris
[not found] ` <20170310024617.67303-1-briannorris-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2017-03-10 2:46 ` [PATCH v2 2/5] PCI: rockchip: make 'return 0' more obvious in probe() Brian Norris
2017-03-10 2:46 ` [PATCH v2 3/5] PCI: rockchip: add remove() support Brian Norris
2017-03-10 3:22 ` Shawn Lin
2017-03-10 4:20 ` Shawn Lin
[not found] ` <5cec190e-4eee-fc55-7039-2336ba5253f3-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-03-10 19:40 ` Brian Norris
2017-03-13 2:26 ` Shawn Lin
[not found] ` <e41ab95e-9f65-2822-1ec2-a02a4766d53d-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-03-20 22:29 ` Brian Norris
2017-03-24 14:25 ` Bjorn Helgaas
2017-03-24 17:22 ` Brian Norris
[not found] ` <20170324172218.GA119093-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2017-03-30 23:28 ` Bjorn Helgaas
2017-03-31 0:26 ` Brian Norris
2017-03-31 5:17 ` Bjorn Helgaas
2017-03-31 16:40 ` Brian Norris [this message]
2017-04-11 18:18 ` Brian Norris
2017-03-10 2:46 ` [PATCH v2 4/5] PCI: export pci_remap_iospace() and pci_unmap_iospace() Brian Norris
2017-03-10 2:46 ` [PATCH v2 5/5] PCI: rockchip: modularize Brian Norris
2017-03-23 22:27 ` [PATCH v2 1/5] PCI: rockchip: fix sign issues for current limits Bjorn Helgaas
2017-03-23 22:33 ` Brian Norris
2017-03-24 1:24 ` Shawn Lin
2017-04-21 19:03 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170331164015.GB146301@google.com \
--to=briannorris@chromium.org \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=jeffy.chen@rock-chips.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=rjui@broadcom.com \
--cc=shawn.lin@rock-chips.com \
--cc=wenrui.li@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox