Skip to content

Add SElinux policy for NHX test app#1667

Merged
ricardosalveti merged 1 commit intoqualcomm-linux:masterfrom
rohibira-qipl:camera_upstream
Mar 26, 2026
Merged

Add SElinux policy for NHX test app#1667
ricardosalveti merged 1 commit intoqualcomm-linux:masterfrom
rohibira-qipl:camera_upstream

Conversation

@rohibira-qipl
Copy link
Copy Markdown
Contributor

Added a patch implementing SELinux policy for nhx.sh and nativehaltest camera test app.

@ricardosalveti
Copy link
Copy Markdown
Contributor

No commit message, not using your actual name in the commit and sign-off-by, no description or justification for the change, etc.

Comment thread dynamic-layers/selinux/recipes-security/refpolicy/refpolicy-targeted_git.bbappend Outdated
@ricardosalveti
Copy link
Copy Markdown
Contributor

Also please follow the commit message pattern we use in this repository, check with git log.

@rohibira-qipl rohibira-qipl force-pushed the camera_upstream branch 2 times, most recently from b6d5732 to 27bbc65 Compare March 9, 2026 09:30
Date: Wed, 25 Feb 2026 22:01:44 +0530
Subject: [PATCH] Add SELinux policy for nhx.sh

This adds a new policy module for the nativehaltest camera test application.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obvious. Anything more specific to say?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added detailed commit message.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the patch wasn't updated.

Copy link
Copy Markdown
Contributor

@lumag lumag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tools are part of the vendor-specific nativehaltest suite located
in 'vendor/qcom/proprietary/'

-ENOSUCHDIR

This patch adds SELinux policy rules to support Qualcomm's proprietary

Don't describe patch contents. Start commit messages from the description of the issue you are solving. What does not work and why?

@github-actions
Copy link
Copy Markdown

Test run workflow

Test jobs for commit f382c2f

Test dragonboard-820c qcs615-adp-air qcs6490 qcs8300 qcs9100 qcs9100-rb8 qrb2210-rb1
boot pass pass pass pass pass pass pass

All jobs summary

Job ID Device State Health
160789 qcs615-adp-air Finished Complete
160793 qcs615-adp-air Finished Complete
160809 dragonboard-820c Finished Complete
160799 qcs6490 Finished Complete
160800 qcs615-adp-air Finished Complete
160813 qcs615-adp-air Finished Complete
160795 qcs9100 Finished Complete
160788 dragonboard-820c Finished Complete
160811 qcs9100 Finished Complete
160787 qcs9100-rb8 Finished Complete
160791 qcs6490 Finished Complete
160796 qcs8300 Finished Complete
160790 qcs6490 Finished Complete
160797 qrb2210-rb1 Finished Complete
160802 qcs9100-rb8 Finished Complete
160805 dragonboard-820c Finished Complete
160807 qrb2210-rb1 Finished Complete
160806 qcs8300 Finished Complete
160794 qcs9100-rb8 Finished Incomplete
160808 qcs9100 Finished Complete
160801 qcs8300 Finished Complete
160804 qcs9100 Finished Complete
160803 qcs6490 Finished Complete
160812 dragonboard-820c Finished Complete
160792 qrb2210-rb1 Finished Complete
160798 qrb2210-rb1 Finished Complete
160810 qcs9100-rb8 Finished Complete
160786 qcs8300 Finished Complete

@test-reporting-app
Copy link
Copy Markdown

test-reporting-app Bot commented Mar 16, 2026

Test Results

 28 files  ±0   28 suites  ±0   1h 5m 10s ⏱️ + 5m 3s
 13 tests ±0    9 ✅ +1  0 💤 ±0  4 ❌  - 1 
221 runs   - 1  217 ✅ ±0  0 💤 ±0  4 ❌  - 1 

For more details on these failures, see this check.

Results for commit b0d61d3. ± Comparison against base commit fd0469e.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
lava ‑ fastboot-boot
lava ‑ minimal-boot

♻️ This comment has been updated with latest results.

@rohibira-qipl rohibira-qipl requested a review from lumag March 18, 2026 08:10
@ricardosalveti
Copy link
Copy Markdown
Contributor

Please rebase to fix the conflict with master.

The proprietary camera testing script 'nhx.sh' currently executes in the
generic 'initrc_t' domain. This configuration lacks proper process
isolation and fails to define the specific permissions required
by the 'nativehaltest' application it launches.

Define a new policy module 'qcom_nhx' to transition these tools into
their own confined domains:
- qcom_nhx_launcher_t: For 'nhx.sh', allowing it to read
  /sys/devices/soc0/soc_id for SoC detection.
- qcom_nhx_t: For 'nativehaltest', granting access to the CamX framework,
  DMA, FastRPC, V4L video nodes, and camera cache directories.

These tools are installed to /usr/bin/ and depends
on the closed-source CamX framework. As such, this policy is inappropriate
for upstream submission.

Signed-off-by: Rohit Biradar <rohibira@qti.qualcomm.com>
@github-actions
Copy link
Copy Markdown

Test run workflow

Test jobs for commit b0d61d3

Test dragonboard-820c qcs615-adp-air qcs6490 qcs8300 qcs9100 qcs9100-rb8 qrb2210-rb1
boot pass pass pass pass pass pass pass

All jobs summary

Job ID Device State Health
165541 qcs8300 Finished Complete
165542 qrb2210-rb1 Finished Complete
165521 qcs9100-rb8 Finished Complete
165525 qcs615-adp-air Finished Complete
165520 qcs9100-rb8 Finished Complete
165528 qcs615-adp-air Finished Complete
165540 dragonboard-820c Finished Complete
165529 qcs9100 Finished Complete
165536 qcs615-adp-air Finished Complete
165546 qrb2210-rb1 Finished Complete
165534 dragonboard-820c Finished Complete
165531 qrb2210-rb1 Finished Complete
165527 qcs6490 Finished Complete
165535 qcs6490 Finished Complete
165519 qcs8300 Finished Complete
165523 qcs9100 Finished Complete
165530 qcs9100-rb8 Finished Incomplete
165532 qcs8300 Finished Complete
165522 qcs615-adp-air Finished Complete
165544 dragonboard-820c Finished Complete
165537 qcs8300 Finished Complete
165538 qcs6490 Finished Complete
165533 qcs9100 Finished Complete
165539 dragonboard-820c Finished Complete
165545 qcs6490 Finished Complete
165543 qrb2210-rb1 Finished Complete
165547 qcs9100-rb8 Finished Complete
165524 qcs9100 Finished Complete

@ricardosalveti ricardosalveti disabled auto-merge March 26, 2026 02:12
@ricardosalveti ricardosalveti merged commit 3d14d26 into qualcomm-linux:master Mar 26, 2026
364 of 367 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants