From patchwork Sun Feb 5 23:17:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13129155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03748C63797 for ; Sun, 5 Feb 2023 23:18:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=p6e4ozxs6gvz0ScHVWyymox34eeqGJ64354JyUwZvIw=; b=XirWppy1/LoZYe VnBTwTPyXaw1ApC1iFgBoqnwlM2fH/Z6A54+UYKAuyjjLA4NIYD6dUOcY0pqPIpUFGX2k9fmL3tyd 2CnAmFGqSfiHKwVYERF+WuqKgpbk6lMr+trEzRfuErx351p9XUlGt02mxwShS6X2Q26NGELCxDQFs 6pcmo6jnZ1glITfvE6iR2dpdaD2gCCXPCnoB+ZcYyntBFSX9ey+OyCtI0XCJBQK4vPmk23d1zwNEC szHKm4a9/UgTw+XcBqOl0sO66gDdmyx5bGCuv93QzGOnQ0p7/4GL8D+xVyLjcVsQxDT271X1zgqe0 IVgjg+Ml3SLCACDjpp9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pOoGC-006xm6-UF; Sun, 05 Feb 2023 23:17:25 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pOoG2-006xi3-4i for linux-arm-kernel@lists.infradead.org; Sun, 05 Feb 2023 23:17:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675639028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hczbFL+ar/tk/IYpzPCczVyi3teFQZrB1wxKh73TL0g=; b=gLAF8qii/iuEwBLmyjF0T1Y6jdTmzsBC9JuY0dGdh0wfaJT5S3EVu2dbG1NVRhRY5s3/qE N9oJQO4aR+tuSd4Tv5avZh18HY12a1KQrdBvMwzPxV/1bAT0qOGIqGET5XMhUQDeqVv7Qx TiHo+i9cLl60RIy6ikPdU2GrH0/l5dA= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-225-uxRhPuI5NKK1JpTT0PJLTA-1; Sun, 05 Feb 2023 18:17:06 -0500 X-MC-Unique: uxRhPuI5NKK1JpTT0PJLTA-1 Received: by mail-qk1-f198.google.com with SMTP id q21-20020a05620a0d9500b0070572ccdbf9so6862919qkl.10 for ; Sun, 05 Feb 2023 15:17:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hczbFL+ar/tk/IYpzPCczVyi3teFQZrB1wxKh73TL0g=; b=ig2MihHtrudOIFFa/NxTPjrT9vsyQ744h5RV0M2RUTS7pDHbDzZwz/wvKjGFapYxL/ ZBsJdlj80htK/7eoG0+VLbAphqern1ZIZAGLnqINYmyzDKVWHHuCrXHSOJUO3NJp1EUL NWWsbrBzKACjL4YFkbkp/OAyNgE/l0fo8qVrtfkCSRqwohUsyZ8OqiR0rjp4MG35IHBL 2vCBY2mpz9VdN9KMFWC02fN64jbHw4/sTx6LTnwYjOC7GKpzMCzYOuYq6Ivt98lHXsQi Xp3FxxKq2O6w4im9B/sNI86rxt4A0IN+CUZIY9lnj2lZH9a6sxOLPxQRDGDTHPMEDWWb 6ZTA== X-Gm-Message-State: AO0yUKXL1pWV1PwCU5xJsH+lrIblWS+0ZU7b2qjMbFXIj20UHcjmxI8v lWOYaXOe57PKXUQQp+q+ghW4Lcj4+ei7a69DkJqywDtOAs+9kFf99e8CcMv42m/U4ELr2WdZ8Dd J1Xs3y34g5d31EQF8Jv/MFy2r+dDCU3wsZTE= X-Received: by 2002:a05:622a:a15:b0:3b8:695b:aad1 with SMTP id bv21-20020a05622a0a1500b003b8695baad1mr31166806qtb.1.1675639026393; Sun, 05 Feb 2023 15:17:06 -0800 (PST) X-Google-Smtp-Source: AK7set/sbA75b0Czo2TaDI7H5+UellOBQzwBIsx8AnsLPSQNhM0IiyfwrSSGN0x0tfL39bKfeNgbnw== X-Received: by 2002:a05:622a:a15:b0:3b8:695b:aad1 with SMTP id bv21-20020a05622a0a1500b003b8695baad1mr31166787qtb.1.1675639026141; Sun, 05 Feb 2023 15:17:06 -0800 (PST) Received: from x1n.redhat.com (bras-base-aurron9127w-grc-56-70-30-145-63.dsl.bell.ca. [70.30.145.63]) by smtp.gmail.com with ESMTPSA id h26-20020ac8515a000000b003b82cb8748dsm5986545qtn.96.2023.02.05.15.17.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 15:17:05 -0800 (PST) From: Peter Xu To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: peterx@redhat.com, Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org Subject: [PATCH 0/3] mm/arch: Fix a few collide definition on private use of VM_FAULT_* Date: Sun, 5 Feb 2023 18:17:01 -0500 Message-Id: <20230205231704.909536-1-peterx@redhat.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230205_151714_294975_799BFD02 X-CRM114-Status: GOOD ( 11.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org I noticed a few collision usage on VM_FAULT_* definition in the page fault path on arm/arm64/s390 where the VM_FAULT_* can overlap with the generic definition of vm_fault_reason. The major overlapped part being VM_FAULT_HINDEX_MASK which is used only by the hugetlb hwpoisoning. I'm not sure whether any of them can have a real impact, but that does not look like to be expected. I didn't copy stable, if anyone thinks it should please shoot. Nor did I test them in any form - I just changed the allocations from top bits and added a comment for each of them. Please have a look, thanks. Peter Xu (3): mm/arm: Define private VM_FAULT_* reasons from top bits mm/arm64: Define private VM_FAULT_* reasons from top bits mm/s390: Define private VM_FAULT_* reasons from top bits arch/arm/mm/fault.c | 8 ++++++-- arch/arm64/mm/fault.c | 8 ++++++-- arch/s390/mm/fault.c | 14 +++++++++----- 3 files changed, 21 insertions(+), 9 deletions(-)