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]
Date:   Wed, 2 Aug 2023 10:44:15 +0200
From:   Boris Brezillon <boris.brezillon@...labora.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Christian König <ckoenig.leichtzumerken@...il.com>,
        maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
        tzimmermann@...e.de, airlied@...il.com, daniel@...ll.ch,
        trix@...hat.com, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        naresh.kamboju@...aro.org, dakr@...hat.com
Subject: Re: [PATCH 1/2] drm/exec: use unique instead of local label

On Tue, 1 Aug 2023 13:35:13 -0700
Nick Desaulniers <ndesaulniers@...gle.com> wrote:

> On Mon, Jul 31, 2023 at 5:36 AM Christian König
> <ckoenig.leichtzumerken@...il.com> wrote:
> >
> > GCC forbids to jump to labels in loop conditions and a new clang
> > check stumbled over this.
> >
> > So instead using a local label inside the loop condition use an
> > unique label outside of it.
> >
> > Fixes: commit 09593216bff1 ("drm: execution context for GEM buffers v7")
> > Link: https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
> > Link: https://github.com/ClangBuiltLinux/linux/issues/1890
> > Link: https://github.com/llvm/llvm-project/commit/20219106060208f0c2f5d096eb3aed7b712f5067
> > Reported-by: Nathan Chancellor <nathan@...nel.org>
> > Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>
> > CC: Boris Brezillon <boris.brezillon@...labora.com>
> > Signed-off-by: Christian König <christian.koenig@....com>  
> 
> Works for me; thanks for the patch!
> Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
> 
> I suspect it's possible to change the indirect goto into a direct goto
> with some further refactoring (macros can take block statements; if
> drm_exec_until_all_locked accepted a block statement arg then you
> could introduce a new scope, and a new local label to that scope, then
> just use direct goto),

Maybe I'm wrong, but this sounds like the version I proposed here [1].

> but this will probably apply cleaner. (oh, is
> 09593216bff1 only in next at the moment? The AuthorDate threw me.)
> 
> There are some curious cases where __attribute__((cleanup())) doesn't
> mesh well with indirect gotos.
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37722
> 
> May not ever be a problem here...

[1]https://patchwork.freedesktop.org/patch/543077/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ