Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755280AbdDRAHF (ORCPT ); Mon, 17 Apr 2017 20:07:05 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55326 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751720AbdDRAHD (ORCPT ); Mon, 17 Apr 2017 20:07:03 -0400 Date: Tue, 18 Apr 2017 10:06:00 +1000 From: Gavin Shan To: David Miller Cc: clg@kaod.org, gwshan@linux.vnet.ibm.com, joel@jms.id.au, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net/ncsi: fix checksum validation in response packet Reply-To: Gavin Shan References: <1492160197-13816-1-git-send-email-clg@kaod.org> <20170417.133619.1515025171498720534.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170417.133619.1515025171498720534.davem@davemloft.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-MML: disable x-cbid: 17041800-1617-0000-0000-000001C06EC4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17041800-1618-0000-0000-000047FFECF4 Message-Id: <20170418000600.GA4978@gwshan> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-17_20:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704170208 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 690 Lines: 20 On Mon, Apr 17, 2017 at 01:36:19PM -0400, David Miller wrote: >From: C?dric Le Goater >Date: Fri, 14 Apr 2017 10:56:37 +0200 > >> htonl was used instead of ntohl. Surely a typo. >> >> Signed-off-by: C?dric Le Goater > >I don't think so, "checksum" is of type "u32" thus is in host byte >order. Therefore "htonl()" is correct. > Yeah, "htonl()" is correct here. "*pchecksum" is in big-endian. I want to know how C?dric thinks it's a problem. I guess he might encounter the issue on the emulated NCSI channel by QEMU. On BCM5718 or BCM5719, the checksum in AEN and response packet are zero'd, meaning the software shouldn't validate it at all. Thanks, Gavin