Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2889407iog; Mon, 27 Jun 2022 05:09:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sF6KQ2D/hEsVBAy5d7yB+VCW87Gct55w0z4oOlSzkQtNpnlcnPeb0A1RZVG+JLH46oCkZD X-Received: by 2002:a17:906:7cc5:b0:726:38e0:4e80 with SMTP id h5-20020a1709067cc500b0072638e04e80mr12678239ejp.664.1656331764543; Mon, 27 Jun 2022 05:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656331764; cv=none; d=google.com; s=arc-20160816; b=FB2WZtm3u+5aQ3qWnFhEb3qKlT0t78OepMLIjvLvYSFnQgxRXdTRDIjc9WdYbtebyA AhQJdbKhGpq/MulXT5rlWASxrUDkMOqUQeJvsa4Sk5wgtDapXGnPmWlkOzl2Uqr27ZDa k14s+hqkntOyLRz1MHIXqe4snQuELbSp08JNzQNZYWls39tDhkL6tqDV0ccJ9qRPbvQ+ VKAJD3EgmoQJSfPH0rX8WcrgTNCvxopqLfWy6LPnllULZk2USyo+fWigEcXRmQS9/N8/ pYGZNagpEji7Fug7B6KSxUyGD2bifzWbc2+lTv84/XJIeEVfv1ttM+IjbCaqS2XihdaQ /5Sw== 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=IEv4x832O8j24Kz/997mtjkp/VKY05fmsZ4urW+40aMhb/p1bW6kEk3d4gHQMNDbnp Pq+G8WzVjTRmqUEYD14O5g8gCq+D/c76nEcPUsrcWlzvHRYsuHCUYp2J6hT+L3zApiTv YuLKu/V1wcMxUQjSzhskmBufX+A9wz60+54S2p8MD4bJ7i4h8hGusdkecCjVgqtUcj02 uD+t75cXuiFnUuyOmrPVVFcmqOW1wECgKQhXyaHDGOM5VgNa5AX7NMbptvaTfi6Fpo0k F+k3uT9TcuDIhWXBmM/CKrIbo9unuFcbUMvBIjz50+KamITi9oh/Pm5uauPQ0AWL9dK0 urAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oK26BNfr; 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 di9-20020a170906730900b00711f4c750basi12016249ejc.940.2022.06.27.05.08.58; Mon, 27 Jun 2022 05:09:24 -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=oK26BNfr; 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 S235335AbiF0L2Q (ORCPT + 99 others); Mon, 27 Jun 2022 07:28:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235136AbiF0L0v (ORCPT ); Mon, 27 Jun 2022 07:26:51 -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 74BC465B7; Mon, 27 Jun 2022 04:26:49 -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 125A661359; Mon, 27 Jun 2022 11:26:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B402C3411D; Mon, 27 Jun 2022 11:26:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329208; bh=vHphNEGDnvQP6fenj0WdjSl93B5+8QPE+d2p67vjjAI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oK26BNfr9l1amyD53G5DTjOqUvU1Z8kQjZBAZXPaYeOKZCH9T4SkHO/XXhmjephsN Bi0eWR664vIaUD26StwwLi/jikonRViKsddAdqQ6C05iRqB4clRPAHB1ZKFCIWxSDB p6Vfd3GR3SHXnapx/22mAeaCeDaQoRuJj2gCK/rs= 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.10 046/102] x86/xen: Remove undefined behavior in setup_features() Date: Mon, 27 Jun 2022 13:20:57 +0200 Message-Id: <20220627111934.838369816@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111933.455024953@linuxfoundation.org> References: <20220627111933.455024953@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<