Subject: Re: VIA ACE patch
To: Daniel de Kok <danieldk@pobox.com>
From: Rui Paulo <rpaulo@fnop.net>
List: tech-crypto
Date: 01/12/2007 17:01:44
On 12 Jan 2007, at 16:44, Daniel de Kok wrote:

> Hi,
>
> I have mostly completed my port of the OpenBSD VIA ACE code, and I  
> have attached a patch. This area is pretty new to me, so please be  
> gentle.

Some comments:

+#if defined(I686_CPU)
+#ifdef VIA_PADLOCK
+	via_padlock_attach();
+#endif /* VIA_PADLOCK */
+#endif /* defined(I686_CPU) */

Why not:

#if defined(I686_CPU) && defined(VIA_PADLOCK)

---

  /*
+ * VIA "Nehemiah" MSRs
+ */
...
Maybe all these defines should be left padded?

---

In via_padlock_attach() there's a memory leak if (vp_sc->sc_cid < 0).

---

It would be great if you could replace bzero/bcopy by memset/memcpy  
(maybe that should be in KNF).

---

Good work!
--
Rui Paulo