Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1421633ima; Wed, 24 Oct 2018 21:46:54 -0700 (PDT) X-Google-Smtp-Source: AJdET5fhy/UICLReYalV6mD7PoiztIJhMxa7Ypsh6mw1+6YhcsFb8Ir2GcGtOl9Ms8sJoz7VHA0I X-Received: by 2002:a62:5ac3:: with SMTP id o186-v6mr71831pfb.40.1540442814878; Wed, 24 Oct 2018 21:46:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540442814; cv=none; d=google.com; s=arc-20160816; b=icQgWBF7FlKEYw5O7aV3+C1xcKUQAbKyItOa8dAHRMCOR9fCJLLtnCvKo36K5UmBAu mwVny8ecYrH19pQOkYEXd9VELq/D6OQ61Smqaaj9A8aiOwDqzTvxBKoyOq54vlAEH8W7 eKPZrYc+sclxYTZrg9o8no+tSamht3DuGsYlTA8tYamsPRHdjP1KimN5lQ3zM5+95UCl XiEBy/XC7pHqHWs0iykqCqdaI82wZojIq79JRA63AX9N5K8Eu1YdrsL69oRakdmGLhHw EXNCqTQZxRr7qGJWCMXw2OMxVjdgp6viSRDj3kaTONLIO0rclhy1FlbVXYooRse2rU+3 Tg3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=zJDdA/8Fw3EIaDDUKKYTssf0Ryvete4RrtcS9MP64q0=; b=qA6ax0CiLihWxtM122gxOYiHSXRqPPR3FITV9GvLgwOUkzdROmpvkv6x3rya2X6Bcx ejT9vy8Ff4dKgmN+b5BbOAmfipXIKSZ5qqCIuXgREBK7nUzwbI0Xgwdy/5ubC9KU8isK LFctjDBkGWNh2tlTg7k2jJZVgIxpYpb08Uo39rYjUnTwVvXqZDtJN/0k6ep915Q0Q4Ge vzOGlAlkAgFGy7jq6umDdJcrYMzGSbsx9tJC+hjv4fvDnUktKzQI02tFoDtYhEyXBCR+ Lebmkko83rtzkI3vMMZ0gKKfiTSVRaWDz/cyZBM3dPpYxFTSZywB1mIF2OpJD0ESQ/ea zmvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=PlLhV1Zh; 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 j16-v6si6596030pgg.350.2018.10.24.21.46.18; Wed, 24 Oct 2018 21:46:54 -0700 (PDT) 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=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=PlLhV1Zh; 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 S1727126AbeJYNQd (ORCPT + 99 others); Thu, 25 Oct 2018 09:16:33 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:34654 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726685AbeJYNQd (ORCPT ); Thu, 25 Oct 2018 09:16:33 -0400 Received: by mail-pl1-f195.google.com with SMTP id f10-v6so3289476plr.1 for ; Wed, 24 Oct 2018 21:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zJDdA/8Fw3EIaDDUKKYTssf0Ryvete4RrtcS9MP64q0=; b=PlLhV1Zhj5/SRR2a/Tq/28eFZRtzW8SdHiamBnGhLqjNcepYXK3ygxLHajfhEPbL1q 3HSvuAq4kLwQnH6R5PGlccDsepkOc6+a3hkpzpVJo9E6BuHAZBZVYfnERsQUQ7LZgJEH gV5EyRZhMn0UVCQlIzJcc1XFas7L4Pb3MGQaoY2g7/RNDxVW7wpv0Bm+E0boXjuUT3pv 5xRjBFM/PQJaGVgxeWGdhkZ2t3E9c6lmZBO3FJ8iD2ncTSVUUXUjwz1IEsU1Ve/2p9eq JTL7xvsm55HQt2ScWoLPxCZLZTsTFiHnaB7drWQPBkR3dDntJboT7X4q/JNdzm9M2+bV EHDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zJDdA/8Fw3EIaDDUKKYTssf0Ryvete4RrtcS9MP64q0=; b=oEZE7J7Br69+qBoykZO4Ov8nBQt09g5aYjpVIfw+KIOm7gJW4M+9glv8WVcxEwdsnR 8bTuW0AuN1ku+DKrkBcsTL/EMB+8U6YuXhOw72wRNN9OPKl9Uh63Mx6oytMME2NXzu67 im6XmVoDn8UDK2IW9EZERctSkU77aCrHSTlgENgihQnOErws1NZTAzm9Ud5psT9L1wGO m82La+nYYSEXK2jZ6RC+5PyjlEQr3aeYNjEaJllenORl4KOJxr/ovtMYQ1u2ZHYHgrJy BZejyPCBfLhXPa0/zcTfRKRYoQgxa4nKigAjl2PQIKM0GlKTqGtInVhVFmP1OdhMvbR1 Ec0Q== X-Gm-Message-State: AGRZ1gLF1ZO9gZhnQr7L+WT+ksZNX5nDody1GS/GWpNaKxHJqjzAnDJm rKkNngpu84IDnOZfc7yRZWE1Zg== X-Received: by 2002:a17:902:8342:: with SMTP id z2-v6mr29187pln.147.1540442733320; Wed, 24 Oct 2018 21:45:33 -0700 (PDT) Received: from ?IPv6:2600:1010:b05c:3179:787a:b0d3:85f0:a03b? ([2600:1010:b05c:3179:787a:b0d3:85f0:a03b]) by smtp.gmail.com with ESMTPSA id h65-v6sm6867934pgc.88.2018.10.24.21.45.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Oct 2018 21:45:31 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: in_compat_syscall() returns from kernel thread for X86_32. From: Andy Lutomirski X-Mailer: iPhone Mail (16A404) In-Reply-To: <87o9bi6632.fsf@notabene.neil.brown.name> Date: Wed, 24 Oct 2018 21:45:30 -0700 Cc: "Theodore Y. Ts'o" , Andy Lutomirski , Andreas Dilger , Peter Zijlstra , Dmitry Safonov , "H. Peter Anvin" , Denys Vlasenko , Linus Torvalds , Borislav Petkov , Ingo Molnar , Brian Gerst , LKML , Thomas Gleixner , linux-tip-commits@vger.kernel.org, jsimmons@infradead.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <1460987025-30360-1-git-send-email-dsafonov@virtuozzo.com> <87h8hkc9fd.fsf@notabene.neil.brown.name> <871s8ndg6a.fsf@notabene.neil.brown.name> <871s8g6roy.fsf@notabene.neil.brown.name> <20181024131534.GD11606@thunk.org> <87o9bi6632.fsf@notabene.neil.brown.name> To: NeilBrown Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Oct 24, 2018, at 8:46 PM, NeilBrown wrote: >=20 >> On Wed, Oct 24 2018, Theodore Y. Ts'o wrote: >>=20 >>> On Wed, Oct 24, 2018 at 12:47:57PM +1100, NeilBrown wrote: >>>=20 >>> I doubt it was copied - more likely independent evolution. >>> But on reflection, I see that it is probably reasonable that it >>> shouldn't be used this way - or at all in this context. >>> I'll try to understand what the issues really are and see if I can >>> find a solution that doesn't depend on this interface. >>> Thanks for your help. >>=20 >> At least for ext4, the primary problem is that we want to use a 64-bit >> telldir/seekdir cookie if all 64-bits will make it to user space, and >> a 32-bit telldir cookie if only 32 bits will make it userspace. This >> impacts NFS as well because if there are people who are still using >> NFSv2, which has 32-bit directory offsets, we need to constrain the >> telldir/seekdir cookies we give to NFS to be a 32 has as opposed to a >> 64-bit hash. >=20 > NFSd uses FMODE_32BITHASH or FMODE64BITHASH to allow ext4 to do the > right thing. FMODE_32BITHASH is set for NFSv2 only. >=20 > Maybe sys_getdents needs to set FMODE_32BITHASH, and sys_getdent64 needs > to set FMODE_64BITHASH - or something like that. It=E2=80=99s possible for a 32-bit process and a 64-bit process to share a d= irectory fd, so I don=E2=80=99t think it=E2=80=99s quite that simple. One option would be to add .llseek and .getdents flags or entire new compat o= perations to indicate that the caller expects 32-bit offsets. I wonder how overlayfs interacts with this whole mess.=