From nobody Sat May 18 09:01:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass header.i=dpsmith@apertussolutions.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=apertussolutions.com) ARC-Seal: i=2; a=rsa-sha256; t=1662717067; cv=pass; d=zohomail.com; s=zohoarc; b=QjqQjUYTNhpCKlb5fWF8/5VitfonIGz8GlTakCljgmr49NstPGmjCfujwWj5bujOFt2br/kGN/FNxKf1wFdDKJ19deG66tS/6IjTy5UTSHTO62hxsAUoxLLiEOJZvEg0YKacSNXHKX+G5ZqoDSze7CFwYDraHHPFBCgwG/9VSeQ= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662717067; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Buqqd0mdEOPtGi9ODN4NezM77ChBZhiRDygmgFSnS3M=; b=aKxXPCjLFNOAligCMpIy3U1knrJ/BbYMQTeBUtHohB1hAb45lgWtFvIP6+V2Ip4A8p65Iarg+mk++8Old2IOj0jPesyajf8304kuz3F6k1LCL8O65pIWZBbFusd5qADSEipgxJPMHVX4u2D502BxKwTqgwrIdo98zbDGmAQsf+4= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass header.i=dpsmith@apertussolutions.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=apertussolutions.com) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1662717066937313.24591917507894; Fri, 9 Sep 2022 02:51:06 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.404084.646410 (Exim 4.92) (envelope-from ) id 1oWaea-0002Td-Q2; Fri, 09 Sep 2022 09:50:28 +0000 Received: by outflank-mailman (output) from mailman id 404084.646410; Fri, 09 Sep 2022 09:50:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oWaea-0002TW-Mg; Fri, 09 Sep 2022 09:50:28 +0000 Received: by outflank-mailman (input) for mailman id 404084; Fri, 09 Sep 2022 09:50:28 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oWaea-0002TQ-05 for xen-devel@lists.xenproject.org; Fri, 09 Sep 2022 09:50:28 +0000 Received: from sender4-of-o51.zoho.com (sender4-of-o51.zoho.com [136.143.188.51]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ca8ce286-3024-11ed-9760-273f2230c3a0; Fri, 09 Sep 2022 11:50:11 +0200 (CEST) Received: from sisyou.hme. (static-72-81-132-2.bltmmd.fios.verizon.net [72.81.132.2]) by mx.zohomail.com with SMTPS id 1662717021047525.9884923263767; Fri, 9 Sep 2022 02:50:21 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ca8ce286-3024-11ed-9760-273f2230c3a0 ARC-Seal: i=1; a=rsa-sha256; t=1662717023; cv=none; d=zohomail.com; s=zohoarc; b=T2pjoDop4PScgy0bhPYHoRNazQyBfgBYg10Rp1CLOyyQ2hJkVtscy6Il7y/p8AxZUhLbJogiF2pzQjD7GDwRJmQZimxHnjUGeI6u9d0StTcYNHizzrQfqciT+f8pqq29kp7Mow5dQ5wOuVqXxFjX8GIx0ZkBUbgSqOne6gAkvRw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662717023; h=Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=Buqqd0mdEOPtGi9ODN4NezM77ChBZhiRDygmgFSnS3M=; b=K1FZMUjK2zPV50956dCMlVb3X0c9JY76SH5ocqRiK13nS13CQq9unNm5imOIuecIbdy52oywjSqZ+rSEp3axiSDlZr+UDMYxsm8oHDpVfwT6qcJYuriWazASlx7JJ7LSYTyGEaN7Mlh6pUtc1kIAuXaCaiy55dXA6x+ILHt/xAQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@apertussolutions.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1662717022; s=zoho; d=apertussolutions.com; i=dpsmith@apertussolutions.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=Buqqd0mdEOPtGi9ODN4NezM77ChBZhiRDygmgFSnS3M=; b=S7cevCpTAEdoYNTgJliMh7BqwHPa0hA9aXSClVv08Ex9aHiQInar+X8t5y0+Rxv6 FnhDJpdfax3AksAWnyGmccNL6Z7uM0AdTh+3MdAah8bXS8zQJv6b28neYsOXPpBw2bf I5g0eH8O1HcBs+bxunY4tRSzD+pL0OPh6hM6IvmE= From: "Daniel P. Smith" To: xen-devel@lists.xenproject.org Cc: "Daniel P. Smith" , jandryuk@gmail.com Subject: [PATCH] xsm/flask: adjust print messages to use %pd Date: Fri, 9 Sep 2022 05:50:12 -0400 Message-Id: <20220909095012.4251-1-dpsmith@apertussolutions.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-ZohoMail-DKIM: pass (identity dpsmith@apertussolutions.com) X-ZM-MESSAGEID: 1662717067883100001 Content-Type: text/plain; charset="utf-8" Print messages from flask use an inconsistent format when printing the doma= in id. The %pd conversion specifier provides a consistent way to format for the domain id and aligns with the rest of the hypervisor code. Signed-off-by: Daniel P. Smith Reviewed-by: Henry Wang --- xen/xsm/flask/avc.c | 8 ++++---- xen/xsm/flask/hooks.c | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/xen/xsm/flask/avc.c b/xen/xsm/flask/avc.c index 4a75ec97e2..4a86681c81 100644 --- a/xen/xsm/flask/avc.c +++ b/xen/xsm/flask/avc.c @@ -566,14 +566,14 @@ void avc_audit(u32 ssid, u32 tsid, u16 tclass, u32 re= quested, if ( a && (a->sdom || a->tdom) ) { if ( a->sdom && a->tdom && a->sdom !=3D a->tdom ) - avc_printk(&buf, "domid=3D%d target=3D%d ", a->sdom->domain_id= , a->tdom->domain_id); + avc_printk(&buf, "source=3D%pd target=3D%dp ", a->sdom, a->tdo= m); else if ( a->sdom ) - avc_printk(&buf, "domid=3D%d ", a->sdom->domain_id); + avc_printk(&buf, "source=3D%pd ", a->sdom); else - avc_printk(&buf, "target=3D%d ", a->tdom->domain_id); + avc_printk(&buf, "target=3D%pd ", a->tdom); } else if ( cdom ) - avc_printk(&buf, "domid=3D%d ", cdom->domain_id); + avc_printk(&buf, "current=3D%pd ", cdom); switch ( a ? a->type : 0 ) { case AVC_AUDIT_DATA_DEV: avc_printk(&buf, "device=3D%#lx ", a->device); diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index 8bd56644ef..a79281bdb0 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -281,8 +281,7 @@ static int cf_check flask_evtchn_interdomain( rc =3D security_transition_sid(sid1, sid2, SECCLASS_EVENT, &newsid); if ( rc ) { - printk("security_transition_sid failed, rc=3D%d, Dom%d\n", - -rc, d2->domain_id); + printk("security_transition_sid failed, rc=3D%d, %pd\n", -rc, d2); return rc; } =20 --=20 2.20.1