lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJuCfpG=q=PAX9+8hgH8v4Jz96qn6yKDZhno-0hSkAveWGDe8g@mail.gmail.com>
Date:   Wed, 9 Jun 2021 17:58:41 -0700
From:   Suren Baghdasaryan <surenb@...gle.com>
To:     Michel Lespinasse <michel@...pinasse.org>
Cc:     Linux-MM <linux-mm@...ck.org>,
        Linux-Kernel <linux-kernel@...r.kernel.org>,
        Laurent Dufour <ldufour@...ux.ibm.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Michal Hocko <mhocko@...e.com>,
        Matthew Wilcox <willy@...radead.org>,
        Rik van Riel <riel@...riel.com>,
        Paul McKenney <paulmck@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Joel Fernandes <joelaf@...gle.com>,
        Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH 08/29] mm: add FAULT_FLAG_SPECULATIVE flag

On Fri, Apr 30, 2021 at 12:52 PM Michel Lespinasse
<michel@...pinasse.org> wrote:
>
> Define the new FAULT_FLAG_SPECULATIVE flag, which indicates when we are
> attempting speculative fault handling (without holding the mmap lock).
>
> Signed-off-by: Michel Lespinasse <michel@...pinasse.org>
> ---
>  include/linux/mm.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 8ba434287387..021fdab5b721 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -434,6 +434,7 @@ extern pgprot_t protection_map[16];
>   * @FAULT_FLAG_REMOTE: The fault is not for current task/mm.
>   * @FAULT_FLAG_INSTRUCTION: The fault was during an instruction fetch.
>   * @FAULT_FLAG_INTERRUPTIBLE: The fault can be interrupted by non-fatal signals.
> + * @FAULT_FLAG_SPECULATIVE: The fault is handled without holding the mmap_sem.

nit: s/mmap_sem/mmap_lock

>   *
>   * About @FAULT_FLAG_ALLOW_RETRY and @FAULT_FLAG_TRIED: we can specify
>   * whether we would allow page faults to retry by specifying these two
> @@ -464,6 +465,7 @@ extern pgprot_t protection_map[16];
>  #define FAULT_FLAG_REMOTE                      0x80
>  #define FAULT_FLAG_INSTRUCTION                 0x100
>  #define FAULT_FLAG_INTERRUPTIBLE               0x200
> +#define FAULT_FLAG_SPECULATIVE                 0x400
>
>  /*
>   * The default fault flags that should be used by most of the
> @@ -501,7 +503,8 @@ static inline bool fault_flag_allow_retry_first(unsigned int flags)
>         { FAULT_FLAG_USER,              "USER" }, \
>         { FAULT_FLAG_REMOTE,            "REMOTE" }, \
>         { FAULT_FLAG_INSTRUCTION,       "INSTRUCTION" }, \
> -       { FAULT_FLAG_INTERRUPTIBLE,     "INTERRUPTIBLE" }
> +       { FAULT_FLAG_INTERRUPTIBLE,     "INTERRUPTIBLE" }, \
> +       { FAULT_FLAG_SPECULATIVE,       "SPECULATIVE" }
>
>  /*
>   * vm_fault is filled by the pagefault handler and passed to the vma's
> --
> 2.20.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ