Message ID | 20241217195000.1734039-1-david@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 9DAD1E77184 for <linux-mm@archiver.kernel.org>; Tue, 17 Dec 2024 19:50:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 06FAD6B007B; Tue, 17 Dec 2024 14:50:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 01FCE6B0082; Tue, 17 Dec 2024 14:50:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E294E6B0083; Tue, 17 Dec 2024 14:50:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id C5C116B007B for <linux-mm@kvack.org>; Tue, 17 Dec 2024 14:50:11 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 2CB54C0231 for <linux-mm@kvack.org>; Tue, 17 Dec 2024 19:50:11 +0000 (UTC) X-FDA: 82905491928.14.05B30CD Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf19.hostedemail.com (Postfix) with ESMTP id 668B51A000E for <linux-mm@kvack.org>; Tue, 17 Dec 2024 19:49:36 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LDyGzpXX; spf=pass (imf19.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734464976; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=QiZlarG1yu2H+EY33I6/wxU1gz8WjSpLM11KEi/0F6c=; b=lS5dn+lx03cpUJqGvtfPgDxHk79lVruRgFXMnnrqWfzKpuUS7IQGv3Kk3GLv86tcAclZLQ YgQj6jCja7q4Oq+nf94UKkd8mkVAp4h+fNOT8lgCzZfWVeWKmLjW+/UNQmSgirBYGi18g6 oWUdX//V+niCKIEnK+DykU3HwZPA2U8= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LDyGzpXX; spf=pass (imf19.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734464976; a=rsa-sha256; cv=none; b=M6ec+dmAlAdMMBLJDqfFqy/EZVBVi/0FjrC8SgB9Hn1KirX3FmkxFLOvsi1v8tV+2hIBFU L9gK6Zv7P6wMFyfegV14S1ARYUKXMIZb4Aev8QT6iiaGWZAvRQKGAkWiAN+3wR3U/qY+93 JyNfCX8l+s1ya/vz0hx6kRdZiZpbkWc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734465008; 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=QiZlarG1yu2H+EY33I6/wxU1gz8WjSpLM11KEi/0F6c=; b=LDyGzpXXDRDedZ7QkONPIlxF/D/+bBPh5aurPe08TuCwsichen1L762RWTIdKhNlkCX/Rp emzqOCGaccQHIsoxpOaqO1U7u7Xxhwe+SkNdYj6x4BlOgMMTZenbrhsQGW4c+5OBL8zqZ3 5yTEO6Ig6zoqkmXjDZWbGGES+sMyjDA= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-199-_tKbTXeZNB6QdRTYAB6PWQ-1; Tue, 17 Dec 2024 14:50:04 -0500 X-MC-Unique: _tKbTXeZNB6QdRTYAB6PWQ-1 X-Mimecast-MFC-AGG-ID: _tKbTXeZNB6QdRTYAB6PWQ Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-43624b08181so241165e9.0 for <linux-mm@kvack.org>; Tue, 17 Dec 2024 11:50:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734465003; x=1735069803; 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=QiZlarG1yu2H+EY33I6/wxU1gz8WjSpLM11KEi/0F6c=; b=rWVjFxD511nhgQVFyQCVznG8tXI7zeuMHVZ+qZ9bepBh+ch4LhpBjNsfe1OreTSyMV iR9je7PuxtF+R2CvJexq4vfFDgjZsWxGs30TrJgbHgSKoyXNkR3/g2K1FfkjSIkXCyGo 7s/KT2/347YcPoSfrqjW1mr6wOFeQ2WdGoSas0lw5KqbrkfmuI3CAcHgfanJiL2UZ3d1 hpMpPV+tM5uXZqIfP/dspP2rrH2mDJXtLF3JmzOYk4Z3O784SlprSG3zlQa8aurdFB25 OmkaYUTYp4Pni2Ws60wevPcbvf5/x351P3wjGntjVctp5I6Kwn3M7fbQLIjoAOLbgogM SJCg== X-Gm-Message-State: AOJu0YxH50dr52o3T6fpBjSkLIdFmY2HGdzDSI8Aw02M7iyAduWlquSL 8nqLISLxtPa3gTcg20kzfkMa/TBrzkVkuSVKSoe8xjoJf1RoPU+pRToFcSOTKa6LeybHmbA5qRP E0S5W2f88jRd0LnrCos1RMOdtviBLeKYpWpSZZz2Z3vaCj0L5 X-Gm-Gg: ASbGnctmrYJJ4g6oQ0R1srjfghczG8QtXqBNT2dUZdWLrrFEdZGeLUPHLyMBLYVUmKr ais622W7nqQmzq/EN+VI/4RvBFIoXQB4DdCGH+ZK+ColHQYm7Oko2PE1Af+gnmPcBq2UX3SUB73 7TvWGnZRgoYMRmJFFdbN8fEdSHMVHZ8PHyji8crofRbEjFAvzTAPp7hZ5xtAFtv+V4VzC33EnXS yVGwElqZNN5hBzkXM7nGrG+TLS1u+ZSqEkc+DHa/KMV+1RN2XgeRe5BVUPFdPEOnSVLJI4QXJDu LsGqU9MwIepMBDdZzZ7QmoPj4IuTnXVHs8hG4WSM5w== X-Received: by 2002:a05:600c:4fc6:b0:431:15f1:421d with SMTP id 5b1f17b1804b1-4364820bd31mr43596235e9.16.1734465003229; Tue, 17 Dec 2024 11:50:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGu01heuMRPqdAutYPFEMpZEU82k3XDseEOR+rvfMk6ZreF6rabCJOfIKhZbv7US17WUW2jqQ== X-Received: by 2002:a05:600c:4fc6:b0:431:15f1:421d with SMTP id 5b1f17b1804b1-4364820bd31mr43596125e9.16.1734465002900; Tue, 17 Dec 2024 11:50:02 -0800 (PST) Received: from localhost (p200300cbc739b8006397a28153925533.dip0.t-ipconnect.de. [2003:cb:c739:b800:6397:a281:5392:5533]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-388c8060862sm11817576f8f.100.2024.12.17.11.50.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Dec 2024 11:50:02 -0800 (PST) From: David Hildenbrand <david@redhat.com> To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>, Andrew Morton <akpm@linux-foundation.org>, Oscar Salvador <osalvador@suse.de>, stable@vger.kernel.org Subject: [PATCH v1] fs/proc/task_mmu: fix pagemap flags with PMD THP entries on 32bit Date: Tue, 17 Dec 2024 20:50:00 +0100 Message-ID: <20241217195000.1734039-1-david@redhat.com> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ffc8KqysrIcGiXe3kBeaCdMXaLzsJbZ9yzHQHBFAcCE_1734465003 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 668B51A000E X-Rspam-User: X-Stat-Signature: zo5mkjtqnw1m5sakz14k9q4mbqcatkiw X-HE-Tag: 1734464976-237162 X-HE-Meta: U2FsdGVkX19lRdEv4JI4FDhsr/xU0ZLeFXaAHoJi12RxlH/0g8GRuponmOAwsLIJj2Z7H0zwxElPNvb5mBKC89QGZkHXFbOnZ0laxDjYcPHXPutyTS5g1PHlofCXWHfFh+Vo139+Ru5xSijZTk0F3HbiBH9iY/dsfJ3GIfYqczRRqOFjdt6uQOw9PcAZw/JB+d3oXBD/z9lC9GCEA4e4lTBCM81Dr56D6NfTUvwHlIRRImH4jxcxpQW2JxBRyAp9XXGwhpGt10c8j4aNYQCnqtp9SoSTwCHfC85bNJZN1t7387cTtEgdDd3vpRYyex80lmGQcNQlnKzsLx6CokfugNE79eOoqRjbMugKM//sDYma0QcXqSLf69l6wKOzZ0ZEQvXGWP/WWdmue4kfYQZiP+3aSakPXVaQ2Hg5iz7t4Zp9IRaef8CBHH1fbj2FxWnEBOfurAyX0e2snaGLux2ZpkRponIYODDgvd1UWWIxxZeXA6YSnnAyAlqE1C1nqJmDcraRAdlIFZ1Yn/Fg/s8qiHXrcSKXTfEMQJq2eFqEOQacCyoASsSJBTfLm8fbND6ygHIMmaCGyLvPaz5lTePxniqHtRQlNfpXo/tg7mlz0BWV1EltFjgMrUKz+uTNmj+VgMBswc9Kn/ru10uvriLweLo/QfJ/NBlfjTiHuEcvo+15tC713wHsv9ehnbzUttsgQSI69nq7BOVar17rs3nx9gV/94uQXin/zFsH184bi+OG+FddY3lggcOELSvAghc4INsMJbyoKpkgeGTB0vMQB3o75fLjc/XmZ2iVk8C4vWpaRbHoL6wD1JyxWmPwJvOKXoKnbh2ktHv5PTwIT9py+FpIh89unUtqyO537UPY3REOE48/2ZZvNGI/8inN6rsBSuQGV/jMSVOUaVYrrZMQZmFtt0hYGmNz8EfrQKQcfgVwZC4ij/wrOJmTFbXLO03iwCHUEOHOeWi/Tl2AWu1 7d8Try45 nrGA+j6Tlb0V13yUQ0ri79w9BLCsNMbWYV4OJKdfYSxeSgrURTncIqHKt0quBE6ud7hMwGfyVdM7oqbWtvn7cpeIkwEXGFKRF6io5d5ZbNRCEYHlbXUsWFY9gK8MGNwrs1VsmjEY9zhtHGUv4n+fRuWNPt9oEueSp1nTBdUXSbcR9ijcSPXS2SL4TZTdIqsQgu2HftsTetjGnUkQy+2yJDdtsa5a64NUqZozJ6AxDFPaHJn0wn3IiYa2IZrXxtVgYGgMep40fgbd68qph/Nz0IDBRrJfSuXc0Qv3wE5Jgl4FmwU3kBVY0wcTFk9NR8mOzz2Mie28ygPbIIQ9Xu4c696HD2wjlffTpohnRYsWjKb5iHdMKnIQImRSbcflgu+oS0x7BJOP2Wg1dXkpxfRBIKPO8e2JEB0nLsfWL99/UmDKo/rba4+w1jZOYLqp01anOmMqW4vYR9KfolOtdySjofi15J1N3XDSpCseUAqog0H0OHrsrCUS39ISSZZ1dvhz5FFhTM5/xy18V/xRwMWZnfNxk2izHx5ju71SkMYCFLC70D7ls4m6M4dbd3A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.001180, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
[v1] fs/proc/task_mmu: fix pagemap flags with PMD THP entries on 32bit
|
expand
|
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 38a5a3e9cba20..f02cd362309a0 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -1810,7 +1810,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, } for (; addr != end; addr += PAGE_SIZE, idx++) { - unsigned long cur_flags = flags; + u64 cur_flags = flags; pagemap_entry_t pme; if (folio && (flags & PM_PRESENT) &&
Entries (including flags) are u64, even on 32bit. So right now we are cutting of the flags on 32bit. This way, for example the cow selftest complains about: # ./cow ... Bail Out! read and ioctl return unmatched results for populated: 0 1 Fixes: 2c1f057e5be6 ("fs/proc/task_mmu: properly detect PM_MMAP_EXCLUSIVE per page of PMD-mapped THPs") Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Oscar Salvador <osalvador@suse.de> Cc: <stable@vger.kernel.org> Signed-off-by: David Hildenbrand <david@redhat.com> --- fs/proc/task_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)