From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFFCAC4363A for ; Tue, 27 Oct 2020 00:02:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AEE4120773 for ; Tue, 27 Oct 2020 00:02:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="ZWDgA8+y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437444AbgJ0ACQ (ORCPT ); Mon, 26 Oct 2020 20:02:16 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41676 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2411075AbgJZX4Q (ORCPT ); Mon, 26 Oct 2020 19:56:16 -0400 Received: by mail-pg1-f194.google.com with SMTP id g12so6177816pgm.8 for ; Mon, 26 Oct 2020 16:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wqqvkA3oKUwkO5eXRPOBy8lXyQg0CiUtokie2wwagwI=; b=ZWDgA8+yUlKx2dZgiyZDe66Bv6aQYo4o4sBrgULvsJ7L1mqryuSoN/tRsTLtRNf5gl QA5GzgrsJ4IIXk6KefYiWNloPp5dTgRya5PAi5H2X1Ck5liCNMZ9plZFbXAFJkRhGENX zRADl3Fzwzqt5UTeMExAEl9+J6C00UJYGVeM9r+kQpMj10I4tNzbDp+KUhpG26z8ohQ5 u9LGW1VxEtuEY5uYo6W0qmYrYYX9WPLdyfh3K/l7hHXtbXds+UPAtJe/6QdzpKUrKNEa IHnev7OPcOoKpcEMuZBXfSj3e5H/bPp0SHxbMGuGbkkGN2ORlWbNlGQCKJOUg6Ub1kcx WOrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wqqvkA3oKUwkO5eXRPOBy8lXyQg0CiUtokie2wwagwI=; b=DodJEvwVqVoEyDA3ty8svyQnPevQBO6W/vb13s8+h5Fc7Mq9nSMRFPeUtbHIvsidTC HIYXGkbiMJdii9mW7a4q1AtyYeJZjXhK+Zy7cCAQkaz3EG7ITw7lC2qxm06mMlZgxKcb 96bePgf6BsxBV797bfjCAY9cvFlI46S1iTXMwAtXoAVG4dNXvO+O9n4PV/1NRJmOCBRm tM8UAv9ydyy6Wa51RhNYAmzekQfLyW6RaA725NYGgmEfoDxChtR91y8tnfnil6VVsYsz QKsO0PoXmGSVD0KpOB+vY3neu04lFQbAAN3FpA1ocBXxqh71vOrVUF0NYBUV5k99Y7yE zTEA== X-Gm-Message-State: AOAM532kkN80uWGyhSxyQHGBlmL2psBsD5IJVm8TZDIHedCp872oAPZ3 a530HOirftbi7AGR12I2Do+OVA== X-Google-Smtp-Source: ABdhPJzXWytxnG400Dp//klgHvFRu6jftuSrTTs7sW7oWyETnW8LM2mlLlQ2a53Jfzf5mLG9B/rX/w== X-Received: by 2002:a63:5f42:: with SMTP id t63mr569296pgb.0.1603756574857; Mon, 26 Oct 2020 16:56:14 -0700 (PDT) Received: from [192.168.1.134] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id s38sm3637009pgm.62.2020.10.26.16.56.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Oct 2020 16:56:14 -0700 (PDT) Subject: Re: [REGRESSION] mm: process_vm_readv testcase no longer works after compat_prcoess_vm_readv removed To: Kyle Huey , open list , Christoph Hellwig Cc: Robert O'Callahan , Alexander Viro , Andrew Morton , Arnd Bergmann , David Howells , "moderated list:ARM PORT" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, "open list:FILESYSTEMS (VFS and infrastructure)" , linux-aio@kvack.org, io-uring@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, Linus Torvalds References: From: Jens Axboe Message-ID: <70d5569e-4ad6-988a-e047-5d12d298684c@kernel.dk> Date: Mon, 26 Oct 2020 17:56:11 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On 10/26/20 4:55 PM, Kyle Huey wrote: > A test program from the rr[0] test suite, vm_readv_writev[1], no > longer works on 5.10-rc1 when compiled as a 32 bit binary and executed > on a 64 bit kernel. The first process_vm_readv call (on line 35) now > fails with EFAULT. I have bisected this to > c3973b401ef2b0b8005f8074a10e96e3ea093823. > > It should be fairly straightforward to extract the test case from our > repository into a standalone program. Can you check with this applied? diff --git a/mm/process_vm_access.c b/mm/process_vm_access.c index fd12da80b6f2..05676722d9cd 100644 --- a/mm/process_vm_access.c +++ b/mm/process_vm_access.c @@ -273,7 +273,8 @@ static ssize_t process_vm_rw(pid_t pid, return rc; if (!iov_iter_count(&iter)) goto free_iov_l; - iov_r = iovec_from_user(rvec, riovcnt, UIO_FASTIOV, iovstack_r, false); + iov_r = iovec_from_user(rvec, riovcnt, UIO_FASTIOV, iovstack_r, + in_compat_syscall()); if (IS_ERR(iov_r)) { rc = PTR_ERR(iov_r); goto free_iov_l; -- Jens Axboe