Norman,
Understood. Thank you for your reply. I will take care to avoid pasting any AI generated content in the future.
If I understand your answer correctly, then using AI to research and investigate is acceptable, but any proposed changes, bug reports, or fixes should solely consist of code and content I create, and which I assume all responsibility for?
Thanks, Ryan Davidovics
-------- Original Message -------- On Monday, 06/08/26 at 05:01 users-request@lists.genode.org wrote: Send users mailing list submissions to users@lists.genode.org
To subscribe or unsubscribe via email, send a message with subject or body 'help' to users-request@lists.genode.org
You can reach the person managing the list at users-owner@lists.genode.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of users digest..."
Today's Topics:
1. MSM8226 Port part_block GPT Partition Parsing Error (Ryan Davidovics) 2. AI-generated code (was Re: MSM8226 Port part_block GPT Partition Parsing Error) (Norman Feske)
----------------------------------------------------------------------
Message: 1 Date: Mon, 08 Jun 2026 01:47:42 +0000 From: Ryan Davidovics davidovicsryanp@protonmail.com Subject: MSM8226 Port part_block GPT Partition Parsing Error To: "users@lists.genode.org" users@lists.genode.org Message-ID: <In2Lv_iy0CX68v2IED625TkHDmkg4Y9wg3LDs9Uxd-e9jdHz83zmO_EQx 1WzCLmUOALjtEA0CrQvwLfewHJrrcLbQ_bghhvAN7EsmLMB5-c=@protonmail.com> Content-Type: multipart/alternative; boundary="b1=_PHFoLFLjnJOmFBdCeBKKc0YQJv7ZBM03H1EDpxyU"
Hello,
My sincerest apologies if this question is malformed, misplaced, or mistaken in some way.
I am inexperienced with Genode, but have been exploring it for a number of personal projects. The one I am currently working on is creating a minimal sculpt-like OS to replace the default Android 4.2 operating system on a rugged 4G Sonim XP5700 phone to serve as a platform for further Genode exploration and IoT projects.
To test the viability of this, I have been using Claude Opus 4.7/4.8 to accelerate working through creating a port for the msm8226/msm8926 SoC and phone platform. It has been largely successful so far, but hit a snag when implementing the file system service. This was its report:
``` part_block has a real bug for this device's GPT: the parse loop (gpt.h:373) runs to a hardcoded MAX_PARTITIONS=128, but this Qualcomm GPT declares fewer entry slots, so the entry-array buffer (sized to the header's actual entries(), gpt.h:363) overruns once i passes the real count. (_calculate_used at gpt.h:342 already correctly bounds by entries() — only the parse loop doesn't.) The one-line fix is to bound the parse loop by min(entries(), MAX_PARTITIONS). ```
And its recommended fix, which successfully resolved the issue:
``` diff --git a/repos/os/src/server/part_block/gpt.h b/repos/os/src/server/part_block/gpt.h index dbe9128e01..3539024cfb 100644 --- a/repos/os/src/server/part_block/gpt.h +++ b/repos/os/src/server/part_block/gpt.h @@ -370,7 +370,17 @@ class Block::Gpt : public Block::Partition_table _gpt_total = (gpt.part_lba_end() - gpt.part_lba_start()) + 1; _gpt_used = _calculate_used(gpt, entries, gpt.entries());
- for (int i = 0; i < MAX_PARTITIONS; i++) { + /* + * Iterate only over the entries the header actually declares -- + * a GPT may advertise fewer slots than MAX_PARTITIONS (e.g. the + * Qualcomm MSM8226 eMMC declares < 128), and the entry-array + * buffer above is sized to gpt.entries(); walking to MAX_PARTITIONS + * unconditionally overruns it (Mmio Range_violation). This matches + * the bound already used by _calculate_used(). + */ + unsigned const num_entries = min(gpt.entries(), + (uint32_t)MAX_PARTITIONS); + for (unsigned i = 0; i < num_entries; i++) {
Gpt_entry e(entries.range_at(i * gpt.entry_size())); ```
I am not sure of what the stance is on AI generated code or how well-documented pull requests need to be before creation, and I do not yet have the ability to test this change in a comprehensive way. I would love to contribute in any way I can, but am not yet certain of whether I have the tools or knowledge to do so correctly yet.
I would greatly appreciate any feedback or advice, and thank you for your time and consideration regardless. This has been a remarkable project to learn about so far.
Thanks, Ryan Davidovics
Hello Ryan,
If I understand your answer correctly, then using AI to research and investigate is acceptable, but any proposed changes, bug reports, or fixes should solely consist of code and content I create, and which I assume all responsibility for?
I think you got the gist of it but your rephrasing is overly broad.
First, when speaking of responsibility there are two facets: technical fitness and legality. Let us narrow the discussion to the legal aspect.
Second, when reporting bugs or proposing changes, no one but you is responsible for anything you communicate. Anyone is free to ignore such input after all. No strings attached.
Third, there are plenty of ways to contribute where you are at full liberty about your creative process and tools. For example, if you host your Snapdragon-related work in a code repository of your's and announce it to the public, that would certainly be a welcome contribution for the Genode community at large. With your work being hosted in your repository, however, no one but you would be responsible for it. Again, no strings attached.
Only when proposing code changes into Genode's official code base owned by Genode Labs, the responsibility for the contributed code - both legally and regarding its technical fitness - changes hands from the you as the contributor to Genode Labs. It is only natural that such contributions are scrutinized technically and legally. The legality of the contribution is reinforced by the signed contributor's agreement (GCA). By signing the GCA, you accept the responsibility for the legality of your contributions. The GCA is a contract that puts this particular legal risk on the contributor's side.
If I was in the shoes of someone using an AI agent for generating code designated as a potential upstream code contribution, I would *never* accept this personal legal risk. Signing the GCA would be out of question. Not everyone shares such a strong sense of risk. Hence, as a preventive measure for protecting potential contributors and Genode Labs from legal uncertainties, Genode Labs does not accept AI-generated code contributions.
In comparison, it is straight-forward to ensure the legality of code crafted by hand. Unless asserted by your employer, you are the legal owner of the code you write. So you can propose the code for upstream under the GCA without exposing yourself to legal gray areas.
I hope that I was able to clarify, and I also hope that this side track does not spoil your enthusiasm and fun with Genode. :-)
Best regards Norman