From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753620AbbKZWsC (ORCPT ); Thu, 26 Nov 2015 17:48:02 -0500 Received: from smtprelay0216.hostedemail.com ([216.40.44.216]:36871 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752850AbbKZWsA (ORCPT ); Thu, 26 Nov 2015 17:48:00 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 10,1,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3873:3874:4321:5007:6117:6261:7903:10007:10400:10848:11026:11232:11658:11914:12048:12114:12517:12519:12555:12740:13069:13161:13229:13311:13357:14096:14097:14659:21080:30012:30054:30064:30090: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:1:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: bun30_b4ab1fea870d X-Filterd-Recvd-Size: 2013 Message-ID: <1448578076.18647.37.camel@perches.com> Subject: Re: [PATCH] fix an endianness bug in ext4_encrypted_follow_link() From: Joe Perches To: Julia Lawall , Al Viro , lkp , Fengguang Wu Cc: "Theodore Ts'o" , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 26 Nov 2015 14:47:56 -0800 In-Reply-To: References: <20151126152728.GT22011@ZenIV.linux.org.uk> <1448566837.18647.16.camel@perches.com> <20151126210223.GV22011@ZenIV.linux.org.uk> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.16.5-1ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-11-26 at 22:28 +0100, Julia Lawall wrote: > On Thu, 26 Nov 2015, Al Viro wrote: > > On Thu, Nov 26, 2015 at 11:40:37AM -0800, Joe Perches wrote: > > (cc'ing Julia Lawall) > > > On Thu, 2015-11-26 at 15:27 +0000, Al Viro wrote: > > > applying le32_to_cpu() to 16bit value is a bad idea... > > Julia, perhaps you or your crew could produce a coccinelle test > > for this class of error? > What's wrong with something like make C=2 CF=-D__CHECK_ENDIAN__ fs/ext4/ ? > Worked just fine, TYVM - > sparse does locate them... Nothing at all. > As long as the code of interest is getting compiled in the current > configuration, relying on the compiler for this seems like a better choice. Sparse isn't the compiler, but that would be fine by me as long as something can catch them. The original commit (f348c252320b9) was from April. Isn't the kbuild robot using sparse and __CHECK_ENDIAN__?