Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1125362pxu; Thu, 26 Nov 2020 23:45:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOdQllol1jIG8oGjXcxHbMbbfVhwTxl2AJUaRbln6Llvf8YguCak0xxKlTa5jbvLTBDbM7 X-Received: by 2002:a05:6402:1389:: with SMTP id b9mr6354553edv.178.1606463139568; Thu, 26 Nov 2020 23:45:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606463139; cv=none; d=google.com; s=arc-20160816; b=WJbF7Gm1E1bHE+1d8cfQIbUtQ1XCNGYgxVly5jBR0L7C7LeC6iqQD56GVsteYLtQTU D+lZr430CszcBWvxMazxmGs6KknenUOjnjnMB/82AwL/VQXvWQpF8djwvoy74R2PTt6m X21lKnuxFF8l1CpGjDrJOgO5g40tCwvEqUOPHzE1qGrruBvsQRXJzfE+bb+pos0bLrqs 903/t62QoIZ7feoB4AuUm386NLwzLMrWIyRusXz6tqncI8sbRezWBZjzjeu4MySAQBAc TRia/GHhqN14o1RV38uyZ6RmddJz7WZVK9jU99pAHi5VOxzMD+vYylhEd7hNI0S3Ou9N oePw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+Ydqk2bNmk4DMusYpKc033jnftZaG83cVAp7+Coyv44=; b=Ex47TUvMRZ8sBOweR68SXC9hxIQXiF3T6zGzr/JYbyJrFx+EERrnsehJ5L9LevjM5+ 4QoJImAVpm+vIrOeWKEkEoRt9SQZbijYSnWUZ7WIfHQYu+0ueO5+r249JA5sd05y/qoQ x8eGRhHOC6ennnXiAEFheui9MoEANPKZOJYddj4dpMOjct+idOjse6aIt0A+hkrGp1WD NN4uyazRQzGzuvTSVgKHRJycHQ8dMEtpDz6EMXfc2rZTzdnlQ+GcFblA01t804nx/1v7 7Udh6vARfl9YsgKzdw4tJkkzE3x3/vXwZgLNw01hUlKKvoHqybF+VwD77aKdQGnL/LLY DBgg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn17si5328182ejb.292.2020.11.26.23.45.16; Thu, 26 Nov 2020 23:45:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388442AbgKZKs6 (ORCPT + 99 others); Thu, 26 Nov 2020 05:48:58 -0500 Received: from mx2.suse.de ([195.135.220.15]:58680 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388281AbgKZKs6 (ORCPT ); Thu, 26 Nov 2020 05:48:58 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 48D03AC23; Thu, 26 Nov 2020 10:48:56 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 240441E130F; Thu, 26 Nov 2020 11:48:56 +0100 (CET) Date: Thu, 26 Nov 2020 11:48:56 +0100 From: Jan Kara To: Naresh Kamboju Cc: Jan Kara , Borislav Petkov , =?utf-8?B?UGF3ZcWC?= Jasiak , open list , linux-fsdevel@vger.kernel.org, X86 ML , Thomas Gleixner , Brian Gerst , Andy Lutomirski Subject: Re: PROBLEM: fanotify_mark EFAULT on x86 Message-ID: <20201126104856.GB422@quack2.suse.cz> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 26-11-20 01:01:30, Naresh Kamboju wrote: > 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ł Jasiak wrote: > > > > On 23/11/20, Jan Kara wrote: > > > > > OK, with a help of Boris Petkov I think I have a fix that looks correct > > > > > (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 well > > (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 problem > got fixed. > > Test links, > https://lkft.validation.linaro.org/scheduler/job/1985236#L1176 > https://lkft.validation.linaro.org/scheduler/job/1985238#L801 Thanks for testing! I've added your tested-by tag. Honza -- Jan Kara SUSE Labs, CR