public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
From: Tong Tiangen <tongtiangen@huawei.com>
To: Andrew Jones <ajones@ventanamicro.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Palmer Dabbelt <palmer@rivosinc.com>,
	Albert Ou <aou@eecs.berkeley.edu>, <Conor.Dooley@microchip.com>,
	<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<wangkefeng.wang@huawei.com>, Guohanjun <guohanjun@huawei.com>
Subject: Re: [PATCH -next v2 2/2] riscv: extable: add new extable type EX_TYPE_KACCESS_ERR_ZERO support
Date: Fri, 26 Aug 2022 14:44:48 +0800	[thread overview]
Message-ID: <7718a9bc-e976-daeb-f490-e7b5190e50b6@huawei.com> (raw)
In-Reply-To: <20220825110602.bog5mjpascvikwxx@kamzik>



在 2022/8/25 19:06, Andrew Jones 写道:
> On Mon, Aug 15, 2022 at 03:20:25AM +0000, Tong Tiangen wrote:
>> Currently, The extable type EX_TYPE_UACCESS_ERR_ZERO is used by
>> __get/put_kernel_nofault(), but those helpers are not uaccess type, so we
>> add a new extable type EX_TYPE_KACCESS_ERR_ZERO which can be used by
>> __get/put_kernel_no_fault().
>>
>> Only refactor code without any functional changes.
> 
> This isn't quite true. __get/put_kernel_nofault now sets a different
> extable type (as the commit message says). But, nothing special seems
> to be done with that, so there's effectively no functional change. Can
> you please elaborate on the motivation for this change? Where will the
> KACCESS type need to be distinguished from the UACCESS type?

The introduction of EX_TYPE_KACCESS_ERR_ZERO does not change any 
function, but makes a correct distinction in the actual type, indicating 
that there are indeed some kaccess entries in extable. I think this 
optimization is more clear and reasonable.

A few weeks ago, I did something similar on arm64[1]. I think this 
optimization can also be used on riscv.

We can do some features that are used on uaccss but not applicable on 
kaccess in the future[2].

[1] 
https://lore.kernel.org/lkml/20220621072638.1273594-2-tongtiangen@huawei.com/
[2]https://lore.kernel.org/lkml/20220812070557.1028499-4-tongtiangen@huawei.com/

Thanks,
Tong.

> 
> Thanks,
> drew
> .

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2022-08-26  6:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15  3:20 [PATCH -next v2 0/2]riscv: some refactorings realted to uaccess and extable Tong Tiangen
2022-08-15  3:20 ` [PATCH -next v2 1/2] riscv: uaccess: rename __get/put_user_nocheck to __get/put_mem_nocheck Tong Tiangen
2022-08-25 10:56   ` Andrew Jones
2022-08-26  6:33     ` Tong Tiangen
2022-08-26  7:43       ` Andrew Jones
2022-08-27 10:39         ` Tong Tiangen
2022-08-26  9:30   ` Arnd Bergmann
2022-08-27 10:43     ` Tong Tiangen
2022-08-27 12:49       ` Arnd Bergmann
2022-08-29  1:26         ` Tong Tiangen
2022-08-15  3:20 ` [PATCH -next v2 2/2] riscv: extable: add new extable type EX_TYPE_KACCESS_ERR_ZERO support Tong Tiangen
2022-08-25 11:06   ` Andrew Jones
2022-08-26  6:44     ` Tong Tiangen [this message]
2022-08-26  8:16       ` Andrew Jones
2022-08-27 10:39         ` Tong Tiangen
2022-09-21 20:25           ` Palmer Dabbelt
2022-10-21 12:23             ` Tong Tiangen
2022-08-24  6:31 ` [PATCH -next v2 0/2]riscv: some refactorings realted to uaccess and extable Tong Tiangen
2022-08-24 16:49   ` Conor.Dooley
2022-08-25  3:04     ` Tong Tiangen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7718a9bc-e976-daeb-f490-e7b5190e50b6@huawei.com \
    --to=tongtiangen@huawei.com \
    --cc=Conor.Dooley@microchip.com \
    --cc=ajones@ventanamicro.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=guohanjun@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=palmer@rivosinc.com \
    --cc=paul.walmsley@sifive.com \
    --cc=wangkefeng.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox