From patchwork Sat Dec 3 03:03:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 13063403 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 DA66EC4321E for ; Sat, 3 Dec 2022 03:06:53 +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:To:From:MIME-Version:Message-Id:Date: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=cG21Sozqjkv83yK+WCMOtrtECwg5WJB9Mkd7vpL8wb4=; b=JPFkxdDVi318h3 Z8pwTldmhhgo3tcQh9u9bFWJy1tZ55EAQDb/F0syC9I7f/QQrvwC99HFE957Ii2l9Wgqyo0f1gvOQ zOQOQJA0ffr5FsFLviKdew51qnddQMHFUtn64G3Fwtr0QxPYHSQT9EK4Zu1ietxZMqPRbn/7KzXZC 0y5GMbyapc/xt8xP7tdEkKTXsvP+798BFpYKuwg1BCaVycWDRCVvG2gErDWfTQjBg9nrAQ435WGUy LyXLakXXL40TPfDHc8PhULvj4uF37yDrjUknIYG8gMTaDRLRlNP19zf8dg7d4gGUjKInYd35GPdEZ uSs5dOUFhiy9p7c/QvRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p1Iqb-002AgV-Bg; Sat, 03 Dec 2022 03:05:49 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p1IqU-002AdD-N7 for linux-arm-kernel@lists.infradead.org; Sat, 03 Dec 2022 03:05:45 +0000 Received: by mail-pf1-x429.google.com with SMTP id x66so6585286pfx.3 for ; Fri, 02 Dec 2022 19:05:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=to:from:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=MlD/Jt4lEh7hCsdG4GrZC5S+VkhD7NzUj5refRzoYlM=; b=izvAm0VDDUI8l/g0FySHjcna49MAYiOl2i2nsHUCSKpwH56Ir0FhArtL4lxajgpkXU q1iMarjU2+4l78dL0ag6d1NvQOqww04i5UnypzOB7uiJNMdv6ZNzb7EMxtmw5MZyE7FS bThPfxkT785nXJba2CClXZ8fuV2fw9cigmtlu8HPoTnQiyjsAVLVsY+Z6ZgI5QpnZlNS ohghGfzoUn9u90kZ6rVg/9evUP6bC3tPDT6pLi+TdYbrAm2TFz5GcZZc1u/bdGibPp/B 2n2b2AfXkggu33bWgZZ5liaNgIt/NwMzjqmw4UnUUdoXbVq6av/nJ7otAE/nEGEaYUqj 79LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:from:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MlD/Jt4lEh7hCsdG4GrZC5S+VkhD7NzUj5refRzoYlM=; b=sm+g+3/5ZM8Mr+o3Q+oh4zAC0NvTfjSo4hLSpSxx3HCuQ6F/X2/ydOMxpYF+5fuCUa rksqEfKqjoRqFZpfCg49vQkIAUXBcR59S0pXn7wGjlBS0MurDIshkatqoKtxqGOWFQpB UiujRgdiuv+bxeo05GExcWlAJ1nlR9RnMhooucUvUHGGBwgPdPdM70xmC5QTn6W18y1k zt3Eo/U9HVsBp4Of+9qGZV4S2bbG6T5TqQ04kUqdSoPT5ubfNw/BWEovbFnTY0jE+GPx 97jqTma7buYZ/UYRQUnW4EJhNqUzdtzPRrLHslETagDSxPTpfgOk2mATZiyxARlS/EUA CtaA== X-Gm-Message-State: ANoB5pniEvuiYwsH2pUkk5eVR0uTrUF0rCjmRN3sXgVF45IR3RPaxpBq dxt5lT/+vtqCVPET0i74P7vcZRoWolLyZHS0 X-Google-Smtp-Source: AA0mqf64+QPycPCkazRrryQxpdG0UWxw0OahAJX32vqLElr+emlYUBPO7ldr1//HTp+r6hNM6u2ung== X-Received: by 2002:a63:d34e:0:b0:477:650a:705c with SMTP id u14-20020a63d34e000000b00477650a705cmr46384100pgi.588.1670036741697; Fri, 02 Dec 2022 19:05:41 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id q24-20020aa78438000000b00576984617b1sm287450pfn.60.2022.12.02.19.05.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 19:05:41 -0800 (PST) Subject: [PATCH 0/5] mm: Stop alaising VM_FAULT_HINDEX_MASK in arch code Date: Fri, 2 Dec 2022 19:03:51 -0800 Message-Id: <20221203030356.3917-1-palmer@rivosinc.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 From: Palmer Dabbelt To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221202_190542_997938_1126A72D X-CRM114-Status: GOOD ( 10.54 ) 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 When reviewing I noticed that the arch-specific VM_FAULT flags used by arm and s390 alias with VM_FAULT_HINDEX_MASK. I'm not sure if it's possible to manifest this as a bug, but it certainly seems fragile. The RISC-V patch is on top of the linked patch above, which isn't in any proper tree yet. Everything else should apply to 6.1-rc1, but I'm in no particular rush to get that cleanup in so rush on my end for 6.2. That said I figured it would be easier to send along this now, just in case someone who knows the MM code better thinks it can manifest as a bug.