UART Changes#
Fine-grained Access Control Using Custom Abilities for UART Resource Manager#
Target Changes |
Backward Compatible |
Platform |
OS |
|---|---|---|---|
In release 7.2.6.0, applications that access UART devnodes must be
granted the required
Without the required abilities, Each UART devnode requires
For example, for
|
No |
NSR, SR |
QNX only |
Migration Path
Orin to Thor
Thor to Thor
Migration Release Path
7.2.5.0 to 7.2.6.0
Migration Rationale
This change satisfies fine-grained access permission requirements
(DOSMAIN-REQ-213) for UART. Customers must update the launch configuration,
and safety builds must also update abilities.txt, before using UART
devnodes in release 7.2.6.0.
Steps to Migrate
Identify every process that accesses UART devnodes directly (for example,
/dev/ser10).For each UART devnode the process must use, determine the required
nvser/portability values from the devnode index and operation codes listed above. Grant only the abilities needed (read, write, and/or configuration).Update the security policy (
abilities.txt) for safety builds.Safety builds (SR)
All UART devnodes that a process accesses must be specified with the
nvser/portability inabilities.txt. A process can only access UART devnodes listed in itsallow <type> self:abilityblock.For example, to grant read, write, and configuration access to
/dev/ser10:allow my_uart_app_t self:ability { noinherit unlock nonroot pathspace public_channel # /dev/ser10 — read, write, and configuration nvser/port:0xA01-0xA06 };To grant read-only access to
/dev/ser10:allow my_uart_app_t self:ability { noinherit unlock nonroot pathspace public_channel # /dev/ser10 — read only nvser/port:0xA01 };The ability can be specified as a single value or a range. Repeat the entry for each additional UART devnode the process must access.
Update the process launch configuration.
Safety builds (SR)
Launch the process with
--secpol-typeset to the security policy type defined inabilities.txt.iolaunchergrants the abilities from that policy type, includingnvser/port.For example, for a process that accesses
/dev/ser10and uses themy_uart_app_tsecurity policy type:iolauncher --secpol-type my_uart_app_t -U <uid>:<gid>,... <application>
Add
--secpol-typeto the existingiolauncherlaunch command for that process. Keep all other launch options unchanged.Standard builds (NSR)
Grant the required
nvser/portabilities directly in theiolaunchercommand. Add a new-A nonroot,allow,able=nvser/port:...option to the existing launch command. Keep all other launch options unchanged.For
/dev/ser10, add thenvser/portability for the access required by the application. For example, to grant read, write, and configuration access to/dev/ser10:iolauncher -U <uid>:<gid>,... \ -A nonroot,allow,able=nvser/port:0xA01-0xA06 \ <application>
Append the
nvser/port-Aoption alongside any existing-Aoptions in the launch command. The ability can be specified as a single value or a range. Replace<uid>:<gid>and<application>with the values from your launch configuration.Rebuild and deploy the updated IFS image. For safety builds, also rebuild and deploy the updated security policy.
Revalidate UART access flows. Confirm that:
Processes with the required abilities can open, read, write, and configure the intended UART devnodes.
Processes without the required abilities receive permission denied when attempting the corresponding operation. For example, if an application lacks read permission for
/dev/ser10(nvser/port:0xA01), aread()on that device fails.
For additional information about the QNX serial driver and launch configuration, refer to the NVIDIA DriveOS SDK Developer Guide.