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=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 E9BA5C2D0A3 for ; Tue, 27 Oct 2020 00:41:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C87E120829 for ; Tue, 27 Oct 2020 00:41:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502137AbgJ0AjZ (ORCPT ); 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.