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] [day] [month] [year] [list]
Date:	Sat, 09 Feb 2008 05:16:14 +1100
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	kyle@...fetthome.net (Kyle Moffett)
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	davem@...emloft.net
Subject: Re: [NET/IPv6] Race condition with flow_cache_genid?

Kyle Moffett <kyle@...fetthome.net> wrote:
>
> Basically either there is some missing locking here or it does not
> need to be "atomic_t".  Judging from the way it *appears* to be used
> to check if cache entries are up-to-date with the latest changes in
> policy, I would guess the former.

You're right that it doesn't really have to be an atomic since
all the writers are from xfrm currently.  However, the fact that
it is atomic is used by the current code since sometimes they
increment the value without holding the xfrm policy lock.

Yes it is racy but that is fine for the purpose that this variable
serves.  All it does is to make sure that extant flow objects get
killed at some point after the increment.  There is absolutely no
requirement that the killing be immediate or synchronised.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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