[yocto] [meta-security][PATCH 6/6] swtpm: update to tip

Patrick Ohly patrick.ohly at intel.com
Mon Jan 30 07:32:35 PST 2017


On Sun, 2017-01-29 at 09:12 -0800, Armin Kuster wrote:
> fix signed build issues
> 
> Signed-off-by: Armin Kuster <akuster808 at gmail.com>
> ---
>  recipes-tpm/swtpm/files/fix_lib_search_path.patch | 41 -------------------
>  recipes-tpm/swtpm/files/fix_signed_issue.patch    | 48 +++++++++++++++++++++++
>  recipes-tpm/swtpm/swtpm_1.0.bb                    | 18 +++++++--
>  3 files changed, 63 insertions(+), 44 deletions(-)
>  delete mode 100644 recipes-tpm/swtpm/files/fix_lib_search_path.patch
>  create mode 100644 recipes-tpm/swtpm/files/fix_signed_issue.patch
> 
> diff --git a/recipes-tpm/swtpm/files/fix_lib_search_path.patch b/recipes-tpm/swtpm/files/fix_lib_search_path.patch
> deleted file mode 100644
> index 015f418..0000000
> --- a/recipes-tpm/swtpm/files/fix_lib_search_path.patch
> +++ /dev/null

This patch is still needed when building swtpm-native. I'll add back a
version that applies to latest tip.

> diff --git a/recipes-tpm/swtpm/files/fix_signed_issue.patch b/recipes-tpm/swtpm/files/fix_signed_issue.patch
> new file mode 100644
> index 0000000..427df62
> --- /dev/null
> +++ b/recipes-tpm/swtpm/files/fix_signed_issue.patch
> @@ -0,0 +1,48 @@
> +Upstream-Status: Pending
> +Signed-off-by Armin Kuster <akuster808 at gmail>

[...]

> +Index: git/src/swtpm_ioctl/tpm_ioctl.c
> +===================================================================
> +--- git.orig/src/swtpm_ioctl/tpm_ioctl.c
> ++++ git/src/swtpm_ioctl/tpm_ioctl.c
> +@@ -303,7 +303,7 @@ static int do_save_state_blob(int fd, bo
[...]
> +         /* no tpm_result here */
> +-        printf("ptm capability is 0x%lx\n", (uint64_t)devtoh64(is_chardev, cap));
> ++        printf("ptm capability is 0x%llx\n", (uint64_t)devtoh64(is_chardev, cap));

This is causing an error when building for x86-64:

tpm_ioctl.c:866:9: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=]
|          printf("ptm capability is 0x%llx\n", (uint64_t)devtoh64(is_chardev, cap));
|          ^
| cc1: all warnings being treated as errors

If you want, I can fix it as part of my upcoming patches with:

printf("ptm capability is 0x%llx\n", (long long unsigned)devtoh64(is_chardev, cap));

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.






More information about the yocto mailing list