From: Jack Rosenthal <jrosenth@chromium.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org,
Tzung-Bi Shih <tzungbi@kernel.org>,
Guenter Roeck <groeck@chromium.org>,
Julius Werner <jwerner@chromium.org>
Subject: Re: [PATCH v7] firmware: google: Implement cbmem in sysfs driver
Date: Sat, 6 Aug 2022 13:46:16 -0700 [thread overview]
Message-ID: <Yu7TGDYTyzFLoVe4@chromium.org> (raw)
In-Reply-To: <CAE-0n51UcauP1ojoskV9_2+CFPoJrs08jGHVPCZdSA_oXX1zUw@mail.gmail.com>
On 2022-08-04 at 15:59 -0500, Stephen Boyd wrote:
> I suspect this won't work because the driver can be unbound, and thus
> the mapping can be destroyed by devm, but then the kobject and sysfs
> file like 'mem' can be held by userspace after the driver is unbound.
> Userspace access after that time will try to read/write unmapped memory.
When the driver is unbound, read()/write() will return -ENODEV, and
mmap() isn't supported.
> Why not make this in the bus driver (coreboot-table.c)? In fact, most
> things could probably be created there instead of in a 'driver' that
> really isn't doing much 'driving' at all.
In v8, I moved the coreboot_kobj to coreboot-table.c. I imagine in the
future we could move some of the other things (e.g., "vpd") under this
object for consistency. So now the structure is:
/sys/firmware/coreboot/cbmem/<id>/...
next prev parent reply other threads:[~2022-08-06 20:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202207301713.q4988FIe-lkp@intel.com>
2022-08-01 15:26 ` [PATCH v5] firmware: google: Implement cbmem in sysfs driver Jack Rosenthal
2022-08-01 22:14 ` Julius Werner
2022-08-02 14:03 ` [PATCH v6] " Jack Rosenthal
2022-08-02 14:37 ` Guenter Roeck
2022-08-04 8:22 ` Tzung-Bi Shih
2022-08-04 14:28 ` [PATCH v7] " Jack Rosenthal
2022-08-04 20:59 ` Stephen Boyd
2022-08-04 23:14 ` Julius Werner
2022-08-10 16:40 ` Stephen Boyd
2022-08-10 22:26 ` Julius Werner
2022-08-10 23:58 ` Stephen Boyd
2022-08-11 1:17 ` Julius Werner
2022-08-06 20:46 ` Jack Rosenthal [this message]
2022-08-04 14:31 ` [PATCH v6] " Jack Rosenthal
2022-08-06 20:40 [PATCH v7] " Jack Rosenthal
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=Yu7TGDYTyzFLoVe4@chromium.org \
--to=jrosenth@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=groeck@chromium.org \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swboyd@chromium.org \
--cc=tzungbi@kernel.org \
/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