Received: by 10.192.165.148 with SMTP id m20csp3979435imm; Tue, 8 May 2018 00:23:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrlE8Wwu5f/yC4CJ1CfbWdbxNMQ6ikmSiTlJcnRASzTSwKhqd0gjA7N0idkDL548rnin9au X-Received: by 2002:a65:4d8f:: with SMTP id p15-v6mr27950167pgq.305.1525764203099; Tue, 08 May 2018 00:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525764203; cv=none; d=google.com; s=arc-20160816; b=EeSBUk6J2XE1KE4NlyPICjVz8E49xjp+FJEmhyFos2T1W1utS6ryJ7r3m/P/Ijzlpz 9CHb+1EpEQjrvq9WK3w+ByYHL+6ZpPiRq6FFkthzJ5YYFNxjtSGE7j0Ud6KHEkST97zF yMhK3QoM7qOpBf3ss4xIGfGpySWQzxc4r8kVsIisfW8SC7ppvReJNI6+9kZ7z9JQ1HXG aLwfIDxaoCqJyxrsaoqszb7V303AYlPWrvm/8+axiXB/YsD/lR/UnCfCuMZyrHm0UpZh Dy8VdOZUxdKvIH0xtknMfHX+Rf8KCkxO8ZMxrxGlf9cKQwZeMBioIqFObCFCP/ZyPr2k cdiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=+A4MDD4fM5dOeIxaOUsHnkGQZGokxPx0WNeAGF0/Ois=; b=0VUjmTVaXf6rvUys7Xk8XDAk9/ntK2MXZlGHI2HeYy8izqkKIlDM9PXYDCrjjLMN4G buRCzsOTHZo/2Ne1TLUpLvIAA7PNL/sCWhKL+tPUcsIZgv4T97vyQI92obfuv31dwtAj cLZoXzTUhS+wcMFqHd09wQPyc3K38+wDciS8Z8KV618N0FjUlbPbBV1mGdfRyeR8HWTo XqgT6xHm5vUDP+vuAia62il22NZkm89gYzPvE8cPJpcZtmOwNrRiMOSLkm0gs4KLuwDm +OtsFcvZqFNQw+BpncF5JII9ezCwtmOYfCVYwpCjSVF+uOntFzblRHOBdyq5PiLoqHUV lH/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qVwfCwxV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si22859245pfe.79.2018.05.08.00.23.08; Tue, 08 May 2018 00:23:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qVwfCwxV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754582AbeEHHVK (ORCPT + 99 others); Tue, 8 May 2018 03:21:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:50476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754139AbeEHHVI (ORCPT ); Tue, 8 May 2018 03:21:08 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE3492148C; Tue, 8 May 2018 07:21:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525764068; bh=cmHHuhKdip8CxgvCVqyyRakS2AaxfB9vx4T+loemMec=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qVwfCwxVxkQHWQUvedJ6lYOoptk2KuzxgorooNYvWaKmV+Ws2AsChNh+SBs+twR0f /lcR1g6d0F3TOeyIUQUe3ehCKbsbAyRwEsfCYqf5TVDx06+StbGtY54lyAYRbB3E5Q ixe5OGCc9gtP9lkJldnVS0R7iL2bPrhgHmF3GBq8= Date: Tue, 8 May 2018 09:20:55 +0200 From: Greg Kroah-Hartman To: Martin Schwidefsky Cc: Jiri Slaby , linux-kernel@vger.kernel.org, stable@vger.kernel.org, David Hildenbrand , Cornelia Huck Subject: Re: [PATCH 4.4 15/50] s390/alternative: use a copy of the facility bit mask Message-ID: <20180508072055.GD17166@kroah.com> References: <20180427135655.623669681@linuxfoundation.org> <20180427135656.637526548@linuxfoundation.org> <20180504221808.GB24813@kroah.com> <20180507080707.2a41ae28@mschwideX1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180507080707.2a41ae28@mschwideX1> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 07, 2018 at 08:07:07AM +0200, Martin Schwidefsky wrote: > On Fri, 4 May 2018 15:18:08 -0700 > Greg Kroah-Hartman wrote: > > > On Fri, May 04, 2018 at 09:37:20AM +0200, Jiri Slaby wrote: > > > On 04/27/2018, 03:58 PM, Greg Kroah-Hartman wrote: > > > > 4.4-stable review patch. If anyone has any objections, please let me know. > > > > > > > > ------------------ > > > > > > > > From: Martin Schwidefsky > > > > > > > > > > > > [ Upstream commit cf1489984641369611556bf00c48f945c77bcf02 ] > > > > > > > > To be able to switch off specific CPU alternatives with kernel parameters > > > > make a copy of the facility bit mask provided by STFLE and use the copy > > > > for the decision to apply an alternative. > > > ... > > > > --- a/arch/s390/include/asm/facility.h > > > > +++ b/arch/s390/include/asm/facility.h > > > > @@ -13,6 +13,24 @@ > > > > > > > > #define MAX_FACILITY_BIT (256*8) /* stfle_fac_list has 256 bytes */ > > > > > > I wonder if the below (plus __test_facility) is correct in 4.4, given > > > MAX_FACILITY_BIT is defined as such and not as sizeof(stfle_fac_list * > > > 8) as in upstream? > > > > I'm going to defer to Marin here, as he did the backport... > > Martin? > > Good catch. With MAX_FACILITY_BIT == 2048 and the patch applied the result > for a test_facility/__test_facility call with a facility number >= 1024 > would give an incorrect result. Fortunately there are no such calls in > the current 4.4 kernel source. And there are no facilities defined with > bit numbers this large, so even out-of-tree code would not do this if > it is sane. > > To correct this the MAX_FACILITY_BIT define needs to be reduced to 1024 > which would require the patch pointed out be Heiko: > > commit 6f5165e864d240d15675cc2fb5a369d57e1f60d0 > Author: Heiko Carstens > Date: Mon Mar 20 14:29:50 2017 +0100 > > s390/facilites: use stfle_fac_list array size for MAX_FACILITY_BIT > > I would say yes, it *does* make sense to include this patch even if it > does not fix anything. Ok, I've now queued this up for 4.4.y and 4.9.y, thanks! greg k-h