Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp477829pxk; Wed, 23 Sep 2020 08:00:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGH4UYD1lZS8jdogbARZclCk14quNun+hvmvzFMAbYT/u3LOptZs9j8agMEVjmKQg52zpF X-Received: by 2002:a17:906:14c9:: with SMTP id y9mr8213ejc.523.1600873241981; Wed, 23 Sep 2020 08:00:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600873241; cv=none; d=google.com; s=arc-20160816; b=DQUUcFcuRY/is2iXCtafWymQ5dD2nX9OQliDrdjkX+na3887beku3ALI6YvQ1RQ6z6 WFN6aT+2Eo4u/jj3678Igqiz601q7eoplHopQu4YzggafxLDSVVtOe6654rYSPwsBcFl u8hMTf/6bOSQ4vEdpjCKQC0/NJE8wDDvqfcK0yUvD8BmO5EOBJsWD3OIGVcybdF0PU2m Cc8+epZKPjsiQ2YconIHBtVni/STDls0gea/QDxMz+KwLRB+SWVElxSnoSoBeNaX/wuz 11aSRYnNdh6sJwYD91FUOrXChlRuZFl1d0GCLzb23li5Vg/cYpwuZmXHLENaa/2Zcbtr /eEg== 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=9+eyAR8//rdBTqkvBWYHUjxMSVxX6MD9VMvwpvLusnM=; b=EwOKSL8xVsSj/rrTALm4QAiXh6zQLmSUtManRSuZ7SQx3x1pnEWMAN8l4ridfEYnMz KSvE2/VLmB1wn1aZ7dzMfrJQoGExmiVGkRT3aCir/k4dNnPq1I5Y2sKYVfSN5N3H/Srq Me9GvcxZ59w/PdrVA7DnZjUXA9uagzxnfwKIDl4cMWiTzp1O+vMRFS/AO/GpYzOx4TkR jX2H7Hvui6wXMxZYs8UCX+WoFGgCWgU9f2AvhYEZ+/6Bf2vZO2By8zll3SzuF9THGQiJ IlzNRd4Z3bdP/IKK9ZjovcJHdDYedkGg/vQN+s6nJosKeN5Dd2i1V/CSlqPshniQNPWp 7+BA== 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 x11si14375edl.498.2020.09.23.08.00.11; Wed, 23 Sep 2020 08:00:41 -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 S1726671AbgIWO7N (ORCPT + 99 others); Wed, 23 Sep 2020 10:59:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgIWO7M (ORCPT ); Wed, 23 Sep 2020 10:59:12 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B643C0613CE; Wed, 23 Sep 2020 07:59:12 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kL6EX-004bOc-Io; Wed, 23 Sep 2020 14:59:01 +0000 Date: Wed, 23 Sep 2020 15:59:01 +0100 From: Al Viro To: Christoph Hellwig Cc: Andrew Morton , Jens Axboe , Arnd Bergmann , David Howells , David Laight , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, 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, linux-fsdevel@vger.kernel.org, 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 Subject: Re: [PATCH 5/9] fs: remove various compat readv/writev helpers Message-ID: <20200923145901.GN3421308@ZenIV.linux.org.uk> References: <20200923060547.16903-1-hch@lst.de> <20200923060547.16903-6-hch@lst.de> <20200923142549.GK3421308@ZenIV.linux.org.uk> <20200923143251.GA14062@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200923143251.GA14062@lst.de> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23, 2020 at 04:32:51PM +0200, Christoph Hellwig wrote: > On Wed, Sep 23, 2020 at 03:25:49PM +0100, Al Viro wrote: > > On Wed, Sep 23, 2020 at 08:05:43AM +0200, Christoph Hellwig wrote: > > > COMPAT_SYSCALL_DEFINE3(readv, compat_ulong_t, fd, > > > - const struct compat_iovec __user *,vec, > > > + const struct iovec __user *, vec, > > > > Um... Will it even compile? > > > > > #ifdef __ARCH_WANT_COMPAT_SYS_PREADV64 > > > COMPAT_SYSCALL_DEFINE4(preadv64, unsigned long, fd, > > > - const struct compat_iovec __user *,vec, > > > + const struct iovec __user *, vec, > > > > Ditto. Look into include/linux/compat.h and you'll see > > > > asmlinkage long compat_sys_preadv64(unsigned long fd, > > const struct compat_iovec __user *vec, > > unsigned long vlen, loff_t pos); > > > > How does that manage to avoid the compiler screaming bloody > > murder? > > That's a very good question. But it does not just compile but actually > works. Probably because all the syscall wrappers mean that we don't > actually generate the normal names. I just tried this: > > --- a/include/linux/syscalls.h > +++ b/include/linux/syscalls.h > @@ -468,7 +468,7 @@ asmlinkage long sys_lseek(unsigned int fd, off_t offset, > asmlinkage long sys_read(unsigned int fd, char __user *buf, size_t count); > asmlinkage long sys_write(unsigned int fd, const char __user *buf, > size_t count); > -asmlinkage long sys_readv(unsigned long fd, > +asmlinkage long sys_readv(void *fd, > > for fun, and the compiler doesn't care either.. Try to build it for sparc or ppc...