From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B016C56201 for ; Wed, 25 Nov 2020 19:31:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 146A6207BC for ; Wed, 25 Nov 2020 19:31:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aHiB780f" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728222AbgKYTbo (ORCPT ); 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-Google-Smtp-Source: ABdhPJxMCv1rZBl4mt1S2ByNOVSyjZUYE/JO5kBoma6Gb2FbY/xaMAVlp+6u+8OAc7U55YryrQkhwTzE7KvD+K7/GZA= 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