From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: kernel-hardening@lists.openwall.com Message-ID: <1479228602.4622.64.camel@redhat.com> From: Rik van Riel Date: Tue, 15 Nov 2016 11:50:02 -0500 In-Reply-To: References: <20161110203749.GV3117@twins.programming.kicks-ass.net> <20161110204838.GE17134@arm.com> <20161110211310.GX3117@twins.programming.kicks-ass.net> <20161110222744.GD8086@kroah.com> <20161110233835.GA23164@kroah.com> <20161111174630.GO3117@twins.programming.kicks-ass.net> <20161111201704.GQ3117@twins.programming.kicks-ass.net> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-faNltuRSb4IoTFU/TIWw" Mime-Version: 1.0 Subject: Re: [kernel-hardening] Re: [RFC v4 PATCH 00/13] HARDENED_ATOMIC To: kernel-hardening@lists.openwall.com, Peter Zijlstra Cc: Will Deacon , Greg KH , David Windsor , Elena Reshetova , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" List-ID: --=-faNltuRSb4IoTFU/TIWw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2016-11-14 at 12:31 -0800, Kees Cook wrote: > On Fri, Nov 11, 2016 at 12:17 PM, Peter Zijlstra g> wrote: > >=20 > > On Fri, Nov 11, 2016 at 10:04:42AM -0800, Kees Cook wrote: > >=20 > > >=20 > > > I'm totally open about how to get there, but things can't just be > > > opt-in. > > There really is no alternative. > I realize you feel that way, but if we can find a way to squeeze > mistakes down to impossible or very small, that has a strong effect > on > the future of avoiding exploitation of these kinds of things. >=20 > >=20 > > refcount_t; should only have: inc, inc_not_zero, dec_and_test > Sounds good. Two questions remain: >=20 > - how to deal with existing refcounting atomic_t users that want _add > and _sub? > - keeping this fast enough that it can be used even in very sensitive > places (net, fs, etc). >=20 > >=20 > > stats_t; should only have: add,sub > Seems right, though why not inc/dec? And shouldn't it have a _read of > some kind? >=20 > Keeping the implementation details of refcount_t and stats_t opaque > to > the users should discourage misuse... I suspect a lack of inc_not_zero and dec_and_test would be the biggest things discouraging misuse of stats_t for reference counting :) --=20 All rights reversed --=-faNltuRSb4IoTFU/TIWw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJYKzy7AAoJEM553pKExN6DSrUH/28cvAWXBDujsDxQOCeNGhEx ScdGfzRBN9o12jPNmPPzwHj5dQYn98PX06vUoV8ZYFWpPIK1Zk0/cszNsAySjeuO WimIcvYEXyVi2N+qa7Zib2rXX07JhCC/QG6yl1C1JWHOp8ZtsFMfDXfpe8gRoFr0 2oGQz7o0qng56Z5tCdrGH/qFnE21pJz1oLUzLQQBweiihpWkh0HRoHAnY1mHQGWv h4ngdp1ilm3lBsrnxzHxWObUh+PSZdm/a1MpD02jM2ZslozuuwT4ZYUHyhPiMfD9 vCNb82n7ucichs9wXm7nuPQ8l/p6o9qMCV/cDvXrQq8YbNHyn2Uyi5zx2xOdYCA= =ELHd -----END PGP SIGNATURE----- --=-faNltuRSb4IoTFU/TIWw--