lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Jul 2015 23:08:00 +0200
From:	Peter Hüwe <PeterHuewe@....de>
To:	"Hon Ching(Vicky) Lo" <honclo@...ux.vnet.ibm.com>
Cc:	tpmdd-devel@...ts.sourceforge.net,
	Ashley Lai <ashley@...leylai.com>,
	Vicky Lo <honclo2014@...il.com>, linux-kernel@...r.kernel.org,
	Joy Latten <jmlatten@...ux.vnet.ibm.com>
Subject: Re: [PATCH v4 1/2] vTPM: support little endian guests

Hi Vicky,

sorry for the late reply


> This patch makes the code endianness independent. We defined a
> macro do_endian_conversion to apply endianness to raw integers
> in the event entries so that they will be displayed properly.
> tpm_binary_bios_measurements_show() is modified for the display.
> 
> Signed-off-by: Hon Ching(Vicky) Lo <honclo@...ux.vnet.ibm.com>
> Signed-off-by: Joy Latten <jmlatten@...ux.vnet.ibm.com>

> b/drivers/char/tpm/tpm_eventlog.h index e7da086..267bfbd 100644
> --- a/drivers/char/tpm/tpm_eventlog.h
> +++ b/drivers/char/tpm/tpm_eventlog.h
> @@ -6,6 +6,12 @@
>  #define MAX_TEXT_EVENT		1000	/* Max event string length */
>  #define ACPI_TCPA_SIG		"TCPA"	/* 0x41504354 /'TCPA' */
> 
> +#ifdef CONFIG_PPC64
> +#define do_endian_conversion(x) be32_to_cpu(x)
> +#else
> +#define do_endian_conversion(x) x
> +#endif


Why is this macro needed?
shouldn't the be32_to_cpu macro already do correct thing?
Or am I missing something here?


Thanks,
Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ