Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp501085pxb; Tue, 3 Nov 2020 05:24:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrdL3yxnJl+sQLFhWgA6GBzlP35RZY9oVNrJfW1dm2Sp1jEiKK7c2VMWLzU+7twxnHUoPO X-Received: by 2002:a17:906:5017:: with SMTP id s23mr20928517ejj.359.1604409863855; Tue, 03 Nov 2020 05:24:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604409863; cv=none; d=google.com; s=arc-20160816; b=dPzbVwkP0a4KwMb4jLpJQkAWXKLhNWkz7XWHM1ETentJLFl84/jzjv2UsFD51EM5bz AflvIatbC1GQxog44X2fGZNzvcClK+9tTi2DOzcNbmw9b2ol6/ZyvCWqQaA9qxLDhuEr lir5MhnDfOR/Z8Gm+U7MxREg/ZzbupP7WW5Bw56cdtLgKUwuPwQmS8YstgAldiepIx1N ka9INhngSt5AAFWXtQNCRdV3jgnxtrjipBonORkvoVei/8sDG1WaLGxmPIPRUMWFV0sN MCTB5hCM6AUky76FYuGTe9eonnqMCWDvetS8sPeYIbBbHXv06qNU9vIKgHJJe4nclQa0 JGCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=MYU/GYY7WjVexPVFkQjnwSJPt6lSEwILNYT0f9czXic=; b=bsoXz9jXlTI1C8sJ/2B+ZFpaT/qGGma7lfcUHDzRj1J28XoCCPny3OKsctCxOQTOKV ENpHBvIb/62IYfyN4/ZSPBrhbqJWe9tfR+HKkw84Em3FQlfgr6bgFf/LfqWyZthDyCVP 3pr9FaQ83v/e1v1hVPRmSyf8Ut8kVU/8kGxGcJIeIqNT2wQFWVYYWFuN7MX3/A3ZQUzV 7NmyBsR+3VENs/2kW9EvWF2x3caorqsIFXJNWSwgKe4EJNrNqzZCWPIexPtPMcc4uwDB zCkqlJW3BAqrlhgdcrjcmfxXkLpNTxAmLGlbY4Ohz9NR4nkOVkUVK6/7ljEpz5ro9EAy i+bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=QsyOdLU8; 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 x2si15455379ejy.195.2020.11.03.05.23.59; Tue, 03 Nov 2020 05:24:23 -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=@ellerman.id.au header.s=201909 header.b=QsyOdLU8; 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 S1729195AbgKCNVw (ORCPT + 99 others); Tue, 3 Nov 2020 08:21:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729189AbgKCNVw (ORCPT ); Tue, 3 Nov 2020 08:21:52 -0500 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A33C5C0613D1 for ; Tue, 3 Nov 2020 05:21:51 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4CQVmq12kQz9sVK; Wed, 4 Nov 2020 00:21:46 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1604409707; bh=MYU/GYY7WjVexPVFkQjnwSJPt6lSEwILNYT0f9czXic=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QsyOdLU8adwVcT8UXmok40+HZGKDVAJxNBuEZyOMHRguFeBnxFXHjqdOHTKaffzfS wdeFcw9uRV+38twP0uAPQLraN5Zp6zBx2hCo9GY68ewshFt3+2KqbPlDO/mDE0Kaqa EWI8MYDfDuNxBRAAGYFa8JAJd2AHRTqdmEwIyv0LsoB0LDNmS1MhMfqa9t1DXbt9Wh oKS/hzSsPavOyqGB+RqJN4UXzDHa28vADzT3beGbYUO66JOwCwB6oYLyYKMwcBu/Bz ZeChRJ2wt/RymbPo471jHnfIQplSkHegyyBoijeIvl24k21fMgeediCcNj/HrBT+rn z9PnukoBH6xtQ== From: Michael Ellerman To: Andreas Schwab Cc: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] powerpc/uaccess: Switch __put_user_size_allowed() to __put_user_asm_goto() In-Reply-To: <871rhgwzcg.fsf@igel.home> References: <94ba5a5138f99522e1562dbcdb38d31aa790dc89.1599216721.git.christophe.leroy__44535.5968013004$1599217383$gmane$org@csgroup.eu> <87mu079ron.fsf@igel.home> <87imav9r64.fsf@igel.home> <87pn53vsep.fsf@mpe.ellerman.id.au> <871rhgwzcg.fsf@igel.home> Date: Wed, 04 Nov 2020 00:21:44 +1100 Message-ID: <875z6mvamv.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andreas Schwab writes: > # > # Automatically generated file; DO NOT EDIT. > # Linux/powerpc 5.10.0-rc1 Kernel Configuration > # > CONFIG_CC_VERSION_TEXT="gcc-4.9 (SUSE Linux) 4.9.3" So it seems to be a combination of GCC 4.9 and ... > # CONFIG_PPC_RADIX_MMU is not set That ^, which specifically causes PPC_KUAP=n. When PPC_KUAP=y allow_user_access() inlines an isync and mtspr, both of which contain a memory clobber, and that seems to hide the bug. I think for now we just have to stop using asm goto for put_user() on GCC 4.9. I'll send a patch for that. cheers