Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp114547pxu; Wed, 25 Nov 2020 14:48:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIm8hLmPNODmJVtLt+USIaI7uVx8g+V9GNVhK8+X6AS4f63xUCjWlAN9Wo+eoyJDxVBMbS X-Received: by 2002:a50:d5dd:: with SMTP id g29mr5689001edj.379.1606344480713; Wed, 25 Nov 2020 14:48:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606344480; cv=none; d=google.com; s=arc-20160816; b=rMQrOGtpNk7h2OUD8QIgpAJcGR6JwgIlKd9ZIBJVPF3m83RT7yqKc/0BqNdahmm8y9 0YWOU68TxUtx+0B4x2t6GSG9UFI+zsQfr+jbWnY3ZdXMmsCMmXt7GbipMLQXXUAD4e5e x0vQ9PxwlCYWuJ3IVitpdN3mPB5k8qAWDPY9dsJeE6yIeAuY5SQq4M6VcDfOhqGlQLTZ KIHwv9lpcs7tc+qMZUqwRZUFJ4uXQLcYQdtP+EL1gqyd6nq81b1/Y7w6UdNY+2oa4O37 PSh+baeqSLq46XtBfHYtCG0rRUMtAKlCl/7URmX9/3Pq63iJvuLrNvr/IkwkCmhJ4CgE xtXA== 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=NbGEEdyiGb6W/O88ADJQK8rzA0fmkfkXXMTB0VeQSp4=; b=GE/J+VCGfQgjQYn+cZsi650Xj/BJN0pEnhs06Bbfi6Bxd3EPq4bOfK6ogtk/ODKWpa XoHRcTVK0ZWsw/9m+A87+61QmAF1+Bl8Ndl00e6BUIhSKIeRWRByjQmMHzvW9KoZwKYt u+iSEytOTeDcwy0rWjjeROHCtsCyqmHkfTUioZfS7ByjFlazDrw7XVnwuqQ2RVPh4M8z tTsysPNgsH3a8fp3MSYoeEcVZxoWAHI6YMX747IdG4uzLOWMm2cWhLkY+dexFzegKxoi Cd5k/P4KOn89EGN9jKwYjCY10THWg4+NW5qcdwLFM4USFrj3u+VQfWXy1RZeNdFD62uS SgPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aHiB780f; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si2040715eje.452.2020.11.25.14.47.38; Wed, 25 Nov 2020 14:48:00 -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=@linaro.org header.s=google header.b=aHiB780f; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728192AbgKYTbo (ORCPT + 99 others); Wed, 25 Nov 2020 14:31:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbgKYTbo (ORCPT ); Wed, 25 Nov 2020 14:31:44 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6FADC061A4F for ; Wed, 25 Nov 2020 11:31:43 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id 7so4674768ejm.0 for ; Wed, 25 Nov 2020 11:31:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=NbGEEdyiGb6W/O88ADJQK8rzA0fmkfkXXMTB0VeQSp4=; b=aHiB780fX4O+H26PT704iIHKBv1W1Bk2L0OefcT5JXt8+Hv5F6hBhZBHqgeWAi5FFL w5TU/JpalJlMySQzGAD5ia6tyPhqLGSzb2GfL89UK+fZrlt0gzw+T2bZ0f63mN2vPE5B JYLqbnx22vTYxiNzMFLbCfTSLiU8yKX4coYdjlDP31Kv0jkrInUlO+RcUAitNtNG7F7x BytLrRhfLBT2TmskEkFnQNBAqMiy2BtpAmcS28mgq9tWn+2obHxDdVYTLFjIvitqttBB N80Ynt1vLBvPzPzs3o4+ASsrnZHMPqGFom6Kfk9gULq/KG1n84V0DtbOg/2BrEUQdein X/WQ== 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:content-transfer-encoding; bh=NbGEEdyiGb6W/O88ADJQK8rzA0fmkfkXXMTB0VeQSp4=; b=iFji4KFFyH1DtSRm2cjx1KOEV2TXmNmz7FZ5/VDLv+GTr/H5++q8fzs6Aw2B7LrUsG 7P7ZDybSvj4Q8Ym0Z3dfQzbb01KOP4OPiQ2j9wL3IbmjljXO4PlOq6jj/hxwxVhByYRW gHwYbookhKsQMk1nqflJ+x0ZsG8wCTTgIKkg7E4fvlGfYLSabBl+10r/zApl6h6EE331 /tpuCBiRd7UOnNYkDXvaEzg5T10n210PZOwkeGboWY9FNwYxVznleGgWtru5y98I4sIC RNujhs24fGnNLfLmFu8xRHAnNJDO87vuCozmw4nN+tkfs2BMVo3dEsJBNc3vms4IL7fx +uGA== X-Gm-Message-State: AOAM533vKv9e2CePnT+T8t9cNr4mRz6eEZtOL0t399fdOEXoWLm92m1s APyLMUo8vLVJw5BSqsMoL41SC9MO0+3aoNJvbBe7nw== X-Received: by 2002:a17:906:4c85:: with SMTP id q5mr4514377eju.375.1606332702253; Wed, 25 Nov 2020 11:31:42 -0800 (PST) MIME-Version: 1.0 References: <20201101212738.GA16924@gmail.com> <20201102122638.GB23988@quack2.suse.cz> <20201103211747.GA3688@gmail.com> <20201123164622.GJ27294@quack2.suse.cz> <20201123224651.GA27809@gmail.com> <20201124084507.GA4009@zn.tnic> <20201124102033.GA19336@quack2.suse.cz> In-Reply-To: <20201124102033.GA19336@quack2.suse.cz> From: Naresh Kamboju Date: Thu, 26 Nov 2020 01:01:30 +0530 Message-ID: Subject: Re: PROBLEM: fanotify_mark EFAULT on x86 To: Jan Kara Cc: Borislav Petkov , =?UTF-8?Q?Pawe=C5=82_Jasiak?= , open list , linux-fsdevel@vger.kernel.org, X86 ML , Thomas Gleixner , Brian Gerst , Andy Lutomirski 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 Tue, 24 Nov 2020 at 15:50, Jan Kara wrote: > > On Tue 24-11-20 09:45:07, Borislav Petkov wrote: > > On Mon, Nov 23, 2020 at 11:46:51PM +0100, Pawe=C5=82 Jasiak wrote: > > > On 23/11/20, Jan Kara wrote: > > > > OK, with a help of Boris Petkov I think I have a fix that looks cor= rect > > > > (attach). Can you please try whether it works for you? Thanks! > > > > > Thanks for checking! I didn't realize I needed to change the ifdefs as we= ll > (I missed that bit in 121b32a58a3a). So do I understand correctly that > whenever the kernel is 64-bit, 64-bit syscall args (e.g. defined as u64) = are > passed just fine regardless of whether the userspace is 32-bit or not? > > Also how about other 32-bit archs? Because I now realized that > CONFIG_COMPAT as well as the COMPAT_SYSCALL_DEFINE6() is also utilized by > other 32-bit archs (I can see a reference to compat_sys_fanotify_mark e.g= . > in sparc, powerpc, and other args). So I probably need to actually keep > that for other archs but do the modification only for x86, don't I? > > So something like attached patch? I have tested the attached patch on i386 and qemu_i386 and the reported pro= blem got fixed. Test links, https://lkft.validation.linaro.org/scheduler/job/1985236#L1176 https://lkft.validation.linaro.org/scheduler/job/1985238#L801 --=20 Linaro LKFT https://lkft.linaro.org