Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3806837pxb; Mon, 1 Feb 2021 05:23:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXYKRuUfY3vq3n6iS0aMr56AGCr1SVMqgydzai2NX5uL4DB7VSfkuywM8v1+lP0ElXMty7 X-Received: by 2002:a17:906:6449:: with SMTP id l9mr18540037ejn.320.1612185783053; Mon, 01 Feb 2021 05:23:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612185783; cv=none; d=google.com; s=arc-20160816; b=W4MPHUWnd8zRgtcEUxefTXVlzAuNO0NVJXrcbw7NcDXoyFH61PHj8if0KosjCS1h5V x1r6I2tf/mjxzgPmfM+snQBmFNNTcr9qtxKb9wa8NVy5gD32iY04XHzoFTmCTYk/JSSz OhuWJTpxDoS6+/UWcPVGpCRM6M1sAQcTnMrH+IFOApOuf19RihJNE6iMzZotJKG/JE9o RhmsPYHaT6BdJlPwouGj7Xv5MICTlCVYEyrKubMUguDVkL/e4v8riJPj3xnFPv5Rm6Ko BqnL6SfDcp4kwGbGWYJ97ZDexeDFWeyGIaa7Eqrm5LAV0MzB6dhGpWfp2viQeSHpnML0 GmFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject; bh=JW5+onAp1hvV3lhYsSqRXKtZ8I8BDmfghZKwxervQUc=; b=ZWx7yV3fVJLXRcpscRALrD04gEX165a2BNsum/gQdLOP/Kn9gabWcmrpEnsiZeC3GA o6Wlttc1sXgDVdC62oWsUtvLxB7/Rzl4nVLzLlOE175W93g0iHH8VBM7mNNC7sW7+UFr AdEGCipGfl2J9TUN7TNMppGhNGIKq8IRL864O1UQsHq37IgGoSluPALH2FSTmQ+IAQNw HP9g/3+zBG5o1kNdxpqCVBAFI3e+0Htl9juoUBgfzCNeoJhC1CUKFAHGLxYRcH+aKoDH kJmbHoug9/pCESI6e6U0OO8USACBPqPc49g4jn2gXbieV29GZlpxEZK6NV+NHTaa/PWn JnrQ== 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 gf2si11362319ejb.154.2021.02.01.05.22.37; Mon, 01 Feb 2021 05:23:03 -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 S232070AbhBANVR (ORCPT + 99 others); Mon, 1 Feb 2021 08:21:17 -0500 Received: from imap3.hz.codethink.co.uk ([176.9.8.87]:47902 "EHLO imap3.hz.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232033AbhBANTk (ORCPT ); Mon, 1 Feb 2021 08:19:40 -0500 Received: from cpc79921-stkp12-2-0-cust288.10-2.cable.virginm.net ([86.16.139.33] helo=[192.168.0.18]) by imap3.hz.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1l6Z6E-0003lO-2b; Mon, 01 Feb 2021 13:18:38 +0000 Subject: Re: [PATCH v3 0/2] Let illegal access to user-space memory die To: Palmer Dabbelt , tesheng@andestech.com Cc: aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org, peterx@redhat.com, penberg@kernel.org, Paul Walmsley , akpm@linux-foundation.org, walken@google.com, linux-riscv@lists.infradead.org, vbabka@suse.cz References: From: Ben Dooks Organization: Codethink Limited. Message-ID: Date: Mon, 1 Feb 2021 13:18:36 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/12/2020 02:35, Palmer Dabbelt wrote: > On Thu, 03 Dec 2020 21:42:57 PST (-0800), tesheng@andestech.com wrote: >> Accesses to user-space memory without calling uaccess routine >> leads to hanging in page fault handler. Like arm64, we let it >> die earlier in page fault handler. >> >> Changes in v3: >>     -Let no_context() use die_kernel_fault() helper >> >> Changes in v2: >>     -Add a die_kernel_fault() helper >>     -Split one long line code into two >> >> Eric Lin (2): >>   riscv/mm: Introduce a die_kernel_fault() helper function >>   riscv/mm: Prevent kernel module to access user memory without uaccess >>     routines >> >>  arch/riscv/mm/fault.c | 28 ++++++++++++++++++++++------ >>  1 file changed, 22 insertions(+), 6 deletions(-) > > Thanks, these will be on for-next when the merge window ends. Just tested this and it seems to be working. -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html