Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4553834pxv; Tue, 6 Jul 2021 03:54:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQVUowzjbPAqmEvYV0cIDC99OF9MKSIeqVxjBg/g3mGAeYT0ZxzmSqeGbM/c8kKfImCVd9 X-Received: by 2002:aa7:c0c5:: with SMTP id j5mr22113430edp.59.1625568849015; Tue, 06 Jul 2021 03:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625568849; cv=none; d=google.com; s=arc-20160816; b=Hw04NwqYiGb68ZWOgsAvGwMMeX96bnx/dtYYul9qWYqgBkKbHiisVnxfvL5w6eT1xo n7j7QRJcc5Wa4OdhjqpgaYFDKbuglEkkBt16n4arzd4sTj38O57V7+44h2WUJ/DWZ6EP 8oRV1SOGpm2yu56URUXU9UPzbyElWnhKXNW9f8DjtN8pmYFzpm1DrmFrxQBfG1QIEDNk 6eCS6CNxwAnDt8bUG4q7kapsUCYXFa1VvwomG0jGnTo1JnGcSt3NtuXxcVH6UuX5hZXg BVaoq/cfh2qqUf2e1Qg2/nJ1K0sRDWtJoYYj2DYai68exiPqrnftuZ1nCmEMER4hhCv/ Z0CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from; bh=jd9/QGe/3pSgtc/1SQ7dUAuk02Uld9+4EgOmt/twZUw=; b=V8Z3t1TfVuB8s3zunMHdBSpuuQf8TrSJqsQBW3ORVFQA3jIFqpn5nVuZo0INW7oXzY dPX8AZnXyHb0dcKjBbCn/kRawoJP/r76tWDoi7EmP4Wso/F/6aJLBraPeAOHCx7mUGVU L1tKgl6k5OlDf61WPEfi9ud6jl7IwGzGGOOT/1C8R9dRoEXOtYRXgbWVLSsogv+fV0tn q0+hFrulVpoldFITDhon1kv7CrWA9lCCkuqYLcQxe4NLYp+IJnevpiFAhnMrn+eEbIWk Zg4Z5QzM2Jpt3yb8jQ0hXL0S7QO4qa75B7NLQl3TW/MGxpyS4b09PtJir5X96abfRLsE IaPQ== 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 a3si14483757edt.609.2021.07.06.03.53.46; Tue, 06 Jul 2021 03:54:09 -0700 (PDT) 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 S231504AbhGFKzY (ORCPT + 99 others); Tue, 6 Jul 2021 06:55:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbhGFKzX (ORCPT ); Tue, 6 Jul 2021 06:55:23 -0400 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65E40C061574 for ; Tue, 6 Jul 2021 03:52:45 -0700 (PDT) Received: by ozlabs.org (Postfix, from userid 1034) id 4GJzsk2R2hz9sWl; Tue, 6 Jul 2021 20:52:42 +1000 (AEST) From: Michael Ellerman To: npiggin@gmail.com, Paul Mackerras , Benjamin Herrenschmidt , Christophe Leroy , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org In-Reply-To: <024bb05105050f704743a0083fe3548702be5706.1625138205.git.christophe.leroy@csgroup.eu> References: <024bb05105050f704743a0083fe3548702be5706.1625138205.git.christophe.leroy@csgroup.eu> Subject: Re: [PATCH] powerpc/mm: Fix lockup on kernel exec fault Message-Id: <162556873360.460578.10834762081536677498.b4-ty@ellerman.id.au> Date: Tue, 06 Jul 2021 20:52:13 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Jul 2021 11:17:08 +0000 (UTC), Christophe Leroy wrote: > The powerpc kernel is not prepared to handle exec faults from kernel. > Especially, the function is_exec_fault() will return 'false' when an > exec fault is taken by kernel, because the check is based on reading > current->thread.regs->trap which contains the trap from user. > > For instance, when provoking a LKDTM EXEC_USERSPACE test, > current->thread.regs->trap is set to SYSCALL trap (0xc00), and > the fault taken by the kernel is not seen as an exec fault by > set_access_flags_filter(). > > [...] Applied to powerpc/fixes. [1/1] powerpc/mm: Fix lockup on kernel exec fault https://git.kernel.org/powerpc/c/cd5d5e602f502895e47e18cd46804d6d7014e65c cheers