From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: [PATCH xen] stubdom: vtpmmgr: Correctly format size_t with %z when printing. Date: Thu, 2 Jul 2015 02:23:35 +0200 Message-ID: <20150702002335.GZ3245@type.home> References: <1435316320-1811-1-git-send-email-ian.campbell@citrix.com> <1435316769-5784-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <1435316769-5784-1-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: minios-devel@lists.xenproject.org, Daniel De Graaf , Stefano Stabellini , Thomas Leonard , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Ian Campbell, le Fri 26 Jun 2015 12:06:09 +0100, a =E9crit : > Also contains a fix from Thomas Leonard (to use %u for "4 + 32", not > %lu) previously posted as part of "mini-os: enable compiler check for > printk format types" but with mini-os now having been split a separate > repo most of that change has been applied there. > = > This fixes the 32-bit build with updated mini-os which includes format > string checking. > = > Signed-off-by: Thomas Leonard > Signed-off-by: Ian Campbell > Cc: Daniel De Graaf > Cc: Stefano Stabellini Acked-By: Samuel Thibault (after the 'z' modifier support is commited, of course) > --- > I intend to fold in an update to MINIOS_UPSTREAM_REVISION upon commit > to pull in the updated mini-os plus the "Correct printf formatting for > tpm_tis message." patch I've just posted. > --- > stubdom/vtpmmgr/disk_read.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > = > diff --git a/stubdom/vtpmmgr/disk_read.c b/stubdom/vtpmmgr/disk_read.c > index e9dc20f..944d3ff 100644 > --- a/stubdom/vtpmmgr/disk_read.c > +++ b/stubdom/vtpmmgr/disk_read.c > @@ -548,18 +548,18 @@ int vtpm_load_disk(void) > TPM_read_pcrs(); > = > printk("TPM Manager - disk format %d\n", TPM_MGR_VERSION); > - printk(" root seal: %lu; sector of %d: %lu\n", > + printk(" root seal: %zu; sector of %d: %zu\n", > sizeof(struct disk_root_sealed_data), SEALS_PER_ROOT_SEAL_LIST, sizeof= (struct disk_seal_list)); > - printk(" root: %lu v=3D%lu\n", sizeof(root1), sizeof(root1.v)); > - printk(" itree: %lu; sector of %d: %lu\n", > + printk(" root: %zu v=3D%zu\n", sizeof(root1), sizeof(root1.v)); > + printk(" itree: %u; sector of %d: %zu\n", > 4 + 32, NR_ENTRIES_PER_ITREE, sizeof(struct disk_itree_sector)); > - printk(" group: %lu v=3D%lu id=3D%lu md=3D%lu\n", > + printk(" group: %zu v=3D%zu id=3D%zu md=3D%zu\n", > sizeof(struct disk_group_sector), sizeof(struct disk_group_sector_mac3= _area), > sizeof(struct group_id_data), sizeof(struct group_details)); > - printk(" group seal: %lu; %d in parent: %lu; sector of %d: %lu\n", > + printk(" group seal: %zu; %d in parent: %zu; sector of %d: %zu\n", > sizeof(struct disk_group_sealed_data), NR_SEALS_PER_GROUP, sizeof(stru= ct disk_group_boot_config_list), > SEALS_PER_GROUP_SEAL_LIST, sizeof(struct disk_group_seal_list)); > - printk(" vtpm: %lu+%lu; sector of %d: %lu\n", > + printk(" vtpm: %zu+%zu; sector of %d: %zu\n", > sizeof(struct disk_vtpm_plain), sizeof(struct disk_vtpm_secret), > VTPMS_PER_SECTOR, sizeof(struct disk_vtpm_sector)); > = > -- = > 1.7.10.4 > = -- = Samuel /* Amuse the user. */ printk( " \\|/ ____ \\|/\n" " \"@'/ ,. \\`@\"\n" " /_| \\__/ |_\\\n" " \\__U_/\n"); (From linux/arch/sparc/kernel/traps.c:die_if_kernel())