Wayne Thornton created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1137
Project:Branches: wmthornton-dev/rtems:main to rtems/rtos/rtems:main Author: Wayne Thornton Assignee: Wayne Thornton ## Summary Following up on the discussion in Issue 5502 and our meeting from March 5th, I went ahead and put together the bare minimum skeleton API to handle the upcoming age-verification mandates in California, Colorado and elsewhere. I completely understand the points Kinsey, Joel, and Amar made in the issue thread. RTEMS is obviously not a general-purpose OS out of the box, we do not have an app store, and as Amar pointed out, downstream applications are ultimately just linked libraries. However, as I mentioned in the meeting, I am looking at this from a highly defensive compliance perspective. The lawmakers writing these statutes usually do not understand the distinction between embedded systems and interactive consumer platforms. The text is just vague enough that the project, or a downstream vendor building a consumer-oriented smart device on RTEMS, could get caught in a costly legal crossfire. To compromise between needing to be proactive about liability and keeping RTEMS lean for our standard use cases, this implementation is entirely optional. It does not compile into the core by default. A developer has to explicitly enable OPT_AGE_VERIFICATION in their waf config.ini to pull the API into the CPU kit. Technically, it just stores one of the four mandated age brackets in memory. Because we operate in a single address space, I wrapped the variable in a 32-bit aligned struct protected by memory canaries. If a rogue pointer or buffer overflow hits the adjacent memory, the getter function will catch the corrupted canaries, trip the stack bounds checker, and safely halt the system with a fatal error rather than pass bad state data to the application. The setter function also has a write-once lock so the age cannot be altered after the initial device setup. I also included a test suite under libtests to verify the locking mechanism and boundary rejections. ## Generative AI I used Gemini Pro to help figure out the exact syntax needed to properly wire the optional API and test program into the RTEMS 7 Waf build system using the YAML spec files. All the generated code was manually reviewed, compiled locally, and verified to pass on the SPARC/ERC32 SIS simulator. I have legal access to the Gemini Pro model and no copyrighted code was used. -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1137 You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
