Messages in this thread | | | Date | Tue, 3 Feb 2004 15:17:12 -0500 (EST) | From | James Morris <> | Subject | Re: [PATCH 2.6.1 -- take two] Add CRC32C chksums to crypto and lib routines |
| |
On Tue, 3 Feb 2004, Matt Mackall wrote:
> > >> +static inline void crypto_chksum_final(struct crypto_tfm *tfm, u32 *out) > > >> +{ > > >> + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CHKSUM); > > > > > > A lot of these BUG_ONs seem to be overkill. You're not going to get > > > here by someone accidentally misusing the interface. You can only get > > > here by some very willful abuse of the interface or by extremely > > > unlikely fandango on core, neither of which is worth trying to defend > > > against. > > > > That would be a worth changing in a clean-up pass over all of > > crypto, then. > > I'll do them if James has no objections. I've got a couple other > crypto bits queued.
The problem is that someone could make a programming mistake, not see any errors, and get bad crypto.
- James -- James Morris <jmorris@redhat.com>
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |