linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marco Elver <elver@google.com>
To: Sven Schnelle <svens@linux.ibm.com>,
	Alexander Potapenko <glider@google.com>,
	kasan-dev <kasan-dev@googlegroups.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] minor kfence patches
Date: Fri, 14 May 2021 12:56:30 +0200	[thread overview]
Message-ID: <CANpmjNMViC4thxCESfmj8j1ZWvNsz2oPSraPta3BAUQjFBoDtw@mail.gmail.com> (raw)
In-Reply-To: <20210514092139.3225509-1-svens@linux.ibm.com>

On Fri, 14 May 2021 at 11:21, Sven Schnelle <svens@linux.ibm.com> wrote:
>
> i'm currently looking into adding support for KFENCE to the s390
> architecture. So far everything is straightforward, and i get the
> kfence testsuite to pass, which is good! :)

Nice to see KFENCE being added to more architectures.

> One minor thing i encountered is that for a translation exception,
> s390 only reports the page address, but not the complete address. I
> worked around that by adding a function to kfence which allows to mask
> out certain bits during unit testing. I wonder whether that should be a
> weak function that can be implemented by architectures if required, some
> kconfig option, or some other way?

I've commented on the other patches.


Thanks,
-- Marco

> The other thing is that s390 (and some other architectures) has different
> address spaces for kernel and user space, so the decision whether an
> address belongs to user or kernel space cannot be made by just looking
> at the address. I added a small if (user_mode(regs)) check to
> kfence_handle_page_fault(). But this could of also be done in the
> architecture specific code.
>
> What do you think?
>
> Thanks,
> Sven
>
>

      parent reply	other threads:[~2021-05-14 10:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14  9:21 [RFC] minor kfence patches Sven Schnelle
2021-05-14  9:21 ` [PATCH 1/2] kfence: add function to mask address bits Sven Schnelle
2021-05-14 10:54   ` Marco Elver
2021-05-14 11:03     ` Sven Schnelle
2021-05-14 11:23       ` Marco Elver
2021-05-14  9:21 ` [PATCH 2/2] kfence: only handle kernel mode faults Sven Schnelle
2021-05-14 10:52   ` Marco Elver
2021-05-14 10:55     ` Sven Schnelle
2021-05-14 10:59       ` Marco Elver
2021-05-14 10:56 ` Marco Elver [this message]

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=CANpmjNMViC4thxCESfmj8j1ZWvNsz2oPSraPta3BAUQjFBoDtw@mail.gmail.com \
    --to=elver@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=svens@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).