lkml.org 
[lkml]   [2004]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.125 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site