pytorch / cpuinfo

CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)
BSD 2-Clause "Simplified" License
962 stars 306 forks source link

Add CPUINFO_AVOID_SELINUX_VIOLATIONS to ARM parser #242

Open prashanthswami opened 2 months ago

prashanthswami commented 2 months ago

For Android ARM builds, we previously introduced parsing of some non-standard properties:

In this context, 'non-standard' refers to properties that are not supported by all Android devices and in particular, are not specified as part of any domain in Android's platform sepolicy. As a result, processes that contain the cpuinfo library will generate SELinux denials until the system is modified to allow access to these properties, even though they are not valid on these systems.

To avoid breaking existing behavior, introduce a negative-flag that allows users to compile out this behavior.