Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2702006ybb; Fri, 27 Mar 2020 10:28:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuwRdPcaN2rD6XOUQwX605meE6qWPnqUo7zGY8bSQDHec1zTOipTwubYc2WkDFbCyo7wZ1r X-Received: by 2002:a9d:6857:: with SMTP id c23mr11184783oto.224.1585330080119; Fri, 27 Mar 2020 10:28:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585330080; cv=none; d=google.com; s=arc-20160816; b=njwRZaH7XkoB+EMbzyhtGggoTaLg/JtNplLgxgdXoNH6k1VN18Rst7ntOSSxu2SsUb kWsgbxeFNydppydcObndVbVTG4Ov+sMVMOLS5n305gWvnbO4Mtk+nmu4iofSxgFfNPJ3 nC8IIQyzLt6fk/iq6NWNuVLtN2zmCvJQD5ZgvggiawJ1C/gKcqSR7IYiIgKqTxeHm6k5 GYA45Bgqr/Hd0pJU72z0TLaF0JGH02zxtfheaPwQJ03gGfnf6eNlv+NAxnoiKIUv+7ZA vpsvy9FR4bj9Bks/Fwd4xBek68WfRlsocHxH7HBqmFjsy4GdPdZQlPjkOp3G+Jh7dUCu oSzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ClBYvSVmf83rxBcoJPioNptteHGrQ49oK3IN7T/4Mgc=; b=awovhurl/LtSn5gLNsFbp0NoRsCnrBfYchWLdCabJ5z1RSXuD1gFr2vfk+hfEMIN9+ 9PJTeI6qc56GN15XBIIR25kF7RxPYDT8vE3FdT//4UNdJdq4x/olghGCpJZ21radHTCR UUHXnVSFyvpfu0GVSyqwxLjBjpcKwHQgVJzaGOrTTfL6qm6emfy89zi2bersc4Jzs5sX 4QphkH72Z3VamjJ+2ulNTsC7puV5Urr7DjwKU7k7MY6575ZKVsDEqYE+LqzuCLHF2XIp ItyABGmjKEDQDt2kiM0riL+1GL2bwIMmQHf2DaRq3p7iupohXtbe7hsEFPZboNWFe8Dg Qs1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=p1kxgtdl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k39si1192794otk.255.2020.03.27.10.27.46; Fri, 27 Mar 2020 10:28:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=p1kxgtdl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727143AbgC0R1I (ORCPT + 99 others); Fri, 27 Mar 2020 13:27:08 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:42229 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbgC0R1I (ORCPT ); Fri, 27 Mar 2020 13:27:08 -0400 Received: by mail-ot1-f67.google.com with SMTP id z5so10275623oth.9 for ; Fri, 27 Mar 2020 10:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ClBYvSVmf83rxBcoJPioNptteHGrQ49oK3IN7T/4Mgc=; b=p1kxgtdlAlcm9ZYp0voSXEtcsJCiehEdu2swGy2F/tJZXZEDEM0LiBh5bLYFtdgFZc vsH8oBKUYVuWCQSRJUlNW+M4qg4yLXiWgD2eK+pQCBZ69YoTQhmD3rwBCLNgQqIhOlvk ABETgIyKgHprRV5zGNhl+GGjY2bpPLCWeBOFSQCn0HbGJbZQ/g60ZuYwe2cfmOOAGajh Kf0cjQ/kS6FJKgws+xZ3OVq2EwfuFkKLdUaqmqF6Ul8xX/bBN2ZEnNowVyy1ujh15FJs xnswehxIsxVIpsUdnGDvqjPgUAqQSKKMrB0vNuBQo1ni7AIwNHppUSReQB9iSUvLNxD4 T8Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ClBYvSVmf83rxBcoJPioNptteHGrQ49oK3IN7T/4Mgc=; b=d7fWcOvZhJbPGgq5UFBL7q/gTQsdsbA7UoL7i5RSFMXyvHWwSxYjKtZE+3HmWQYQPW g+UslBPyR6BrRpbUF1Jy6Mrxa2F5Lmee0LC60dhX6b9gKnDXJMQdKLJTBOVYKFozgBhs 34UUVkBsOv+EqocgHJa/IzTvz4/LTWjvD4y/OolShv2a3bJXgcAiTK6kwwDRkVTf0taJ +KuKai0dFAcs7ZEAJp30ltm2q2VrQdbCc3q4rC8BwC1OeTmWXgRuTviggnEF0hZLlDTA G8f8bxSS040ZCiEfDnYkQOFViyVp7J+3yCTS/mOsaQgrq6eqg3RsqoOdyMoH3tydCXSm g53Q== X-Gm-Message-State: ANhLgQ2+fA1H0qJ/TsiE/nmwC4k0G3wDWIbBNu/bfT75eSDL0mscaz4P l3A29LYHDMY2V7fKudCbE6s= X-Received: by 2002:a4a:d88b:: with SMTP id b11mr421504oov.42.1585330026427; Fri, 27 Mar 2020 10:27:06 -0700 (PDT) Received: from ubuntu-m2-xlarge-x86 ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id t4sm1105871otm.45.2020.03.27.10.27.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Mar 2020 10:27:05 -0700 (PDT) Date: Fri, 27 Mar 2020 10:27:03 -0700 From: Nathan Chancellor To: Nick Desaulniers Cc: Clement Courbet , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Greg Kroah-Hartman , Thomas Gleixner , Segher Boessenkool , Christophe Leroy , linuxppc-dev , LKML , clang-built-linux Subject: Re: [PATCH v1] powerpc: Make setjmp/longjump signature standard Message-ID: <20200327172703.GA28580@ubuntu-m2-xlarge-x86> References: <20200327100801.161671-1-courbet@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 27, 2020 at 10:10:44AM -0700, Nick Desaulniers wrote: > On Fri, Mar 27, 2020 at 3:08 AM Clement Courbet wrote: > > > > Declaring setjmp()/longjmp() as taking longs makes the signature > > non-standard, and makes clang complain. In the past, this has been > > worked around by adding -ffreestanding to the compile flags. > > > > The implementation looks like it only ever propagates the value > > (in longjmp) or sets it to 1 (in setjmp), and we only call longjmp > > with integer parameters. > > > > This allows removing -ffreestanding from the compilation flags. > > > > Context: > > https://lore.kernel.org/patchwork/patch/1214060 > > https://lore.kernel.org/patchwork/patch/1216174 > > > > Signed-off-by: Clement Courbet Thanks for fixing this properly, not really sure why I did not think of this in the first place. I guess my thought was the warning makes it seem like clang is going to ignore the kernel's implementation of setjmp/longjmp but I can't truly remember. > Hi Clement, thanks for the patch! Would you mind sending a V2 that > included a similar fix to arch/powerpc/xmon/Makefile? Agreed. > For context, this was the original patch: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aea447141c7e7824b81b49acd1bc78 > which was then modified to: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c9029ef9c95765e7b63c4d9aa780674447db1ec0 > > So on your V2, if you include in the commit message, the line: > > Fixes c9029ef9c957 ("powerpc: Avoid clang warnings around setjmp and longjmp") > > then that will help our LTS branch maintainers back port it to the > appropriate branches. The tags should be: Cc: stable@vger.kernel.org # v4.14+ Fixes: c9029ef9c957 ("powerpc: Avoid clang warnings around setjmp and longjmp") that way it explicitly gets picked up for stable, rather than Sasha's AUTOSEL process, which could miss it. With the xmon/Makefile -ffreestanding removed and the tags updated, consider this: Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Cheers, Nathan