Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp984395imu; Wed, 9 Jan 2019 09:32:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN4L542WEcwa2JVODLpz4SRvy5yKCT24l71pBn0KOE5YiL6MwVEXF9XWlrkZ3a1BVFyd+cSE X-Received: by 2002:a63:94:: with SMTP id 142mr6116276pga.74.1547055144993; Wed, 09 Jan 2019 09:32:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547055144; cv=none; d=google.com; s=arc-20160816; b=FX5F0IVC1dp79C6hOQfpkeabnE7izG58DvlJp8zxHTQMpHZPP/aSusgF2UWtQbSvbY jQFhPmI0+7QnxiPnwE7FztXTwx/x0cs3EYIkemkWKD2O79V08LNUkxNnUnPotcfUjB5M PAa76Rz/eJ1EC/kmbkOaAWm3GEGwrlpffepTvGTxW1B8fjig9IIkJUCceLLb1m469Ahp Ap7HVy0ClT3eDQgfYeSPgWKmf7wS4EnX+uMPhiJGX4Gu/bJO6GyyZccfZlnrCvfakZCP HOuXOyKFmwLgdAvngu1BOKoqM+kyBxSe8h8zvsSIwte51q+jpwZqC4Yk4BsIg2RP8Doz 2mWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vjbGaDlY4j3vos7UOie8DxVecMawV+2oY2/TL7n8zgU=; b=QTUY5Cy2wLs7qdn/HFeYBbG5rwIO3WphH8f70a1Em+cQa4KuQbZcASxVZHV7QZ88eL 1hIzwXRlcF88jywiaaSypVcE1eGsEVLUObFPJ/6xtpf1dxS2PhJOD+m+sOpXjCJ+kCzj z1lW/PfbVBpoghcubM9oXxqjy2opZbEaqdUsWp+AktQJsti7Hx+tPHyflBPchpY5sJaD 0fHw/xgRcudqMnKZ4/saISZNgMgK3PTvid08UpM08uyt+30SPyKTBrVqH/wftsZCNtMp p7r09Ttq/znXmHUvCylfLnpWRz72NBmMrzTLiax+y0rUJ8SMkwj8iZ5nAkY23kM0xTtH Dh4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=aepgE+cW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j14si22173287pgi.354.2019.01.09.09.32.08; Wed, 09 Jan 2019 09:32:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=aepgE+cW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726940AbfAIR3j (ORCPT + 99 others); Wed, 9 Jan 2019 12:29:39 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:45623 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbfAIR3j (ORCPT ); Wed, 9 Jan 2019 12:29:39 -0500 Received: by mail-lj1-f193.google.com with SMTP id s5-v6so7163300ljd.12 for ; Wed, 09 Jan 2019 09:29:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vjbGaDlY4j3vos7UOie8DxVecMawV+2oY2/TL7n8zgU=; b=aepgE+cWGX46jE+yJU/pgMZYj3kYNAXMqZQ40w4HmeAGrpPgJv9EprlMocBh9LygSH JBQwjlnreXCLpk1BWzFqey8QvuAkgRaWpaKogdIab2BbsEfR2quU5taDQnm04kg+JJXc DTdoeL82WsFGTNTiuL/S7iztNZHA3Gz9kRzeo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vjbGaDlY4j3vos7UOie8DxVecMawV+2oY2/TL7n8zgU=; b=dN+MugWGZjJkac21Lua/TFosFdFlXtvjff6dbCLS5uwlBWBLHCjXA3ubv6aMkoaVkJ DxWuFuV0NKVXUI9WWuDIsEZwxSaiZZzsXiUx6qd0gdSZVUFucaSJfP5QA50tWksNZEyI 4TvUQRMyw3vAhfxjw7GFzYGavfQOPDwyFKfpIxhv5c1i3Ge4tWi/XCrXvCd7uJjM3AJG c5CvDt6n+ek1kDjOudzo+DqrUGUkKNBeoqTr3qCZui24vL5sJOdA382SvquU502UDies 3rkg3R3Xw0QaWHWNI2jt/wCaTx2F6DaNAfL20Riy7qu8LzKYEW7TafQxuSIQAyMEfZti 7yJw== X-Gm-Message-State: AJcUukfjSbyKHvkg39f0Hrf+qRl+jvzfKlW0ukeCzJdjSvlZfcyOsWul IK2q6vZg3C5J71wDfv63D/tIKwJtCm8= X-Received: by 2002:a2e:58b:: with SMTP id 133-v6mr4333395ljf.127.1547054976460; Wed, 09 Jan 2019 09:29:36 -0800 (PST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id x21sm13928647lfe.6.2019.01.09.09.29.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 09:29:35 -0800 (PST) Received: by mail-lf1-f46.google.com with SMTP id i26so6275332lfc.0 for ; Wed, 09 Jan 2019 09:29:35 -0800 (PST) X-Received: by 2002:a19:3fcf:: with SMTP id m198mr3868350lfa.106.1547054974492; Wed, 09 Jan 2019 09:29:34 -0800 (PST) MIME-Version: 1.0 References: <20190109164025.24554-1-rpenyaev@suse.de> <20190109164025.24554-10-rpenyaev@suse.de> In-Reply-To: <20190109164025.24554-10-rpenyaev@suse.de> From: Linus Torvalds Date: Wed, 9 Jan 2019 09:29:18 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 09/15] epoll: introduce stand-alone helpers for polling from userspace To: Roman Penyaev Cc: Andrew Morton , Davidlohr Bueso , Jason Baron , Al Viro , "Paul E. McKenney" , Andrea Parri , linux-fsdevel , Linux List Kernel Mailing Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 9, 2019 at 8:40 AM Roman Penyaev wrote: > > ep_vrealloc*() > realloc user header, user index or bitmap memory What? No. This is wrong, it's much too complicated. And because your 'vrealloc()' doesn't follow the normal realloc rules, it looks both confusing and buggy, and people have to remember that "oh, vrealloc() isn't actually vrealloc(), it's really vdupalloc()". Your other patch to allow users to apparently also do mremap of these things seems entirely wrongheaded too. Especially when you then have magical rules for vm_pgoff, which is one of the things that unmapping parts of a mmap will touch. So I say no, no, no. This is all *much* too complicated, and the interfaces are mis-designed to be overly generous to people doing odd and pointless things. If you can't have a fixed-size user buffer that stays in one place, don't even bother. Linus