Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3422538pxf; Mon, 29 Mar 2021 01:37:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmQWDKJKYJIibKkok9YWfmRo8Epsm3XKb0IRBt7tA+ouPP3YDl6dYcTKvzxTJ68s7dqlpx X-Received: by 2002:a05:6402:145:: with SMTP id s5mr9895252edu.221.1617007029808; Mon, 29 Mar 2021 01:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617007029; cv=none; d=google.com; s=arc-20160816; b=wjjuwDYOCer0s+0mRJiunCosf8TDVUTq8yDFf9naVMTNSAbf4FhBjigFX3EyoM+T63 cx4ZTnvlYP0uHtLaGWHCkIn6Cj7lFOFsZAYP0svHaXmGBOU8rYeFwYrZMrT1+ImClAg3 VV9Ta05zB82ozQRCqz5GLqpDsBgqNsWdNdrZVgyMfgohw2Os8CtcurrrpKtYnK6e7tro +vxUHQoyuESyQlXrpjR9WA5SkRiihYpiscvMgTBRnjsTukFpusw1SCiaehWXmf083/1n qkaMZY6uQm5CJ/RXywbukQbG7hiFl6I1N25Cth5Bf+AA9GTs6JrKNoekzw8N8QMqSAR/ M6uw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=T9t0DsFGmS0lYyWS4wOICh7UVPVuymNo+mfNooV4XtA=; b=I81lxeTpJoRTaOTDZfjDA4DO59PRrB17yOBGsBgSsQtv/woiS7qOClyno+YuYYIqVC oM/J3PF0FkgCFOQdiTgeawzTwUwNzLbH9+DLA28lDN77ssnlzpEtKr/Em2CVPBSvhGE+ XszNcuLR9YtiQZZ8cEDy85pmdecmK6BvEnsLjN/WSQm92t7r3wqUBHkgc6d2H1vpOn0B EVN+XfIE6vKzyYRIAFBPRsQknnIKxShOm2UJ8MM8wyBK7C1R9ch6owENSS7j2HE9XAS6 lrIXUZ7VjBzGan5elPKa3md/AZLeDT7DpcZic0wlYK9psTd6nAL2yNmTyFx+jJ8JqwN/ VbuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XfGbMFoZ; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si12240174ejy.263.2021.03.29.01.36.47; Mon, 29 Mar 2021 01:37:09 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=XfGbMFoZ; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231995AbhC2Idq (ORCPT + 99 others); Mon, 29 Mar 2021 04:33:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:37846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233417AbhC2IUy (ORCPT ); Mon, 29 Mar 2021 04:20:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 00BEB6197F; Mon, 29 Mar 2021 08:20:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006054; bh=eCvm4I9ZRMNN0HQ3CUV1uqnU6AChyXBaa02oYgA/Wag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XfGbMFoZ7s74e0Z+4CNI+kaAaGf0n/tp4n9Atk5XtU0WnkH3ZnLlrggCTqdMFROHC Ghd3AydWCvMlV+haZt0US7LvFGe/WW1ZmoLmqH3INYs0nDTpmjPe/JFqfb2XQ5RwbR eYOtpMNphCJfdri4eNOhFS+Lvfb5rF+zmawiglMc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ido Schimmel , Adiel Bidani , Jiri Pirko , Petr Machata , "David S. Miller" Subject: [PATCH 5.10 067/221] psample: Fix user API breakage Date: Mon, 29 Mar 2021 09:56:38 +0200 Message-Id: <20210329075631.414610879@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ido Schimmel commit e43accba9b071dcd106b5e7643b1b106a158cbb1 upstream. Cited commit added a new attribute before the existing group reference count attribute, thereby changing its value and breaking existing applications on new kernels. Before: # psample -l libpsample ERROR psample_group_foreach: failed to recv message: Operation not supported After: # psample -l Group Num Refcount Group Seq 1 1 0 Fix by restoring the value of the old attribute and remove the misleading comments from the enumerator to avoid future bugs. Cc: stable@vger.kernel.org Fixes: d8bed686ab96 ("net: psample: Add tunnel support") Signed-off-by: Ido Schimmel Reported-by: Adiel Bidani Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- include/uapi/linux/psample.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/include/uapi/linux/psample.h +++ b/include/uapi/linux/psample.h @@ -3,7 +3,6 @@ #define __UAPI_PSAMPLE_H enum { - /* sampled packet metadata */ PSAMPLE_ATTR_IIFINDEX, PSAMPLE_ATTR_OIFINDEX, PSAMPLE_ATTR_ORIGSIZE, @@ -11,10 +10,8 @@ enum { PSAMPLE_ATTR_GROUP_SEQ, PSAMPLE_ATTR_SAMPLE_RATE, PSAMPLE_ATTR_DATA, - PSAMPLE_ATTR_TUNNEL, - - /* commands attributes */ PSAMPLE_ATTR_GROUP_REFCOUNT, + PSAMPLE_ATTR_TUNNEL, __PSAMPLE_ATTR_MAX };