* [PATCH mini-os] Correct printf formatting for tpm_tis message. @ 2015-06-26 10:58 Ian Campbell 2015-06-26 11:06 ` [PATCH xen] stubdom: vtpmmgr: Correctly format size_t with %z when printing Ian Campbell 2015-07-02 0:21 ` [PATCH mini-os] Correct printf formatting for tpm_tis message Samuel Thibault 0 siblings, 2 replies; 7+ messages in thread From: Ian Campbell @ 2015-06-26 10:58 UTC (permalink / raw) To: minios-devel Cc: samuel.thibault, Daniel De Graaf, Thomas Leonard, Ian Campbell, xen-devel This is under #ifdef HAVE_LIBC so went unnoticed before. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- tpm_tis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpm_tis.c b/tpm_tis.c index 98fe837..475ac5d 100644 --- a/tpm_tis.c +++ b/tpm_tis.c @@ -1429,7 +1429,7 @@ struct tpm_chip* init_tpm2_tis(unsigned long baseaddr, int localities, unsigned /* Map the page in now */ if ((tpm->pages[i] = ioremap_nocache(addr, PAGE_SIZE)) == NULL) { - printk("Unable to map iomem page a address %p\n", addr); + printk("Unable to map iomem page a address %lx\n", addr); goto abort_egress; } -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH xen] stubdom: vtpmmgr: Correctly format size_t with %z when printing. 2015-06-26 10:58 [PATCH mini-os] Correct printf formatting for tpm_tis message Ian Campbell @ 2015-06-26 11:06 ` Ian Campbell 2015-07-02 0:23 ` Samuel Thibault 2015-07-02 0:21 ` [PATCH mini-os] Correct printf formatting for tpm_tis message Samuel Thibault 1 sibling, 1 reply; 7+ messages in thread From: Ian Campbell @ 2015-06-26 11:06 UTC (permalink / raw) To: xen-devel Cc: Thomas Leonard, Ian Campbell, Stefano Stabellini, minios-devel, samuel.thibault, Daniel De Graaf 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 <talex5@gmail.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> --- 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=%lu\n", sizeof(root1), sizeof(root1.v)); - printk(" itree: %lu; sector of %d: %lu\n", + printk(" root: %zu v=%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=%lu id=%lu md=%lu\n", + printk(" group: %zu v=%zu id=%zu md=%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(struct 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 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH xen] stubdom: vtpmmgr: Correctly format size_t with %z when printing. 2015-06-26 11:06 ` [PATCH xen] stubdom: vtpmmgr: Correctly format size_t with %z when printing Ian Campbell @ 2015-07-02 0:23 ` Samuel Thibault 2015-07-02 9:04 ` Ian Campbell 2015-07-03 10:36 ` Ian Campbell 0 siblings, 2 replies; 7+ messages in thread From: Samuel Thibault @ 2015-07-02 0:23 UTC (permalink / raw) To: Ian Campbell Cc: minios-devel, Daniel De Graaf, Stefano Stabellini, Thomas Leonard, xen-devel Ian Campbell, le Fri 26 Jun 2015 12:06:09 +0100, a écrit : > 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 <talex5@gmail.com> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov> > Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-By: Samuel Thibault <samuel.thibault@ens-lyon.org> (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=%lu\n", sizeof(root1), sizeof(root1.v)); > - printk(" itree: %lu; sector of %d: %lu\n", > + printk(" root: %zu v=%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=%lu id=%lu md=%lu\n", > + printk(" group: %zu v=%zu id=%zu md=%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(struct 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()) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH xen] stubdom: vtpmmgr: Correctly format size_t with %z when printing. 2015-07-02 0:23 ` Samuel Thibault @ 2015-07-02 9:04 ` Ian Campbell 2015-07-03 10:36 ` Ian Campbell 1 sibling, 0 replies; 7+ messages in thread From: Ian Campbell @ 2015-07-02 9:04 UTC (permalink / raw) To: Samuel Thibault Cc: minios-devel, Daniel De Graaf, xen-devel, Thomas Leonard, Stefano Stabellini On Thu, 2015-07-02 at 02:23 +0200, Samuel Thibault wrote: > Ian Campbell, le Fri 26 Jun 2015 12:06:09 +0100, a écrit : > > 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 <talex5@gmail.com> > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov> > > Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > > Acked-By: Samuel Thibault <samuel.thibault@ens-lyon.org> > > (after the 'z' modifier support is commited, of course) Er, yes, well spotted! > > --- > > 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=%lu\n", sizeof(root1), sizeof(root1.v)); > > - printk(" itree: %lu; sector of %d: %lu\n", > > + printk(" root: %zu v=%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=%lu id=%lu md=%lu\n", > > + printk(" group: %zu v=%zu id=%zu md=%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(struct 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 > > > _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH xen] stubdom: vtpmmgr: Correctly format size_t with %z when printing. 2015-07-02 0:23 ` Samuel Thibault 2015-07-02 9:04 ` Ian Campbell @ 2015-07-03 10:36 ` Ian Campbell 1 sibling, 0 replies; 7+ messages in thread From: Ian Campbell @ 2015-07-03 10:36 UTC (permalink / raw) To: Samuel Thibault Cc: minios-devel, Daniel De Graaf, xen-devel, Thomas Leonard, Stefano Stabellini On Thu, 2015-07-02 at 02:23 +0200, Samuel Thibault wrote: > Ian Campbell, le Fri 26 Jun 2015 12:06:09 +0100, a écrit : > > 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 <talex5@gmail.com> > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov> > > Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > > Acked-By: Samuel Thibault <samuel.thibault@ens-lyon.org> > > (after the 'z' modifier support is commited, of course) That happened, so I updated the Config.mk ref and committed, thanks. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH mini-os] Correct printf formatting for tpm_tis message. 2015-06-26 10:58 [PATCH mini-os] Correct printf formatting for tpm_tis message Ian Campbell 2015-06-26 11:06 ` [PATCH xen] stubdom: vtpmmgr: Correctly format size_t with %z when printing Ian Campbell @ 2015-07-02 0:21 ` Samuel Thibault 2015-07-03 9:29 ` Ian Campbell 1 sibling, 1 reply; 7+ messages in thread From: Samuel Thibault @ 2015-07-02 0:21 UTC (permalink / raw) To: Ian Campbell; +Cc: minios-devel, Daniel De Graaf, Thomas Leonard, xen-devel Ian Campbell, le Fri 26 Jun 2015 11:58:40 +0100, a écrit : > This is under #ifdef HAVE_LIBC so went unnoticed before. > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > --- > tpm_tis.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tpm_tis.c b/tpm_tis.c > index 98fe837..475ac5d 100644 > --- a/tpm_tis.c > +++ b/tpm_tis.c > @@ -1429,7 +1429,7 @@ struct tpm_chip* init_tpm2_tis(unsigned long baseaddr, int localities, unsigned > > /* Map the page in now */ > if ((tpm->pages[i] = ioremap_nocache(addr, PAGE_SIZE)) == NULL) { > - printk("Unable to map iomem page a address %p\n", addr); > + printk("Unable to map iomem page a address %lx\n", addr); > goto abort_egress; > } > > -- > 1.7.10.4 > -- Samuel <i8b4uUnderground> d-_-b <BonyNoMore> how u make that inverted b? <BonyNoMore> wait <BonyNoMore> never mind ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH mini-os] Correct printf formatting for tpm_tis message. 2015-07-02 0:21 ` [PATCH mini-os] Correct printf formatting for tpm_tis message Samuel Thibault @ 2015-07-03 9:29 ` Ian Campbell 0 siblings, 0 replies; 7+ messages in thread From: Ian Campbell @ 2015-07-03 9:29 UTC (permalink / raw) To: Samuel Thibault; +Cc: minios-devel, Daniel De Graaf, Thomas Leonard, xen-devel On Thu, 2015-07-02 at 02:21 +0200, Samuel Thibault wrote: > Ian Campbell, le Fri 26 Jun 2015 11:58:40 +0100, a écrit : > > This is under #ifdef HAVE_LIBC so went unnoticed before. > > > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Applied, thanks. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-03 10:36 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-06-26 10:58 [PATCH mini-os] Correct printf formatting for tpm_tis message Ian Campbell 2015-06-26 11:06 ` [PATCH xen] stubdom: vtpmmgr: Correctly format size_t with %z when printing Ian Campbell 2015-07-02 0:23 ` Samuel Thibault 2015-07-02 9:04 ` Ian Campbell 2015-07-03 10:36 ` Ian Campbell 2015-07-02 0:21 ` [PATCH mini-os] Correct printf formatting for tpm_tis message Samuel Thibault 2015-07-03 9:29 ` Ian Campbell
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.