Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp411929pxu; Tue, 1 Dec 2020 14:38:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6ojKZtg0XzfkvGJ2yQccobi7rhwrA7us33txQdwRvFVXn7G+5Lvtjd+JhpNV4NLlnP/+w X-Received: by 2002:a17:906:8617:: with SMTP id o23mr5242842ejx.274.1606862291953; Tue, 01 Dec 2020 14:38:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606862291; cv=none; d=google.com; s=arc-20160816; b=oSdC8L7URpIw/9bV9YnGrE2Jq5dLbsAIdAUsCV7W3rTfpwIRGGQiOOLE0pqFdNRokJ gjV+ZS2YD2vFuzdLRYSsHyp7WmACqCi3h4W2TwKJsHx3q6O1LZ4b4CvJ8BMJ9UrFb5Th mJZ5cxtMtSR8uR41HwsEi2Z004vO0dEvk3/YeIwhCRuTnEc1IQNn9Ucj0qpWKBonLP79 jFEDcLwhL+p3HN3YBAgV33bj88ZBE01e80Jov3sgstuPVkTLfkiNhsGEaqjb6fetnMyQ pkQxZyzYh2LhJxnGpdaspZGhuhHBqWQ/kW1IXP7ofRj6h2R2W4Nhf0arw4z+h8JX6P1g F82w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=pIk+dNIUwIeIfxbd0FALnvTbHYOJnRsFsqMc8R/CmcE=; b=qjCTmJ6OUvivNPQ0Jmb1s1wnZ1ES7B1zhZpk6RuWHIGsY12kO5gTY42SASRdTjdOLe /X08p1+hfVKDzIUFfdXopm96MxPxxMCcu2xA2XRC981b+j8DJAGfw7a5DmraOf/EG9mf W1MhkiYV0i1AXkP0YPOwSVMNKkZnfi/Q2lFmfHX+JnZnxgqYTlXrfXQrkKdMegUiG91z hCns+PdHwtY3AMZjv1zD0TCEwwWvo1AKlZ2ecMYY94nVgY4tu7MnVBYO03prtQ6SJU8J qvvA83vy9SDuaP/LggGlVMCmHgD7c1caPmUvfOT91uNrGXfkVtMwCQjAw0WcF2ei/Eqa IFWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IV0IyKCw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qo17si232454ejb.296.2020.12.01.14.37.49; Tue, 01 Dec 2020 14:38:11 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=IV0IyKCw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391192AbgLARYU (ORCPT + 99 others); Tue, 1 Dec 2020 12:24:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:47910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391070AbgLARYT (ORCPT ); Tue, 1 Dec 2020 12:24:19 -0500 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BF03F20757 for ; Tue, 1 Dec 2020 17:23:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606843419; bh=cMWpNNo6B+ZlVFzu224cjifSj9yFS3k9AicU80f4SEc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IV0IyKCwzeBRr1qMgS2FpRiP8GRUZsCHicnOsP6Cw2q1TwwIgurtFqWTEmBxwPhhx 4+SIk4cPu7d2SGBZ7YP0MdDGk4u3i5+t5I+od6eWAeHEf3DH4URwoHRBb2Z56Z9hf6 Uyf055CCunkhNlwg6vSVLNKzGcS8jqHhUmv4QTAM= Received: by mail-wm1-f52.google.com with SMTP id v14so4859569wml.1 for ; Tue, 01 Dec 2020 09:23:38 -0800 (PST) X-Gm-Message-State: AOAM533xByHgS1iAWzQWoQ57xYYpAFGj5/bU2RitxWzLHrf22Hu/KOT6 c9Ct2JtS/1MM3OgbTDJxOFfd5pS5LcdMXXeM5pNrBw== X-Received: by 2002:a7b:cb41:: with SMTP id v1mr3876786wmj.36.1606843417218; Tue, 01 Dec 2020 09:23:37 -0800 (PST) MIME-Version: 1.0 References: <20201130223059.101286-1-brgerst@gmail.com> In-Reply-To: <20201130223059.101286-1-brgerst@gmail.com> From: Andy Lutomirski Date: Tue, 1 Dec 2020 09:23:24 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] fanotify: Fix sys_fanotify_mark() on native x86-32 To: Brian Gerst Cc: LKML , X86 ML , Andy Lutomirski , Borislav Petkov , Thomas Gleixner , Jan Kara , =?UTF-8?Q?Pawe=C5=82_Jasiak?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 30, 2020 at 2:31 PM Brian Gerst wrote: > > Commit 121b32a58a3a converted native x86-32 which take 64-bit arguments t= o > use the compat handlers to allow conversion to passing args via pt_regs. > sys_fanotify_mark() was however missed, as it has a general compat handle= r. > Add a config option that will use the syscall wrapper that takes the spli= t > args for native 32-bit. > > Reported-by: Pawe=C5=82 Jasiak > Fixes: 121b32a58a3a ("x86/entry/32: Use IA32-specific wrappers for syscal= ls taking 64-bit arguments") > Signed-off-by: Brian Gerst > --- > arch/Kconfig | 6 ++++++ > arch/x86/Kconfig | 1 + > fs/notify/fanotify/fanotify_user.c | 17 +++++++---------- > include/linux/syscalls.h | 24 ++++++++++++++++++++++++ > 4 files changed, 38 insertions(+), 10 deletions(-) > > diff --git a/arch/Kconfig b/arch/Kconfig > index 090ef3566c56..452cc127c285 100644 > --- a/arch/Kconfig > +++ b/arch/Kconfig > @@ -1045,6 +1045,12 @@ config HAVE_STATIC_CALL_INLINE > bool > depends on HAVE_STATIC_CALL > > +config ARCH_SPLIT_ARG64 > + bool > + help > + If a 32-bit architecture requires 64-bit arguments to be split= into > + pairs of 32-bit arguemtns, select this option. You misspelled arguments. You might also want to clarify that, for 64-bit arches, this means that compat syscalls split their arguments. Aside from that: Acked-by: Andy Lutomirski