]> xenbits.xensource.com Git - xen.git/commit
xsm/flask: adjust print messages to use %pd
authorDaniel P. Smith <dpsmith@apertussolutions.com>
Mon, 26 Sep 2022 09:14:19 +0000 (11:14 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 26 Sep 2022 09:14:19 +0000 (11:14 +0200)
commit6cecffc7a66b04742fcbaeca995f5b64b69ba55f
tree92fb4a7eff3e81e69c1a90d735c4a0c485f6a8a6
parentbebaf7c296518bf9cec24773c8da1e6823fff5fc
xsm/flask: adjust print messages to use %pd

Print messages from flask use an inconsistent format when printing the domain
id. When referencing system domains, the domain id is printed which is not
immediately identifiable. The %pd conversion specifier provides a consistent
and clear way to format for the domain id. In addition this will assist in
aligning FLASK with current hypervisor code practices.

While addressing the domain id formating, two related issues were addressed.
The first being that avc_printk() was not applying any conversion specifier
validation. To address this, the printf annotation was added to avc_printk() to
help ensure the correct types are passed to each conversion specifier. The second
was concern that source and target domains were being appropriately reported for
an AVC. This was addressed by simplifying the conditional logic.

Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
Reviewed-by: Henry Wang <Henry.Wang@arm.com>
Reviewed-by: Jason Andryuk <jandryuk@gmail.com>
xen/xsm/flask/avc.c
xen/xsm/flask/hooks.c