From: Joe Perches Date: Thu, 03 Dec 2015 20:51:24 +0000 Subject: Re: use-after-free in sctp_do_sm Message-Id: <1449175884.17296.2.camel@perches.com> List-Id: References: <20151203130525.GB4164@mrl.redhat.com> <566098BD.6010803@akamai.com> <1449172984.12092.0.camel@perches.com> <5660A1A7.3080301@akamai.com> <1449174246.12092.8.camel@perches.com> <5660A951.4000808@akamai.com> In-Reply-To: <5660A951.4000808@akamai.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Jason Baron , Aaron Conole , Dmitry Vyukov , Andrew Morton , LKML Cc: Eric Dumazet , syzkaller , Vladislav Yasevich , linux-sctp@vger.kernel.org, netdev , Kostya Serebryany , Alexander Potapenko , Sasha Levin (adding lkml as this is likely better discussed there) On Thu, 2015-12-03 at 15:42 -0500, Jason Baron wrote: > On 12/03/2015 03:24 PM, Joe Perches wrote: > > On Thu, 2015-12-03 at 15:10 -0500, Jason Baron wrote: > > > On 12/03/2015 03:03 PM, Joe Perches wrote: > > > > On Thu, 2015-12-03 at 14:32 -0500, Jason Baron wrote: > > > > > On 12/03/2015 01:52 PM, Aaron Conole wrote: > > > > > > I think that as a minimum, the following patch should be evalut= ed, > > > > > > but am unsure to whom I should submit it (after I test): > > > > [] > > > > > Agreed - the intention here is certainly to have no side effects.= It > > > > > looks like 'no_printk()' is used in quite a few other places that= would > > > > > benefit from this change. So we probably want a generic > > > > > 'really_no_printk()' macro. > > > >=20 > > > > https://lkml.org/lkml/2012/6/17/231 > > >=20 > > > I don't see this in the tree. > >=20 > > It never got applied. > >=20 > > > Also maybe we should just convert > > > no_printk() to do what your 'eliminated_printk()'. > >=20 > > Some of them at least. > >=20 > > > So we can convert all users with this change? > >=20 > > I don't think so, I think there are some > > function evaluation/side effects that are > > required.=A0=A0I believe some do hardware I/O. > >=20 > > It'd be good to at least isolate them. > >=20 > > I'm not sure how to find them via some > > automated tool/mechanism though. > >=20 > > I asked Julia Lawall about it once in this > > thread:=A0=A0https://lkml.org/lkml/2014/12/3/696 > >=20 >=20 > Seems rather fragile to have side effects that we rely > upon hidden in a printk(). Yup. > Just convert them and see what breaks :) I appreciate your optimism. =A0It's very 1995. Try it and see what happens.