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 [email protected] wrote: Send users mailing list submissions to [email protected] To subscribe or unsubscribe via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] 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 <[email protected]> Subject: MSM8226 Port part_block GPT Partition Parsing Error To: "[email protected]" <[email protected]> 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-------------- next part -------------- A message part incompatible with plain text digests has been removed ... Name: not available Type: text/html Size: 5521 bytes Desc: not available ------------------------------ Message: 2 Date: Mon, 8 Jun 2026 10:36:55 +0200 From: Norman Feske <[email protected]> Subject: AI-generated code (was Re: MSM8226 Port part_block GPT Partition Parsing Error) To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=UTF-8; format=flowed Hello Ryan, thank you for your interest in Genode. > I am not sure of what the stance is on AI generated code [...] This question was recently raised in the context of a pull request [1]. [1] https://codeberg.org/genodelabs/genode/pulls/5853 Citing my own comment from this issue: --- Genode is not open for AI-generated code contributions due to the legal uncertainties of such code. In order to incorporate code into genuine Genode components (those that are marked by the license headers as being part of Genode) we must ensure that such code does not violate rights of third parties. On this account, the Genode contributor's agreement [2] states "You certify and warrant that your Contributions to Genode Labs’s Products do not violate the intellectual property rights of third parties [...]". This cannot be assumed for code generated by AI models without legal records of their training material. As far as I know, AI service providers do not provide such evidence. [2] https://genode.org/community/gca.pdf I'm not a lawyer. But I consider learning from any source (book, teacher, experience, internet search engine, AI model) as fine as long as the information source is legal (think of trade secrets). Code generation is different matter. Legally, regardless of whether running the model locally or as a service, unless you created the model yourself, you cannot know from which data the model parameters had been derived. So one should assume the worst. Common sense. The obvious way to stay safe is to craft code by hand, driven by human intent. At the end of the day, someone has to assert responsibility, for both technical and legal risks. A maintainer becomes responsible for the code whenever accepting a contribution. Accepting the risks of AI-generated artifacts would be irresponsible for Genode Labs. Hence, we have to keep our code untainted. --- On a further personal note, as a matter of conduct, please keep in mind that the copy-pasting of text generated by an AI agent may be perceived as impolite. Best regards Norman -- Dr.-Ing. Norman Feske Genode Labs https://www.genode-labs.com · https://genode.org Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth ------------------------------ Subject: Digest Footer _______________________________________________ users mailing list -- [email protected] To unsubscribe send an email to [email protected] Archived at ${hyperkitty_url} ------------------------------ End of users Digest, Vol 97, Issue 5 ************************************ _______________________________________________ users mailing list -- [email protected] To unsubscribe send an email to [email protected] Archived at https://lists.genode.org/mailman3/hyperkitty/list/[email protected]/message/MVZ2LCHLFXVFLRNXGN7D45Y5OPLEJGVD/
