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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ea8d860a0807261227w66e29978uecd12cf1fcb915d1@mail.gmail.com>
Date:	Sat, 26 Jul 2008 20:27:33 +0100
From:	"Marcin Obara" <marcin_obara@...rs.sourceforge.net>
To:	Valdis.Kletnieks@...edu
Cc:	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Linus Torvalds" <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, "Marcel Selhorst" <tpm@...horst.net>,
	"Kylene Jo Hall" <kjhall@...ibm.com>,
	tpmdd-devel@...ts.sourceforge.net
Subject: Re: [PATCH] 2.6.26-mmotm tpm-correct-tpm-timeouts-to-jiffies-conversion-d820-fix.patch

2008/7/26  <Valdis.Kletnieks@...edu>:
> +       if (chip->vendor.duration[TPM_SHORT] == 1)
> +               chip->vendor.duration[TPM_SHORT] *= 1000;
> +
>        chip->vendor.duration[TPM_MEDIUM] =
>            usecs_to_jiffies(be32_to_cpu
>                             (*((__be32 *) (data +


Value in  chip->vendor.duration[TPM_SHORT]  is in jiffies not in  milliseconds.
 (As I know it's not the same. Jiffy is in range 1-10 ms.)
I know the result may be the same, but it is unclear.

Maybe... value should be compared (to 1000) before conversion?
or...
If after conversion, there should be something like this:
       if (chip->vendor.duration[TPM_SHORT]  < (HZ/100))  /*  less
than 10ms ? */
               chip->vendor.duration[TPM_SHORT] = HZ;

What do you think?

Regards
Marcin
--
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