From patchwork Wed Mar 15 03:03:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 13175241 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85614C7618A for ; Wed, 15 Mar 2023 03:05:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0A9CF8E0002; Tue, 14 Mar 2023 23:05:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 059B98E0001; Tue, 14 Mar 2023 23:05:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E62B78E0002; Tue, 14 Mar 2023 23:05:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D37318E0001 for ; Tue, 14 Mar 2023 23:05:29 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A229214016B for ; Wed, 15 Mar 2023 03:05:29 +0000 (UTC) X-FDA: 80569641978.02.FD0660D Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by imf25.hostedemail.com (Postfix) with ESMTP id D24A7A000E for ; Wed, 15 Mar 2023 03:05:26 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=3V0Bb6iT; spf=pass (imf25.hostedemail.com: domain of palmer@rivosinc.com designates 209.85.214.181 as permitted sender) smtp.mailfrom=palmer@rivosinc.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678849527; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=6StZGYfoZTn12V1gc6oBX/6Y2DvQg0Jy/UiSWe5dt5k=; b=Dju4c7CuEpnRBPGb9irmz0xm05mI+Y1fgijDtSHmc56IfkLtIhtam0CAW2s7YRYsBVlx+I uridZHPg+lzGw1ulE1Qamfvc/HwvCpWjNQwmpWEYl5p72HQ7SZZ/RjmldKzhM2ABBwrFGO nkruI9oxWjRj+FHur6VZ7geCMrjCCn8= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=3V0Bb6iT; spf=pass (imf25.hostedemail.com: domain of palmer@rivosinc.com designates 209.85.214.181 as permitted sender) smtp.mailfrom=palmer@rivosinc.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678849527; a=rsa-sha256; cv=none; b=yTggGOCqCe7SKdJipZwTW+Dsgh1YMjsvgIri4VmSFhF5IlmtRA54oRFcklxieRJ3+ufFdP 7WDJzg+4CgWdtgudShEOdPd75NcIGzt7O7zSIB2IgdHnROoKwKrV7/ES2YR639h6fuR7vO oViKB7LpFWbpx3+ag3z5R2bVP0/L3Eg= Received: by mail-pl1-f181.google.com with SMTP id a2so18648215plm.4 for ; Tue, 14 Mar 2023 20:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1678849525; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=6StZGYfoZTn12V1gc6oBX/6Y2DvQg0Jy/UiSWe5dt5k=; b=3V0Bb6iTGxYmKPdsmVVjb5YDGt0UOAUN+A63mxQz3ZYfjTdMu6saa1R9Gh/rv2eu3b IqZWD+VN2oPSDYDCUvatQ4pau1AA/Sd/BYem1kyIblQ/5fKzJ8LxZrvAcO76NkyEBg2A 5eHppBwHYa29Ssst5SUa4NtXUgz7L8tVp7rEyvOYiKl/M/GVTjbcxYl3tZ3PQnBtljyw /AMdtGyiBpRg3TQgYbXAgKkKQg/Mur2bMI/JRQ4dCGxKp8XAUqhAE6RXdjIyeznreE/Z k6dw7jlQGLWe+FMvQrwiPB/7+1y/tkZpFmWQwn4XUut9T5VSQQbLMwvqLJVGFOsxSzi1 APDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678849525; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6StZGYfoZTn12V1gc6oBX/6Y2DvQg0Jy/UiSWe5dt5k=; b=ZS16rUlFeNj9WCezbNtZ9a8aqVwx6tXonBitiW+0iTevERy94iSsfjTnPPs4tiQDvv j950B3zZcB03U4vOoZLgoNNv6hgJlFsKtLuOVDM94RdYp9J5DHwzR+Vj4nztxpzWWI7o eNsoJUag3toNGDcmfdCyfmhll67le3CjQOSsr8zrBt7Rw/oI669b9XrDz2hiCEpiRgkT +qJ0jMzOLkw0MA7Mtoo4LTOyqWGXlI36Ap2PU6hoFmkBu9rPeIagYscdZ38vcsGgFmsT rCjY0LHwltrYxQ0uyC9sm6dS3R29hH/UWT7xczywbtQcCuNhiZjIhcl9L3RPk23Ts/Ga us0Q== X-Gm-Message-State: AO0yUKXQA5aR1XGLLBWyFUAAIQzJshCetluU6IAv4LRQNhGFWyud03hw ZF3KCAk9n+j2UMZ15hhVC+BV5u8Xy09WBKlf+6w= X-Google-Smtp-Source: AK7set/ZRFjpxyImRiC63oPA7QR8aY+ZSsRYZkScRh+gExeQbc7hhNGg61z3G7A+k1lQU+zBzKMA7w== X-Received: by 2002:a17:903:112:b0:19f:30be:e9fb with SMTP id y18-20020a170903011200b0019f30bee9fbmr877545plc.19.1678849525353; Tue, 14 Mar 2023 20:05:25 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id kz8-20020a170902f9c800b0019f3cc463absm2469104plb.0.2023.03.14.20.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 20:05:24 -0700 (PDT) Subject: [PATCH v2 0/6] mm: Stop alaising VM_FAULT_HINDEX_MASK in arch code Date: Tue, 14 Mar 2023 20:03:53 -0700 Message-Id: <20230315030359.14162-1-palmer@rivosinc.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Cc: linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: Palmer Dabbelt To: akpm@linux-foundation.org X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: D24A7A000E X-Rspam-User: X-Stat-Signature: x3tsrnef393dkidcfq9u9pdtpeakyutb X-HE-Tag: 1678849526-706181 X-HE-Meta: U2FsdGVkX19Mflo3QGkpHCz2ewqfw9sM2yKM6NReK8v1BaQnSHfA1tBiMk8X8Up3j23tbppfOPvWNFnHgNcq1MVlbCDGwdcH7bgD7SUzEk7D+YRdEeZGDZlLYsH3xGV8xLuRRZiIhp/2bspoz9qY0pP7wh9GNftmnYuvUxZUQCXunBBgyv+DGV/KtVsK1V6ZrZIDcQkDg8t+Hp/diJoIY3yZzg3lb5zr85f3saPqNyntv242yNTCWUM5p5N1RMmhSHuVrHX9Z4Iax1Yb9LGEr69WsAHi+F7TmVNy78UHFrVlRJo0IhW0o9pZURN0/B+w4LxV2UBu+XrW9uVs1EJX5hYn61CngCHArwTs/fBKFLnk3Zpm9LMtNP0ABnw4hyUABdawN3RKZDJtNtT7AOhj8k7tCN3N76kG1fSOG6D5vZDPSSEFhdQfRGuKYAoIz3WdreZjZPfErcoDaXPAp5rLKY1am/iyBbEyh7TABem+X7SU02ew7itf0aSC2WMCCShD2GOKm6vA7fCm2ojt0Bx8Cr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0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. I'm including that original patch this time in the hope that makes it easier for folks to review. There were some boring conflicts so I figured I'd rebase rather than pinging again. Changes since v1 <20221203030356.3917-1-palmer@rivosinc.com>: * Add the original patch, and reorder the RISC-V stuff first. * Rebased on v6.3-rc2 * Moved the comment about VM_FAULT_ARCH_* to the patch that adds those, rather than the patch that adds 0s.