Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp664034iog; Thu, 30 Jun 2022 07:58:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s1M2v5yeEp6JAXhhdK75GVYqAKHccWY0jlCvRGFGYCQxQ093TK134P84AADCCuEThPrHga X-Received: by 2002:a63:745b:0:b0:40c:cabe:961b with SMTP id e27-20020a63745b000000b0040ccabe961bmr8317328pgn.117.1656601110664; Thu, 30 Jun 2022 07:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656601110; cv=none; d=google.com; s=arc-20160816; b=Yk0yjitmP7VRaWvnGuFX3SBSUgdwB8xzUFhr9HEpOlQXKIRtZYgT+N9cOgtZBhuW9A QHuGG7/3A4IPOAfiHBEFrggenbFaGauw+CV5cF3w7pcgoWLDfuWDclweFVg+Sn3befVa hdDyxYVhPFSuLBrph5tZRSH8O3/ZtILAb9QETDwFTlu1+YmRCHBER5brQgwTiJ5jUTs/ eMJ4AaYkdZNXdeschPVGYTqfiudK/CmunIRT7ZRWtHzVrt70P2LVKaB/oA7gt0ivBud1 5+yHp3IGZCKPhlItEsJqOiqDAuMJjA4uhZtX9tAceId2yZ0KUBH57QqIPf7mb1gLITbH fSIw== 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=jr/qw8LGp1AgpzKNfqNX657amquiuFe2s4iP9RBOvp4=; b=l/XkVWYTDMyJDVT8dFeGk4MDJ3vmm8i6qTNWa5kyfMtuGKSXGRIBLQqcHZ0D0XlFUx J7FH9EkfeZt70CJLVFmZR9pe2wAykdmiaqfo79XlU1goqxtGuSUodv58gkxrXvQ/KLKG I/+2R6VfOv51hhi8GXyxP9lC31wjl3P43jGa3umaZIb7bL58l+B49Wq/df7SUzDRovIy zMLR5rt9hm7nlYDVXxWfH513pzpWXbVE9WOItfYoiObuwO0LYl8AkxSmWGM0jbdWhZGd 7DS0xNVC3Z5TwetqV8tnF2ngMC5YfSnp1sszHKw9gHhz2HbV3VeRK8NkZ2hLSGvsqnFK S6mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="2TE/XKYw"; 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 k28-20020aa79d1c000000b005280829b42dsi4291459pfp.160.2022.06.30.07.58.15; Thu, 30 Jun 2022 07:58:30 -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="2TE/XKYw"; 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 S235652AbiF3NvP (ORCPT + 99 others); Thu, 30 Jun 2022 09:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235538AbiF3Nue (ORCPT ); Thu, 30 Jun 2022 09:50:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F4BB3CA4B; Thu, 30 Jun 2022 06:49:02 -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 2B99B62005; Thu, 30 Jun 2022 13:49:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3777DC34115; Thu, 30 Jun 2022 13:48:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656596939; bh=oCbBNzQ7H7CJAOIyXRH136dBBNXqajI5X04Of4eAtTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2TE/XKYwuCFyt/+qOSNARfUcY/tnDAOujH5I2CGfMAkq1ZkLe1Hq+8cQuPpXu7Xst CHtJ0Wg+cbf3DvBq06SbCGl3MmqpR9EqnfLVBYcQQzhCyORruKcGmzKNQzAgLI44HB QUM0+Zlb6ixSqy6/0HedIewucSKIIcAjFwuLASno= 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 4.9 08/29] x86/xen: Remove undefined behavior in setup_features() Date: Thu, 30 Jun 2022 15:46:08 +0200 Message-Id: <20220630133231.448872256@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220630133231.200642128@linuxfoundation.org> References: <20220630133231.200642128@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 d7d34fdfc993..f466f776604f 100644 --- a/drivers/xen/features.c +++ b/drivers/xen/features.c @@ -28,6 +28,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<