diff mbox series

[v27,13/31] mm: Move VM_UFFD_MINOR_BIT from 37 to 38

Message ID 20210521221211.29077-14-yu-cheng.yu@intel.com (mailing list archive)
State New, archived
Headers show
Series Control-flow Enforcement: Shadow Stack | expand

Commit Message

Yu-cheng Yu May 21, 2021, 10:11 p.m. UTC
To introduce VM_SHADOW_STACK as VM_HIGH_ARCH_BIT (37), and make all
VM_HIGH_ARCH_BITs stay together, move VM_UFFD_MINOR_BIT from 37 to 38.

Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
---
 include/linux/mm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Axel Rasmussen May 21, 2021, 10:25 p.m. UTC | #1
This seems reasonable to me. The particular bit used isn't so
important from my perspective. I can't think of a way this would break
backward compatibility or such. So:

Reviewed-by: Axel Rasmussen <axelrasmussen@google.com>

On Fri, May 21, 2021 at 3:13 PM Yu-cheng Yu <yu-cheng.yu@intel.com> wrote:
>
> To introduce VM_SHADOW_STACK as VM_HIGH_ARCH_BIT (37), and make all
> VM_HIGH_ARCH_BITs stay together, move VM_UFFD_MINOR_BIT from 37 to 38.
>
> Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
> Cc: Axel Rasmussen <axelrasmussen@google.com>
> Cc: Peter Xu <peterx@redhat.com>
> Cc: Mike Kravetz <mike.kravetz@oracle.com>
> ---
>  include/linux/mm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index c274f75efcf9..923f89b9f1b5 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -373,7 +373,7 @@ extern unsigned int kobjsize(const void *objp);
>  #endif
>
>  #ifdef CONFIG_HAVE_ARCH_USERFAULTFD_MINOR
> -# define VM_UFFD_MINOR_BIT     37
> +# define VM_UFFD_MINOR_BIT     38
>  # define VM_UFFD_MINOR         BIT(VM_UFFD_MINOR_BIT)  /* UFFD minor faults */
>  #else /* !CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */
>  # define VM_UFFD_MINOR         VM_NONE
> --
> 2.21.0
>
Yu-cheng Yu May 22, 2021, 1:58 a.m. UTC | #2
On 5/21/2021 3:25 PM, Axel Rasmussen wrote:
> This seems reasonable to me. The particular bit used isn't so
> important from my perspective. I can't think of a way this would break
> backward compatibility or such. So:
> 
> Reviewed-by: Axel Rasmussen <axelrasmussen@google.com>

Thanks!

Yu-cheng

> 
> On Fri, May 21, 2021 at 3:13 PM Yu-cheng Yu <yu-cheng.yu@intel.com> wrote:
>>
>> To introduce VM_SHADOW_STACK as VM_HIGH_ARCH_BIT (37), and make all
>> VM_HIGH_ARCH_BITs stay together, move VM_UFFD_MINOR_BIT from 37 to 38.
>>
>> Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
>> Cc: Axel Rasmussen <axelrasmussen@google.com>
>> Cc: Peter Xu <peterx@redhat.com>
>> Cc: Mike Kravetz <mike.kravetz@oracle.com>
>> ---
>>   include/linux/mm.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>> index c274f75efcf9..923f89b9f1b5 100644
>> --- a/include/linux/mm.h
>> +++ b/include/linux/mm.h
>> @@ -373,7 +373,7 @@ extern unsigned int kobjsize(const void *objp);
>>   #endif
>>
>>   #ifdef CONFIG_HAVE_ARCH_USERFAULTFD_MINOR
>> -# define VM_UFFD_MINOR_BIT     37
>> +# define VM_UFFD_MINOR_BIT     38
>>   # define VM_UFFD_MINOR         BIT(VM_UFFD_MINOR_BIT)  /* UFFD minor faults */
>>   #else /* !CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */
>>   # define VM_UFFD_MINOR         VM_NONE
>> --
>> 2.21.0
>>
diff mbox series

Patch

diff --git a/include/linux/mm.h b/include/linux/mm.h
index c274f75efcf9..923f89b9f1b5 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -373,7 +373,7 @@  extern unsigned int kobjsize(const void *objp);
 #endif
 
 #ifdef CONFIG_HAVE_ARCH_USERFAULTFD_MINOR
-# define VM_UFFD_MINOR_BIT	37
+# define VM_UFFD_MINOR_BIT	38
 # define VM_UFFD_MINOR		BIT(VM_UFFD_MINOR_BIT)	/* UFFD minor faults */
 #else /* !CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */
 # define VM_UFFD_MINOR		VM_NONE