Re: [PATCH 2/2] talitos: Freescale integrated security engine (SEC) driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2 Jun 2008 20:00:12 +0400
Evgeniy Polyakov <johnpol@xxxxxxxxxxx> wrote:

> On Mon, Jun 02, 2008 at 09:27:01AM -0500, Kim Phillips (kim.phillips@xxxxxxxxxxxxx) wrote:
> > > I meant descriptor hdr value accessed via it - can it be checked in
> > > tasklet under the lock and in submit path without? Can they correlate
> > > somehow?
> > 
> > I believe the check for a non-null request->desc (under lock) before
> > the hdr value is accessed ensures this doesn't happen.
> 
> But can it be changed? You write to it without lock, but read under the
> one (different for each channel though), so it attracted attention.

can you point where in the code your concern is?

desc is assigned under head lock and cleared under tail lock, both after
an smp_wmb.  hdr data is assigned before desc is written, and read
after desc is found to be !NULL (i.e, hdr access is governed by if
(desc)). head and tail indices get advanced each within their
corresponding locks.  So afaict there shouldn't be a case where data
pointed to by desc can be accessed by both the consumer and the
producer at any one point in time.  Does that help?

Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux