Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2904400iog; Mon, 27 Jun 2022 05:28:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vnx+dwqeq5rdOLYfRMGBXUDgp4IXbYVnk8JrAPd0g5U4UodQQ71HA2pZlmqzHKyPWdtQlr X-Received: by 2002:a05:6402:4244:b0:437:726c:e1a with SMTP id g4-20020a056402424400b00437726c0e1amr13729186edb.107.1656332906367; Mon, 27 Jun 2022 05:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656332906; cv=none; d=google.com; s=arc-20160816; b=RRYrbR9OJh7stCN9t45Ud9TOiuAJuesqC0XDZsrXoZLfOOjN9pXlW6+29FvAftpFAh nAM2jMFETZo5bIwjoAYNgSfWmN064QOWoG6XsZbpeTlvhUXju35vebpTRPh8yo0gKs4f sDVzBu/MnASieIUJW+45GCMDyzoypKHrLDEzcZiCOjQUJJtkaMG4VOAwMq33eKhWCzxj NuSHwTBIn8fzF/pq1S5O6IxKJ6Vvvw+2rgqg10LwzLfMNLz78JCGMWH6afd1rrtr5Yjy 9GQptsoo7cBIXlXvzQ4L+D5Pc5be81jivMvHaIAHCxELg4LSNJIQoduCpDG4s4ZvK8nn hg7g== 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=TXVQdxLWzoSjpc/cHbMgoGOltLA++hiBWAyR7hlssWI=; b=RWN1gGMe0afr2WezyYtxsrJSUeDzhMoT3kkHcr3AAreZfROYE7reVeG+UpTYwV/MtV R0p1lcs6MliznTvCvtk73jhrQE1IOLnL97ILwyqv2iNwXGyVZRRW/nQsStbaqQ9lzaIS YyjeCndujOovQoLLi9IAmQs97vnVLCO0cquco/OChXq9zH/H48J726NghtrIQ96avh75 Vt4dB5jqNLbQg/vSLqGjbndjCg2e0Ee0D/+/1cnWaRmmkoQ6DaXhecUOP/CYtT6TljNn Rw/htqq9WlfDMmXUNffUAZ8ODK6r+6b0qxbxjEgnWA3cwdbKRZRLxv59wUiW7suy+vDq N47g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qSUgt0EP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m5-20020a509305000000b004356442b3a8si12338695eda.177.2022.06.27.05.28.02; Mon, 27 Jun 2022 05:28:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qSUgt0EP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235215AbiF0LcC (ORCPT + 99 others); Mon, 27 Jun 2022 07:32:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235648AbiF0Lbe (ORCPT ); Mon, 27 Jun 2022 07:31:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6FD6F6A; Mon, 27 Jun 2022 04:29:01 -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 ams.source.kernel.org (Postfix) with ESMTPS id 8E763B81116; Mon, 27 Jun 2022 11:28:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBC1EC385A5; Mon, 27 Jun 2022 11:28:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329337; bh=vHphNEGDnvQP6fenj0WdjSl93B5+8QPE+d2p67vjjAI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qSUgt0EP5KoJo8sfnkpEr3kobnS6Z+87Nd1A3Nlg6kHObbZ/r2FoEx2BwC4QTDvXo Uf1UHV1/8ZHbhdXHXcQiDYUE3Zs7jVgSTB7Uz4ga6boyHjmR4PuoMHVmWuzhxjVbnS OWOmR+EaorQWqrtAZ3Y1OqupjTA5pr9s7ZVTD4Qk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julien Grall , Juergen Gross , Sasha Levin Subject: [PATCH 5.4 25/60] x86/xen: Remove undefined behavior in setup_features() Date: Mon, 27 Jun 2022 13:21:36 +0200 Message-Id: <20220627111928.406738132@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111927.641837068@linuxfoundation.org> References: <20220627111927.641837068@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Julien Grall [ Upstream commit ecb6237fa397b7b810d798ad19322eca466dbab1 ] 1 << 31 is undefined. So switch to 1U << 31. Fixes: 5ead97c84fa7 ("xen: Core Xen implementation") Signed-off-by: Julien Grall Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220617103037.57828-1-julien@xen.org Signed-off-by: Juergen Gross Signed-off-by: Sasha Levin --- drivers/xen/features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/features.c b/drivers/xen/features.c index 25c053b09605..2c306de228db 100644 --- a/drivers/xen/features.c +++ b/drivers/xen/features.c @@ -29,6 +29,6 @@ void xen_setup_features(void) if (HYPERVISOR_xen_version(XENVER_get_features, &fi) < 0) break; for (j = 0; j < 32; j++) - xen_features[i * 32 + j] = !!(fi.submap & 1<