Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp2000169lqp; Tue, 16 Apr 2024 04:42:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWi+aR2QvhUnfLOACQ9FxZBybLIQPf8nSDC0ipgV+UnCGrpYCdSKRqvm7jSSZ8eG2pXWTOWesnIcz2FMmBtdMtZtd5FO33PyZLTcgza5g== X-Google-Smtp-Source: AGHT+IF41SWRIZvvN+wtVuUfwNrVgk/ak+p2HwOGtBbQJd0tNJiborRbWgwwXbxgclI/GJ56kfh2 X-Received: by 2002:ad4:4050:0:b0:69b:59c1:f259 with SMTP id r16-20020ad44050000000b0069b59c1f259mr12378238qvp.17.1713267766692; Tue, 16 Apr 2024 04:42:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713267766; cv=pass; d=google.com; s=arc-20160816; b=FtLJcuzAqiSE7lIDK97TqOM4+MJXyEjjupOQ7QWbq5U6l966Qd2bnEdOqO2/tQhYFh 2oMr720oNbBX1n/XUF1GUVx4ccEiJDTgjr6Su/beF+pwN7kd7jo/ZUU6e9w/lHs3Gjpn zh87XaQyzfiaIcJ19xPH/eaHqSkJR8l9CaL8EsiRjbicw24O6u7WCpXWDd3dSrmD74vz KReHVoKVlXLLP+lkpe7DFUMBeGyJwqK9T7uXrfego0aVOdLCmai6lo97o1yTduZjyGg8 QD/Qn+yDXjsnm1S5frAtEugIC6/QKqDrqGKUJuu4YWEeAWt13jIGYNP1TPGgTCKl+NKh LH2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=hKbWqZiR5So+vb841wV12n/dE9jFQYX/o5+nphH3lqo=; fh=W/ih3Tm08Vw/VNl1Mx5C3DbabE968Wd38szWcNMHAR4=; b=FWONF2sh1a9nUINKWcJbUt1mvTZ9Z18a/dq39YtVZsW+8PtwkAUXAzzeCjMoGqKbtD +BZV5BV8vj6VPbZGMdzKt/OWm/DXJR7dPX5LjQa2h9qfUj4YYCOp26FlvCq3g6KOOBrT xAbzBPh4H7d1FU1DqZDwSYnqnlYtimrSJeZ92PmfNClbvpwjkFMQ6bIUwr2hYZg5afp8 Qztk+RKnEFDfBmo9gzBCA6xzBvSa6McfHR6LUFKOoox85xCoGU9j4W0R2xm+r1VsQ7AP srlOzUX5zCoaL8WQQWe1SjK0XUGeJCDWspfNjNsinNfn3YY9OfUx8ER42DlWWfXj8NAs +EQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=OLJ7zm+n; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-146720-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146720-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id or11-20020a056214468b00b0069b4b76c635si13066632qvb.13.2024.04.16.04.42.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 04:42:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146720-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=OLJ7zm+n; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-146720-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146720-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6BD861C210DD for ; Tue, 16 Apr 2024 11:42:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D762C129E9C; Tue, 16 Apr 2024 11:42:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="OLJ7zm+n" Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E395E1292FF; Tue, 16 Apr 2024 11:42:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713267752; cv=none; b=gSDoL9ivzy6sV6E4CXoSWBSkVQIyn2l78TIF7bo7ROm91lljqr/7GIUOtPO/HlItvzT8vrCYWF5UJmCwuPzOyNxa0eQtpVBeYaSLN8s0a8a6tdtoeWchRGz7kH7pY6CLsXcYvA1PhXF/thINzr6k6rFPrIu7w3eTMRwnLYYsd+o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713267752; c=relaxed/simple; bh=q3lBDce4HNEiVrdQdtt3WuGh2tYMUeZ5GnShOn2kylE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=iQ4zqnspNU3r7354QUB8XQxlwPY/zkQx2sPWxljlt27WOgunR39ciC4wo9PoQMK6388+2H0O3KxeRpGaYZlsbcMgUI9IwIhroiJdUV4Aopw7xoupd1t53Ye1vmKizmrzaMubjZbHdeav0bJTHoM6XOTJP+i0nHirZEEApXo6IE0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=OLJ7zm+n; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43GAwBD5031627; Tue, 16 Apr 2024 11:42:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=hKbWqZiR5So+vb841wV12n/dE9jFQYX/o5+nphH3lqo=; b=OLJ7zm+nwKOZLAYYq/jdxi6JiK5GxMZVOekDu8cWu0J6oabHHObU5OxNZ/qk5z0B2kvz PC7aqWfE7+M88OWAfH2QQQhrzpmwLOc0kUGL7iWu+FLm8kHyeIYBt2cKgDwj36k7RWTx Uiio4eO4RR3tie9k1O8Oz9eZ8mJMC21tAw/A0qyVLf9Q2sURHTwMu6xpLyHeDC4LtwRo 8T0UVu0dLD93OJ6dZ39gCWSl2yfQWo5SPvrxQSuvehZ9PNLGli1z/oF7LGutZFDHtVUI Ee6uCPwwziyJMv1K8lGz4oorIx+xwDWA930T4uGQ3sX3OmfT3P5t82h+HPvYnFdLoQDN Dg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xhr1fg2h1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Apr 2024 11:42:27 +0000 Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43GBgRtV004291; Tue, 16 Apr 2024 11:42:27 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xhr1fg2gy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Apr 2024 11:42:27 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43G8k53e023576; Tue, 16 Apr 2024 11:42:26 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xg5cnwtbh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Apr 2024 11:42:26 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43GBgKeL53739838 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Apr 2024 11:42:22 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 538FF20043; Tue, 16 Apr 2024 11:42:20 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 25BE820040; Tue, 16 Apr 2024 11:42:20 +0000 (GMT) Received: from p-imbrenda.boeblingen.de.ibm.com (unknown [9.152.224.66]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 16 Apr 2024 11:42:20 +0000 (GMT) From: Claudio Imbrenda To: linux-s390@vger.kernel.org Cc: linux-kernel@vger.kernel.org, frankja@linux.ibm.com, nrb@linux.ibm.com, nsg@linux.ibm.com, borntraeger@de.ibm.com, hca@linux.ibm.com, gerald.schaefer@linux.ibm.com, david@redhat.com Subject: [PATCH v1 0/2] s390/mm: fix improper use of __storage_key_init_range Date: Tue, 16 Apr 2024 13:42:18 +0200 Message-ID: <20240416114220.28489-1-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: fCnGpB0yf90yxINshwSZgIHV9VblGN2I X-Proofpoint-GUID: BjZCMELtseTwRyJlXnaWfp15y66KVAJW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-16_08,2024-04-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 bulkscore=0 mlxlogscore=873 adultscore=0 mlxscore=0 impostorscore=0 clxscore=1015 phishscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404160072 The function __storage_key_init_range() expects the end address to be the first byte outside the range to be initialized. I.e. end - start should be the size of the area to be initialized. This small series fixes two cases in which the last address in the range was passed as end address. This was still functionally correct, since __storage_key_init_range() will still loop over single pages and correctly clear the given range, but it will be slower than clearing the storage keys for the whole 1M block with a single instruction. Claudio Imbrenda (2): s390/mm: fix storage key clearing for guest huge pages s390/mm: fix clearing storage keys for huge pages arch/s390/mm/gmap.c | 2 +- arch/s390/mm/hugetlbpage.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.44.0