161 /*
162 * os_auto_flush -- check if platform supports auto flush for all regions
163 *
164 * Traverse "/sys/bus/nd/devices" path to find all the nvdimm regions,
165 * then for each region checks if "persistence_domain" file exists and
166 * contains "cpu_cache" string.
167 * If for any region "persistence_domain" entry does not exists, or its
168 * context is not as expected, assume eADR is not available on this platform.
169 */
That will open "." and PWD for a libvirt executed qemu will be nothing => "/"
Followed by "/sys/bus/nd/devices"
But from the code I see that it expects there to be symlinks.
We will need the patterns those will follow to add rules for those as well.
TODO:
1. silence access to "/"
2. allow enumeration (read only) of
/sys/bus/nd/devices r,
/sys/bus/nd/devices/* r,
3. find where the symlinks usually point to and add these
Can we find a way to only add these when pmem is actually used?
In that case we want to silence #2 as well, but allow it if used
On init amon other things libpmem will do:
161 /* nd/devices" path to find all the nvdimm regions, domain" file exists and domain" entry does not exists, or its
162 * os_auto_flush -- check if platform supports auto flush for all regions
163 *
164 * Traverse "/sys/bus/
165 * then for each region checks if "persistence_
166 * contains "cpu_cache" string.
167 * If for any region "persistence_
168 * context is not as expected, assume eADR is not available on this platform.
169 */
That will open "." and PWD for a libvirt executed qemu will be nothing => "/" nd/devices"
Followed by "/sys/bus/
But from the code I see that it expects there to be symlinks.
We will need the patterns those will follow to add rules for those as well.
TODO: bus/nd/ devices r, bus/nd/ devices/ * r,
1. silence access to "/"
2. allow enumeration (read only) of
/sys/
/sys/
3. find where the symlinks usually point to and add these
Can we find a way to only add these when pmem is actually used?
In that case we want to silence #2 as well, but allow it if used