On Sunday, November 11, 2018 11:08:59 AM EST sf...@users.sourceforge.net 
wrote:
> Mark Asselstine:
> > As stated in tools/objtool/Documentation/stack-validation.txt the use
> > of "Dynamic jumps and jumps to undefined symbols" has several
> > conditions, neither of which we meet. The use of .label to dictate
> > which label we 'goto' can be implemented in several ways that will be
> > 'safe' from the stack validation point of view. Here we drop the
> > .label and instead are able to use the .flags to decide which label to
> > goto. This results in the same end result while ensuring we are a good
> > citizen with respect to the stack validation.
> 
> Thank you for the patch.
> Actually I made very similar fix when linux-v4.6-rc1 was released (two
> years ago), but the commit stays in my local development branch and has
> not released. It was my GIT-work mistake.
> Here is my fix, and I am going to release on next Monday.
> 
> 
> J. R. Okajima

Easy enough mistake, especially given that this has little bearing on 
functionality. Very similar change. Thanks for getting the fix merged.

Mark

> 
> 
> diff --git a/fs/aufs/cpup.c b/fs/aufs/cpup.c
> index 9ff0963..3c74d6f 100644
> --- a/fs/aufs/cpup.c
> +++ b/fs/aufs/cpup.c
> @@ -366,18 +366,15 @@ static int au_cp_regular(struct au_cp_generic *cpg)
>               struct dentry *dentry;
>               int force_wr;
>               struct file *file;
> -             void *label;
>       } *f, file[] = {
>               {
>                       .bindex = cpg->bsrc,
>                       .flags = O_RDONLY | O_NOATIME | O_LARGEFILE,
> -                     .label = &&out
>               },
>               {
>                       .bindex = cpg->bdst,
>                       .flags = O_WRONLY | O_NOATIME | O_LARGEFILE,
>                       .force_wr = !!au_ftest_cpup(cpg->flags, RWDST),
> -                     .label = &&out_src
>               }
>       };
>       struct super_block *sb;
> @@ -391,8 +388,12 @@ static int au_cp_regular(struct au_cp_generic *cpg)
>               f->file = au_h_open(cpg->dentry, f->bindex, f->flags,
>                                   /*file*/NULL, f->force_wr);
>               err = PTR_ERR(f->file);
> -             if (IS_ERR(f->file))
> -                     goto *f->label;
> +             if (IS_ERR(f->file)) {
> +                     if (i == SRC)
> +                             goto out;
> +                     else
> +                             goto out_src;
> +             }
>       }
> 
>       /* try stopping to update while we copyup */





Reply via email to