From: Lukas Wunner <lukas@wunner.de>
To: Mark Brown <broonie@kernel.org>
Cc: Joe Burmeister <joe.burmeister@devtank.co.uk>,
Florian Fainelli <f.fainelli@gmail.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, nsaenz@kernel.org,
phil@raspberrypi.com
Subject: Re: [PATCH] spi: bcm2835: Fix buffer overflow with CS able to go beyond limit.
Date: Tue, 4 May 2021 15:53:53 +0200 [thread overview]
Message-ID: <20210504135353.GA12996@wunner.de> (raw)
In-Reply-To: <20210504115130.GA7094@sirena.org.uk>
On Tue, May 04, 2021 at 12:51:30PM +0100, Mark Brown wrote:
> On Sat, May 01, 2021 at 09:51:35PM +0200, Lukas Wunner wrote:
> > I failed to appreciate that when I changed num_chipselects for
> > spi-bcm2835.c with commit 571e31fa60b3. That single line change
> > in the commit ought to be reverted.
>
> > And the kernel-doc ought to be amended because the crucial detail
> > that num_chipselect needs to be set to the maximum *native* chipselects
> > isn't mentioned anywhere.
>
> Can you send patches for these please?
Yup, I've cooked up two patches over the weekend, one bcm2835 short-term
fix for-5.13 and one long-term solution for-5.14, they're on this branch:
https://github.com/l1k/linux/commits/bcm2835_spi_limit
Just needs some more polishing and testing before submission (hopefully
in the second half of this week).
> > Unfortunately that's non-trivial. The slave-specific data is DMA-mapped.
> > It could be DMA-mapped in ->setup but there's no ->unsetup to DMA-unmap
> > the memory once the slave is removed. Note that the slave could be removed
> > dynamically with a DT overlay, not just when the controller is unbound.
>
> > So we'd need a new ->unsetup hook at the very least to make this work.
>
> There's the cleanup() callback which seems to fit?
Right, I initially missed that but found it and then prepared the patch
on the above-linked branch.
Thanks,
Lukas
prev parent reply other threads:[~2021-05-04 13:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 8:34 [PATCH] spi: bcm2835: Fix buffer overflow with CS able to go beyond limit Joe Burmeister
2021-04-20 8:34 ` Joe Burmeister
2021-04-22 16:42 ` Mark Brown
2021-04-22 16:42 ` Mark Brown
2021-04-22 16:50 ` Florian Fainelli
2021-04-22 16:50 ` Florian Fainelli
2021-04-22 20:10 ` Joe Burmeister
2021-04-22 20:10 ` Joe Burmeister
2021-04-22 23:49 ` Florian Fainelli
2021-04-22 23:49 ` Florian Fainelli
2021-04-23 10:03 ` Joe Burmeister
2021-04-23 10:03 ` Joe Burmeister
2021-04-23 11:57 ` Mark Brown
2021-04-23 11:57 ` Mark Brown
2021-04-23 14:12 ` Joe Burmeister
2021-04-23 14:12 ` Joe Burmeister
2021-04-23 16:20 ` Mark Brown
2021-04-23 16:20 ` Mark Brown
2021-04-23 17:34 ` Nicolas Saenz Julienne
2021-04-23 17:34 ` Nicolas Saenz Julienne
2021-05-01 19:51 ` Lukas Wunner
2021-05-04 11:51 ` Mark Brown
2021-05-04 11:51 ` Mark Brown
2021-05-04 13:53 ` Lukas Wunner [this message]
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=20210504135353.GA12996@wunner.de \
--to=lukas@wunner.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=broonie@kernel.org \
--cc=f.fainelli@gmail.com \
--cc=joe.burmeister@devtank.co.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=nsaenz@kernel.org \
--cc=phil@raspberrypi.com \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.