diff mbox series

mseal: remove can_do_mseal

Message ID 20241206193309.3026213-1-jeffxu@google.com (mailing list archive)
State New
Headers show
Series mseal: remove can_do_mseal | expand

Commit Message

Jeff Xu Dec. 6, 2024, 7:33 p.m. UTC
From: Jeff Xu <jeffxu@google.com>

Hi Andrew,

Is that possible to squash this change on top of 
"mseal: move can_do_mseal to mseal.c" on the mm-unstable ?

This is the first time I m doing this, because I saw dev did this before,
and saying this is the prefered approach.

I could also send v2 which is what I usually do.

Thanks
-Jeff

Signed-off-by: Jeff Xu <jeffxu@chromium.org>
---
 mm/mseal.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jeff Xu Dec. 6, 2024, 7:37 p.m. UTC | #1
On Fri, Dec 6, 2024 at 11:33 AM <jeffxu@chromium.org> wrote:
>
> From: Jeff Xu <jeffxu@google.com>
>
> Hi Andrew,
>
> Is that possible to squash this change on top of
> "mseal: move can_do_mseal to mseal.c" on the mm-unstable ?
>
> This is the first time I m doing this, because I saw dev did this before,
> and saying this is the prefered approach.
>
> I could also send v2 which is what I usually do.
>
Actually, please ignore this, I will send a V2 instead.
(this didn't remove the code, sorry about that)

> Thanks
> -Jeff
>
> Signed-off-by: Jeff Xu <jeffxu@chromium.org>
> ---
>  mm/mseal.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/mm/mseal.c b/mm/mseal.c
> index e167220a0bf0..08e6f328d9c7 100644
> --- a/mm/mseal.c
> +++ b/mm/mseal.c
> @@ -225,9 +225,9 @@ int do_mseal(unsigned long start, size_t len_in, unsigned long flags)
>         unsigned long end;
>         struct mm_struct *mm = current->mm;
>
> -       ret = can_do_mseal(flags);
> -       if (ret)
> -               return ret;
> +       /* Verify flags not set. */
> +       if (flags)
> +               return -EINVAL;
>
>         start = untagged_addr(start);
>         if (!PAGE_ALIGNED(start))
> --
> 2.47.0.338.g60cca15819-goog
>
Lorenzo Stoakes Dec. 6, 2024, 7:39 p.m. UTC | #2
On Fri, Dec 06, 2024 at 07:33:09PM +0000, jeffxu@chromium.org wrote:
> From: Jeff Xu <jeffxu@google.com>
>
> Hi Andrew,
>
> Is that possible to squash this change on top of
> "mseal: move can_do_mseal to mseal.c" on the mm-unstable ?
>
> This is the first time I m doing this, because I saw dev did this before,
> and saying this is the prefered approach.
>
> I could also send v2 which is what I usually do.
>
> Thanks
> -Jeff
>
> Signed-off-by: Jeff Xu <jeffxu@chromium.org>

Hi Jeff,

Fix-patches and the like are usually for stuff that's been taken and this, I
don't believe has (I might be wrong actually).

But anyway, as a reviewer it's easier for me to deal with a v2 in this case, I
am not going to give tags to the original version of this and want to make it
explicit I am only giving them to the corrected version.

So from my perspective could you do a favour and send as a v2 as it makes my
life easier anyway? :)

Thanks, Lorenzo

> ---
>  mm/mseal.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/mm/mseal.c b/mm/mseal.c
> index e167220a0bf0..08e6f328d9c7 100644
> --- a/mm/mseal.c
> +++ b/mm/mseal.c
> @@ -225,9 +225,9 @@ int do_mseal(unsigned long start, size_t len_in, unsigned long flags)
>  	unsigned long end;
>  	struct mm_struct *mm = current->mm;
>
> -	ret = can_do_mseal(flags);
> -	if (ret)
> -		return ret;
> +	/* Verify flags not set. */
> +	if (flags)
> +		return -EINVAL;
>
>  	start = untagged_addr(start);
>  	if (!PAGE_ALIGNED(start))
> --
> 2.47.0.338.g60cca15819-goog
>
Jeff Xu Dec. 6, 2024, 7:53 p.m. UTC | #3
On Fri, Dec 6, 2024 at 11:39 AM Lorenzo Stoakes
<lorenzo.stoakes@oracle.com> wrote:
>
> On Fri, Dec 06, 2024 at 07:33:09PM +0000, jeffxu@chromium.org wrote:
> > From: Jeff Xu <jeffxu@google.com>
> >
> > Hi Andrew,
> >
> > Is that possible to squash this change on top of
> > "mseal: move can_do_mseal to mseal.c" on the mm-unstable ?
> >
> > This is the first time I m doing this, because I saw dev did this before,
> > and saying this is the prefered approach.
> >
> > I could also send v2 which is what I usually do.
> >
> > Thanks
> > -Jeff
> >
> > Signed-off-by: Jeff Xu <jeffxu@chromium.org>
>
> Hi Jeff,
>
> Fix-patches and the like are usually for stuff that's been taken and this, I
> don't believe has (I might be wrong actually).
>
sure.

> But anyway, as a reviewer it's easier for me to deal with a v2 in this case, I
> am not going to give tags to the original version of this and want to make it
> explicit I am only giving them to the corrected version.
>
> So from my perspective could you do a favour and send as a v2 as it makes my
> life easier anyway? :)
>
sure.

> Thanks, Lorenzo
>
> > ---
> >  mm/mseal.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/mm/mseal.c b/mm/mseal.c
> > index e167220a0bf0..08e6f328d9c7 100644
> > --- a/mm/mseal.c
> > +++ b/mm/mseal.c
> > @@ -225,9 +225,9 @@ int do_mseal(unsigned long start, size_t len_in, unsigned long flags)
> >       unsigned long end;
> >       struct mm_struct *mm = current->mm;
> >
> > -     ret = can_do_mseal(flags);
> > -     if (ret)
> > -             return ret;
> > +     /* Verify flags not set. */
> > +     if (flags)
> > +             return -EINVAL;
> >
> >       start = untagged_addr(start);
> >       if (!PAGE_ALIGNED(start))
> > --
> > 2.47.0.338.g60cca15819-goog
> >
diff mbox series

Patch

diff --git a/mm/mseal.c b/mm/mseal.c
index e167220a0bf0..08e6f328d9c7 100644
--- a/mm/mseal.c
+++ b/mm/mseal.c
@@ -225,9 +225,9 @@  int do_mseal(unsigned long start, size_t len_in, unsigned long flags)
 	unsigned long end;
 	struct mm_struct *mm = current->mm;
 
-	ret = can_do_mseal(flags);
-	if (ret)
-		return ret;
+	/* Verify flags not set. */
+	if (flags)
+		return -EINVAL;
 
 	start = untagged_addr(start);
 	if (!PAGE_ALIGNED(start))