From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753948AbbLCUvb (ORCPT ); Thu, 3 Dec 2015 15:51:31 -0500 Received: from smtprelay0219.hostedemail.com ([216.40.44.219]:59556 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753795AbbLCUv3 (ORCPT ); Thu, 3 Dec 2015 15:51:29 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:965:967:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2525:2561:2564:2682:2685:2691:2828:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3354:3865:3866:3867:3868:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4390:5007:6117:6119:6261:7808:7903:8531:9025:10004:10400:10848:11026:11232:11658:11783:11914:12043:12048:12517:12519:12663:12740:13069:13141:13230:13311:13357:13894:14040:14659:21080:30054:30064:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:4,LUA_SUMMARY:none X-HE-Tag: lead49_80ddcdeb5ed5d X-Filterd-Recvd-Size: 3546 Message-ID: <1449175884.17296.2.camel@perches.com> Subject: Re: use-after-free in sctp_do_sm From: Joe Perches 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 Date: Thu, 03 Dec 2015 12:51:24 -0800 In-Reply-To: <5660A951.4000808@akamai.com> 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> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.2-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (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 evaluted, > > > > > > 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. > > > > > > > > https://lkml.org/lkml/2012/6/17/231 > > > > > > I don't see this in the tree. > > > > It never got applied. > > > > > Also maybe we should just convert > > > no_printk() to do what your 'eliminated_printk()'. > > > > Some of them at least. > > > > > So we can convert all users with this change? > > > > I don't think so, I think there are some > > function evaluation/side effects that are > > required.  I believe some do hardware I/O. > > > > It'd be good to at least isolate them. > > > > I'm not sure how to find them via some > > automated tool/mechanism though. > > > > I asked Julia Lawall about it once in this > > thread:  https://lkml.org/lkml/2014/12/3/696 > > > > 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.  It's very 1995. Try it and see what happens.