From: Ayush Singh <ayush@beagleboard.org>
To: sashiko-bot@kernel.org
Cc: "Ayush Singh" <ayush@beagleboard.org>,
sashiko-reviews@lists.linux.dev, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, ojeda@kernel.org,
gary@garyguo.net
Subject: Re: [PATCH v3 5/7] drivers: greybus: Add software SVC implementation
Date: Tue, 20 Oct 2026 22:06:19 +0530 [thread overview]
Message-ID: <87a4o8uy64.fsf@beagleboard.org> (raw)
In-Reply-To: <sashiko-outbox-169773@kernel.org> (sashiko-bot@kernel.org's message of "Tue, 13 Oct 2026 13:07:55 +0000")
sashiko-bot@kernel.org writes:
> [ ... ]
>
>> + fn send_request<P: AsBytes>(&self, hd: &hd::Device, ty: u8, payload: P) -> Result<()> {
>> + let msg = Msg::request(self.new_operation_id()?, ty, payload);
>> + hd.data_rcvd(protocols::GB_SVC_CPORT_ID, msg.as_bytes());
>> + Ok(())
>> + }
>
> [Severity: Medium]
> Is there a mechanism to prevent operation_id leaks if the core drops SVC
> requests?
>
> When gb_softsvc sends a request via hd.data_rcvd(), the greybus core might
> drop the request early (for instance, if the GFP_ATOMIC memory allocation
> fails in gb_operation_create_incoming() or gb_operation_get_active() fails
> in gb_connection_recv_request() in drivers/greybus/operation.c).
>
> If the core silently drops the message without calling
> gb_operation_request_handle() or sending a response back to the SVC,
> could the svc_operation_id IdPool leak IDs until find_unused_id() fails
> with EOVERFLOW, preventing the soft SVC from sending further requests?
Well, if this could somehow happen, that would be a bug in greybus core
and should be fixed. I will look into it, but I feel like a kernel module
should be able to trust the kernel itself.
Best Regards,
Ayush Singh
--
BeagleBoard.org Foundation
https://www.beagleboard.org
next prev parent reply other threads:[~2026-10-20 16:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 12:00 [PATCH v3 0/7] Add Greybus Sotfsvc and UART Node drivers Ayush Singh
2026-10-13 12:00 ` [PATCH v3 1/7] greybus: connection: Export gb_connection_get() and gb_connection_put() Ayush Singh
2026-10-13 12:00 ` [PATCH v3 2/7] greybus: connection: Add gb_connection_hd_find_by_intf() Ayush Singh
2026-10-13 12:00 ` [PATCH v3 3/7] rust: crc_ccitt: add CRC-CCITT abstraction Ayush Singh
2026-10-13 12:00 ` [PATCH v3 4/7] rust: kernel: Add greybus abstractions Ayush Singh
2026-10-13 12:48 ` sashiko-bot
2026-10-19 11:49 ` Ayush Singh
2026-10-13 12:00 ` [PATCH v3 5/7] drivers: greybus: Add software SVC implementation Ayush Singh
2026-10-13 13:07 ` sashiko-bot
2026-10-20 16:36 ` Ayush Singh [this message]
2026-10-13 12:00 ` [PATCH v3 6/7] dt-bindings: beagle: Add BeagleConnect Freedom Ayush Singh
2026-10-13 13:12 ` sashiko-bot
2026-10-13 12:00 ` [PATCH v3 7/7] greybus: Add Rust UART node driver Ayush Singh
2026-10-13 13:32 ` sashiko-bot
2026-10-13 14:48 ` Markus Probst
2026-10-13 16:29 ` Ayush Singh
2026-10-13 16:56 ` Markus Probst
2026-10-13 12:53 ` [PATCH v3 0/7] Add Greybus Sotfsvc and UART Node drivers Miguel Ojeda
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=87a4o8uy64.fsf@beagleboard.org \
--to=ayush@beagleboard.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gary@garyguo.net \
--cc=ojeda@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-bot@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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