Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1325923rda; Mon, 23 Oct 2023 09:09:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+fIrkRLxCQx3QcssvnBcuXrJggZ4dNpy2bAdsxmgGDErek/xvcEwiYjTPLxs58ennXFPV X-Received: by 2002:a05:6a00:158a:b0:6b4:231b:a45c with SMTP id u10-20020a056a00158a00b006b4231ba45cmr11519712pfk.26.1698077372887; Mon, 23 Oct 2023 09:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698077372; cv=none; d=google.com; s=arc-20160816; b=NS1ayWTPDx1DmflFEilo+EXpaTLa53+y7JzUK3qUDwB3qG4bYNY5PK++CsBdLsLoHy DiecKEyjYxBjmCoAHTe9ZNgBpBQRONCNpeI7+RzxMAI4ujJ2jMHzsj3JFD6Kpf17Ij4w FSuUA6QuqxJ5C9QFvEIDkgRDJlhNlPDR4KfA075aaI3FB2P3niXewV5Xum71lQtMPEyh wML+SSoJIWnXuEdDZNaq0VF0xUY4+ThjBKlvC9eZ/OL8OpoBe4/AfGTA5AGBqIGSDXrJ ibEOlt2DYD/7W0wK1o67U44MtPpYxyJUGKwYsBXIUK7TcPjsfXa5Ilc7T2fY86Z7+B8v INTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6ObqH4e4bV+JHId4K2De8BGViudSJ57UfgnPV6M4KeI=; fh=Cfd8h9e4Gt0Oq+OIC/95VPc6sXNw0bIXnjy82yndK04=; b=kwOVP1VeLGzd9/EgH18j5Qv/aTgDkhrkVSymSr0fSC/NhSY5soGMdPXbgWooIAQ3i5 QghdI06k0/L+b6e0kCkextKVnEi8AEhK3GcV/RYSpbUq3R+peOkS3F+JNA93TvkQGOGq RFG/AYeA2icVnpGwiCDD2Ay0DY/3OgkJxp94/bcXzwobINcKGyZQPbpuB6e2K9CH8XPN whOCNraxnbaAR9c0mS8Iqw4Ezcgq3i51rfp6FdjZ50UR1G7ZVZC3AiC0QS/gv8PznzpM gthzrc3pwJ2zFaEVmcm0WdhvOAHi+QBn1ZPuSPz12RsC29gNr2B1ZXjx/UBMUDIrOcPU mMug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="H/YDsuQO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id f8-20020a056a00238800b006bd78b99aa5si6882268pfc.334.2023.10.23.09.09.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 09:09:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="H/YDsuQO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 1588D80966D4; Mon, 23 Oct 2023 09:09:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232182AbjJWQJP (ORCPT + 99 others); Mon, 23 Oct 2023 12:09:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231938AbjJWQJO (ORCPT ); Mon, 23 Oct 2023 12:09:14 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFB2A103; Mon, 23 Oct 2023 09:09:12 -0700 (PDT) Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39NFuXgM013400; Mon, 23 Oct 2023 16:09:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pp1; bh=6ObqH4e4bV+JHId4K2De8BGViudSJ57UfgnPV6M4KeI=; b=H/YDsuQOPuJw+VgelXjsrDoFXUVg9Dy6tO7tubwkdhelBMWqLBNt85zaPuqhB2XFF4Gz YLVhkNdbvRr0S4T7lxerN2c4oY1k2O5QxrZJy3k1rf0HOkQ49lMAVrRfGjFt9iQXTSkR hMOHdvEK7eFSscmyqaQtcb3tspdSs+PeOivEsVVI6Mh/iD6GY0q1u5ZuFWbNLowT1j51 sROdCj0dFmZ/GeJW+ms34TA4bt2OjmBj2KWV/gAXg0nGYE6NLP7pWt92mwRD8VQFuHkW xQqnM8K9O8XMDew3WB6okIGoJ6naYEw/x57lRIW+obLZFWa5yp1CV/4fUtjTvdv3Rki+ tw== Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3twuq3s2s8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Oct 2023 16:09:11 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 39NFWIT4010250; Mon, 23 Oct 2023 16:09:10 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3tvsby9tv1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Oct 2023 16:09:10 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 39NG96Fa30409436 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Oct 2023 16:09:07 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E41D22004B; Mon, 23 Oct 2023 16:09:06 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 687E920040; Mon, 23 Oct 2023 16:09:06 +0000 (GMT) Received: from localhost (unknown [9.171.43.41]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 23 Oct 2023 16:09:06 +0000 (GMT) Date: Mon, 23 Oct 2023 18:09:04 +0200 From: Vasily Gorbik To: Linus Torvalds Cc: Heiko Carstens , Alexander Gordeev , Niklas Schnelle , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [GIT PULL] s390 fixes for 6.6-rc7 Message-ID: References: Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: QXT1zwmDyRmUpZHFiyf6-MWXsig0RILD X-Proofpoint-ORIG-GUID: QXT1zwmDyRmUpZHFiyf6-MWXsig0RILD X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-23_15,2023-10-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 suspectscore=0 phishscore=0 adultscore=0 impostorscore=0 spamscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 mlxlogscore=522 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310230140 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 23 Oct 2023 09:09:29 -0700 (PDT) On Sat, Oct 21, 2023 at 10:56:29AM -0700, Linus Torvalds wrote: > On Sat, 21 Oct 2023 at 02:44, Vasily Gorbik wrote: > > - Fix IOMMU bitmap allocation in s390 PCI to avoid out of bounds access > > when IOMMU pages aren't a multiple of 64. > But that code is wrong, because the overflow is simply not an issue. > Adding overflow handling code is literally only actively misleading, > making the code harder to read, for no reason, and making people > *think* it's being careful when it is anything *but* careful. Right, I should have done a better job reviewing this patch when picking it up. Please consider a follow-up patch (in reply) that cleans up unnecessary and misleading overflow handling. There is no real benefit in getting it into linux-next because the upcoming conversion to use the common code DMA API on s390 Link: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20231020&id=c76c067e488c eliminates arch/s390/pci/pci_dma.c entirely and, therefore, addresses the original problem in another way. That's why this fix is only relevant for the current v6.6 and stable backports and is kept as simple as possible. Let me know if you prefer the regular way, and I should include this follow-up patch in my pull request later this week. > If you *do* want to add proper overflow handling, you'd need to either > fix BITS_TO_LONGS() some way (which is actually non-trivial since it > needs to be able to stay a constant and only use the argument once), Looking into that. Let's see if handling overflow in __KERNEL_DIV_ROUND_UP turns out to be doable.