Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1037962pxb; Wed, 6 Apr 2022 07:16:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWkhUByzYn0H8g3CFe6ROdLc4hO4+1SlR6VqMl48VuaSh0ifOOMZI+SBYCxDcEeG2LAPOv X-Received: by 2002:a63:9dc6:0:b0:398:6e02:c105 with SMTP id i189-20020a639dc6000000b003986e02c105mr7405344pgd.495.1649254569878; Wed, 06 Apr 2022 07:16:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649254569; cv=none; d=google.com; s=arc-20160816; b=zjs7fwm715eFNiZOHDOb0yd66UUlBrrwi1cx5yEo3JJav6KOLjIHULot+TJhmghgGm 5j4m10DJSUgQKuZ4ghDukNIpSxB5sVlksSFdl6tcp5Adf9JWiR78uSkG95hi5UNf9Zzy bD8ZMgCvrsMP7/AKjRZtvwix/QVBngMHXjYUnDSlId6ewJmojEszJjosOXnoeMEbChi1 nd+NtNaSVEmozPAGW8kuwLTHqyxY4rLpq5OBQWeRiS9dQFIh73wbf+NGop08JCLWo/dU q5pA+85t6GM1BLMHber8YfrwPUklqQQmDnL8zMiXg1Tx0nBSg49gZcrENAnAH11CLePH nCHw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kP4DM6dK8HrViwiGpbgLUJQWnOFzSxGwf/is2bzgugw=; b=kIg5DCsuH8lCq+5qJ4ywShouXamVwHui3aIF2DZuiZ9aRXZQwe8NXq4hlFiWw78q8q qePN3aj4iYgXkmui4l1kZFaoJaLsdCEc/in83aJpSi8uNnCkcryVp5VRi3xNoNdZqMhr ImvzNRfgG1ue5cMKeZHy3w5OdLreqiWpa7ZglsodUMhfhrqGJXuj9opFGlSIqPOvHXO1 bi3o/QXS9Bn6VJBkDjz/2oqoBdrawRiYlFSArgvUCz5faP8RGoKqv0Rfre1qtBxk+IhN 9EKUR5JnyzDUhB5f14EkcudIU7jXpM57l3L47DZdHQlteww7xtbr+mrLeT0+rcBIjaP8 6YzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l5OVEg7Z; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g12-20020a65580c000000b003825f9c592dsi16444686pgr.412.2022.04.06.07.16.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 07:16:09 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l5OVEg7Z; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 814CF3A4FA2; Wed, 6 Apr 2022 05:02:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343638AbiDFK4U (ORCPT + 99 others); Wed, 6 Apr 2022 06:56:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348485AbiDFKzL (ORCPT ); Wed, 6 Apr 2022 06:55:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F7C6242201; Wed, 6 Apr 2022 00:17:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BAE6F61B00; Wed, 6 Apr 2022 07:17:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 606F5C385A1; Wed, 6 Apr 2022 07:17:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649229429; bh=kO+CWeM3t3ySUYaB/XXLH+IahNF0qSXnWYdw+NAtgUM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=l5OVEg7ZEGlljU7VwGLJ5xsqLTqFCe6IfpHBWhQ3Xjj/xHVH6W97zc9BqowKGKG/Y 8mwKq/cZ2ay9jvPjaCjc+bbwUE6RwtZJ7RH0a8T7zWyGJdqDi2pPBmBP2Tff/ijecG aSYhJ40nZgLfeBWoiwAqcrvy1N8CAm3K+HPYCmfWKjdRfBsnnwo4oZ+xjoiwtwuyI9 zmXwoBD7d9YnRIeWVA6FqBvRtrM8MD5ge+Of2ntk3yuzuiCg1q+QmcApjMANr0s2Vc ILNkYUQqGYdlUkzRJsLdz7pNbPK9dVFROzmUMcfCMCyNC+uSQsP2KeUDL2SRxOxHkV 3hHHXozjI8u7Q== Date: Wed, 6 Apr 2022 10:17:04 +0300 From: Leon Romanovsky To: Borislav Petkov Cc: LKML , Saeed Mahameed , linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Jakub Kicinski , Jason Gunthorpe Subject: Re: [PATCH 10/11] IB/mlx5: Fix undefined behavior due to shift overflowing the constant Message-ID: References: <20220405151517.29753-1-bp@alien8.de> <20220405151517.29753-11-bp@alien8.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220405151517.29753-11-bp@alien8.de> X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 05, 2022 at 05:15:16PM +0200, Borislav Petkov wrote: > From: Borislav Petkov > > Fix: > > drivers/infiniband/hw/mlx5/main.c: In function ‘translate_eth_legacy_proto_oper’: > drivers/infiniband/hw/mlx5/main.c:370:2: error: case label does not reduce to an integer constant > case MLX5E_PROT_MASK(MLX5E_50GBASE_KR2): > ^~~~ > > See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory > details as to why it triggers with older gccs only. > > Signed-off-by: Borislav Petkov > Cc: Leon Romanovsky > Cc: Saeed Mahameed > Cc: linux-rdma@vger.kernel.org > Cc: netdev@vger.kernel.org > --- > include/linux/mlx5/port.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied to mlx5-next. 0276bd3a94c0 ("IB/mlx5: Fix undefined behavior due to shift overflowing the constant")