Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp94643pxb; Mon, 2 Nov 2020 15:07:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxStDHHqNm9OxtpDueNVSDQGwLMsTPFmxONDQ92xe8WaCYWyN79UDgk1Hoyi2fZa1PFvMMY X-Received: by 2002:a17:906:ca81:: with SMTP id js1mr12586499ejb.426.1604358430349; Mon, 02 Nov 2020 15:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604358430; cv=none; d=google.com; s=arc-20160816; b=yOiYuiBDsZ4ZyTrVkpZ476yYz3DDI3y+PQs1yIsvlLSjTSB7ASrZor91ntoafib15e dNwgtIJEZCgJGwSoaNRUub8UEoMzD13bOcflJ5IzYZ3Ay2m4MsbzXgGv2Y/YxWeU7f8q nJZbTN0bNPSBx3Kmbwv1VFoBzDZnaTrOKxpxCvOzaKxWJTHpKxBnx7Mmyl3LChwU1Bvt B/ZToUTSQftAsYtdFHlb5c7zaO1uza5neUk1cn3aVmKljOCy5VwKsthZLa3dcZ9VDiuM v3aRdMzWU5NWlPAn1WUHwrNyTQ41O6UYFIdjllQQuAvlkX72JTQ57FfGYHOAI5hC/9xv p4ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=0ib9oqgsiebtJYZNy2t1hsogcg0LqbqlIAYocZfCBA4=; b=HO9J1ZsJPiI3EFut9zzZgkmLOAYSnbw+EiDukb1iA9vuwCbR6Tm52Ql1XR4I2CqLSO i4npRb973yh9AdhiUpf97XUDAKV52vDj9ysEMrC7UK6UjSbc56YNG3TLHpvy6uYatQ86 Ipabq6gKyvoVEsVyJzqCxN/U4DqekEcMrx9O0BdaCGGIN747tCWmwyP1RGRCMfLsx7B9 SBDyveArKUObfC0mKPEaiyC5Y1njSpk5//zje7EmHCxp3AazCRSyQPlIwb+opa14Qm4c bHyqx2WkaC9Mg62kz+mzawbba9t3TRtwOf1GF/xqPWlfBAsZkx/QtIatCYG9BsiB3x8j rDIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Go3NZD3g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb7si11180049edb.328.2020.11.02.15.06.47; Mon, 02 Nov 2020 15:07:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Go3NZD3g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726039AbgKBXFb (ORCPT + 99 others); Mon, 2 Nov 2020 18:05:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:59152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725829AbgKBXFa (ORCPT ); Mon, 2 Nov 2020 18:05:30 -0500 Received: from kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net (unknown [163.114.132.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A863F22280; Mon, 2 Nov 2020 23:05:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604358330; bh=x+q6Bm5flcZvll36ZgtzcGehsn+wDBCSLDHxqKZxz3E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Go3NZD3gR76smYAvSHk8Od63rMsSUQ8nQuWTfYp0AcYIhi8yFeTXruNyRqjGJRAT2 TeHnqR7CiHeMaO8zAF7fnPbuMFWxTcR0+J6f/mxsgE3177NvjV2ezB7S0++/Syal9f s6rJP3tmUHx2epSp/Rh9UPXRSE5DO8aDfrE2VMi8= Date: Mon, 2 Nov 2020 15:05:28 -0800 From: Jakub Kicinski To: Marcelo Ricardo Leitner Cc: Petr Malat , linux-sctp@vger.kernel.org, Vlad Yasevich , Neil Horman , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sctp: Fix COMM_LOST/CANT_STR_ASSOC err reporting on big-endian platforms Message-ID: <20201102150528.59f13386@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: <20201102132717.GI11030@localhost.localdomain> References: <20201030132633.7045-1-oss@malat.biz> <20201102132717.GI11030@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2 Nov 2020 10:27:17 -0300 Marcelo Ricardo Leitner wrote: > On Fri, Oct 30, 2020 at 02:26:33PM +0100, Petr Malat wrote: > > Commit 978aa0474115 ("sctp: fix some type cast warnings introduced since > > very beginning")' broke err reading from sctp_arg, because it reads the > > value as 32-bit integer, although the value is stored as 16-bit integer. > > Later this value is passed to the userspace in 16-bit variable, thus the > > user always gets 0 on big-endian platforms. Fix it by reading the __u16 > > field of sctp_arg union, as reading err field would produce a sparse > > warning. > > Makes sense. > > > > > Signed-off-by: Petr Malat > > Then, it also needs: > Fixes: 978aa0474115 ("sctp: fix some type cast warnings introduced since very beginning")' > > Acked-by: Marcelo Ricardo Leitner > (If the maintainers can't add the Fixes tag above, please keep the ack > on the v2) Applied, thanks!