Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3298317pxx; Mon, 2 Nov 2020 05:29:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJygeH791ITdAmrRb9DDQqtJPbEU4EnYJenC3ED9tDS7i42OP7erLkrG8iF4elPpmmFO/DR5 X-Received: by 2002:a17:906:c41:: with SMTP id t1mr9358408ejf.19.1604323768927; Mon, 02 Nov 2020 05:29:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604323768; cv=none; d=google.com; s=arc-20160816; b=RxRhSN7UY/8rRsR50gxroZlsmox6BbFHhpuasUstAlqEMdehE/yIT71x4CgoeCkf3Z AhHDSa6XQ4icvs3QPybw8A5B7Ovwm3nZHKEf2E58AWXis0Bp5bkSJ87gaDhn4roDwnNs k48K4I+JSo/5dZEPhYW3NRjM9OMGdDXVwiK0Bdf/jQOhJ8qcr6CWJhzJlj7eSkBo7af2 4G2qFupgno/In5Q7x8oxr3mFBMHe14/eYqAyplwd0CDAB2UUQovP1FVv3a6xuJdValAd 2Lnd+9sMawAChPZwIBY26ocAyxFdwYE1o/8uO7AOqNLt4mXOW1JxACAPPwI32QItQ0vO oMhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PdvDuP7e3w2Z1tBi0oPx/qF1V99ajnCRYtINddpeaV8=; b=m6RExtyLZxC03yxzyzI+vM53gYorvJPOsCpH5koNwpbqxpoNtsNHJSG098GYq95v3U HAkjuF7Z6iPfOf4hVZbI7ca1LBmmvsMcrEskDET/639lCV1T33D7/9nPt/3i4hJgVMqB sEQmMQqID1pHUcyacqF1wpMczHlgoNpci6cw9Ovhe742fcwwYm1I4k1MJwpx7XsQEhKq F5viVeoGxXDnM+SvmlvCrB9+53oUeG9DsFbNtswkmjjfi7KFr2HYUhbIUcq/2sN70Nsl 14hyRVapkpY+K+7KHchlOeZGt0uopdr9/V299qEe8az851ndgDRTQ6eo6UnxzUd7X1Db RUew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oELlHAqZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq11si1336226edb.332.2020.11.02.05.29.05; Mon, 02 Nov 2020 05:29:28 -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=@gmail.com header.s=20161025 header.b=oELlHAqZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728511AbgKBN1W (ORCPT + 99 others); Mon, 2 Nov 2020 08:27:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726069AbgKBN1V (ORCPT ); Mon, 2 Nov 2020 08:27:21 -0500 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76662C0617A6; Mon, 2 Nov 2020 05:27:21 -0800 (PST) Received: by mail-qk1-x741.google.com with SMTP id p3so11384000qkk.7; Mon, 02 Nov 2020 05:27:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PdvDuP7e3w2Z1tBi0oPx/qF1V99ajnCRYtINddpeaV8=; b=oELlHAqZObXU/0Y1vLQClILBhaSo1PyaDxNvAK4JCbQUlPkY2EBe7YCZEkwC/I4KcD eQ2va6VWfVDNqiDoQYgv914RPRL9YLtEmRWkrJFINQAygSzcTgsh1JRxlnJyLw1/r1vO jXEEYjedt6AEM0Xz840DMDiPp0jJeM4FmN6+uK+hLRDnJnltsapz+BZwXFmyVJ5UwZlZ 8VENknNQJmGCXLXPUgjDwnL+gZusf3tHjn76mvJY6OeGqc04h5pBrrw5Uszs+nCQ+DfA zYQgS6vjsNXY5cQao5QESVLzLvLDiObkO+afYF8OI4MKxpda1rutpuZeiL4KiS1U14cT +wMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PdvDuP7e3w2Z1tBi0oPx/qF1V99ajnCRYtINddpeaV8=; b=DWeOmi8eIyUgc6sj3juz1UlqearIJOXKhdVoxhN+guASvoNL3H60XEBY/24IneYr24 zIBORBtcteWRBZBkbYZ6DqXaIqcgCIj4wUjHehtGBcisyKVLn/fkqOOOIHeXDrjpQBSz yimohj0kFgXmlfRboqwsmZtOZ1nRBy4a7+pK9FJPsK8qQJ0E7tRq/OFS0246qL/IrS9B YvJWvlsG+v21hRyU24h4C7LXVDehUeDnpYL6hFkejJxr14fJvlJ+HUslj//BkQD2Pm/o UlIppedTkQvIkTSR2Tc39FPCkL9Wo0k2CS56XGci1nulOxdDOf7WqOroSHvinCZo4A5A f/Nw== X-Gm-Message-State: AOAM5305Ie3ZhkGq1moockNQ1aZYrcOkY9Z0Bzj5PIDjNfRyiNVlpeTS 0BDIShZdAZnJelencspx12g= X-Received: by 2002:a37:6790:: with SMTP id b138mr15047011qkc.355.1604323640677; Mon, 02 Nov 2020 05:27:20 -0800 (PST) Received: from localhost.localdomain ([2001:1284:f016:de27:b805:b146:db09:c9cb]) by smtp.gmail.com with ESMTPSA id t12sm7670804qkg.132.2020.11.02.05.27.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 05:27:19 -0800 (PST) Received: by localhost.localdomain (Postfix, from userid 1000) id 92CA7C0DAB; Mon, 2 Nov 2020 10:27:17 -0300 (-03) Date: Mon, 2 Nov 2020 10:27:17 -0300 From: Marcelo Ricardo Leitner To: Petr Malat Cc: linux-sctp@vger.kernel.org, Vlad Yasevich , Neil Horman , "David S. Miller" , Jakub Kicinski , 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: <20201102132717.GI11030@localhost.localdomain> References: <20201030132633.7045-1-oss@malat.biz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201030132633.7045-1-oss@malat.biz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) Thanks.