Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1260172pxx; Tue, 27 Oct 2020 12:04:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGApamqD+gugT8HwoqWkaTaiPlFH3aIApyM5H4ONsJEX+KsMBA/CjBQOc9tHsEWSRlK2yL X-Received: by 2002:a05:6402:1590:: with SMTP id c16mr3910620edv.359.1603825486175; Tue, 27 Oct 2020 12:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603825486; cv=none; d=google.com; s=arc-20160816; b=TGMC/Rr+/5bBKu2o4/0xft5d1TiQmupN1UDWXATpHfalaAiSj2EnF2jYbtmUn9969O i9FKog4g6jgTwHMGVTMzcNWUzsYiwY9O6PAfCNSEYGEhORulirUDuX4nr3Yqm0RZS4DJ rXtAV+5x8w8QYyvIQtaFqXj+goht9j8NkisgD4/l9HPlsqBv2OtHiv5/D/GMzME4vGwf TEUs4vAffdLfWvlShD5I1oH61E5R+dBjxgS1lO2utiRMwnjz7rbH2XnYOCKEbgdDw6Q2 ZbFGGniX9JEUSvhOooEQk0Nww9Mluvwqnn0DY1MyFlcXAjORtsX4YRa5E0NKMa45agIA p9DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=IE+t2k/aNBLTU/cc0WjdB+LR9YG081GR662z3P/3LEY=; b=IZpmiy1bXfrnTgyWVCN6G/dWtkAywyy44BU1atMKwaKWCFwoFaWr7Wt3g6HG2F1gdH YQtFTFUXMlDGiwMlcgORUJ6pTvBl9mhTY/TD4XL2B/+Iv6+o+3M9UxOSzCDYXCEa23pX LyyNFzc6Fawru4UvwH6c+iQCdTH1yMRSmsg55Lsa6EDzu4+jJRx/Edbfqv04QO+dTVjf 6cPLAuC5NnN08tUdQ8XHzgI9+1C+4GXB7ttabwOAi6XmBiArjSdV0wUy0B8rDoKRDzVm 2RHW6mOts754yuQWEZ3OX6IVPYXw5naHviGvs/UM4zKthZLyUTcAp2lLUUQgyMFdGzm3 Fbvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oo23si1690696ejb.544.2020.10.27.12.04.22; Tue, 27 Oct 2020 12:04:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502131AbgJ0AjZ (ORCPT + 99 others); Mon, 26 Oct 2020 20:39:25 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:44162 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409696AbgJ0Ack (ORCPT ); Mon, 26 Oct 2020 20:32:40 -0400 X-Greylist: delayed 1629 seconds by postgrey-1.27 at vger.kernel.org; Mon, 26 Oct 2020 20:32:39 EDT Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXCYC-009W8g-Hf; Tue, 27 Oct 2020 00:09:20 +0000 Date: Tue, 27 Oct 2020 00:09:20 +0000 From: Al Viro To: Jens Axboe Cc: Linus Torvalds , "linux-kernel@vger.kernel.org" , Christoph Hellwig , Kyle Huey Subject: Re: [PATCH] Fix compat regression in process_vm_rw() Message-ID: <20201027000920.GE3576660@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 26, 2020 at 06:03:18PM -0600, Jens Axboe wrote: > The removal of compat_process_vm_{readv,writev} didn't change > process_vm_rw(), which always assumes it's not doing a compat syscall. > Instead of passing in 'false' unconditionally for 'compat', make it > conditional on in_compat_syscall(). > > Fixes: c3973b401ef2 ("mm: remove compat_process_vm_{readv,writev}") > Reported-by: Kyle Huey > Signed-off-by: Jens Axboe ACK with some reservations - I suspect that we want an explicit flag for process_vm_{read,write}v() that would force the 64bit layout for the vector refering to the foreign process. It's not relevant for regression fix; however, as it is these syscalls are not usable for 32bit process trying to access memory of 64bit one - there's no way to specify the addresses past 4G.