Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp32643pxu; Mon, 5 Oct 2020 23:06:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9mIG8HLS/R/G+fiCeHs9Dueh2c9Rq9wvKvhKvE04gZ/OghSAs9gpouQGlK3G/faOm6F3b X-Received: by 2002:a17:907:270f:: with SMTP id w15mr3313660ejk.505.1601964369453; Mon, 05 Oct 2020 23:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601964369; cv=none; d=google.com; s=arc-20160816; b=D8cBGX8+i7T0f3bQEUnaNXTy7LkVI0G+haVD1ahSO2F0b+1n/7QRhTXoYjGZyqKVif y4DHSdM0TfHzffKxB+6Tc7SOYke0xThbf2J0iHHy5/v+Z6TQU+x98IauygKusPkyQE0l CG0OAo9nTRPIID86ge65EC64dFCZ5hpTV4s2LA7rQyAzYSbdSd6wtMeMli/yGf9f8hVE QJHczs3fqHc7XdLza7UgFpToFo2fpOVHkEBiqDL0Qb79Ur1vo2qnvb8pTAid/9UNmq1B k3HMZoJkAQL0Ctp2TQoBdaCAeSGX+uPygYPEt6VBl3Uj+hr+1KjGNKNlv3+2qm2qe6Sr tqZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=o+1mE6CyvtWobK1yelGFLZic7reL9nnvtSTOf+SbuLw=; b=y+eZeOZzlUdbEcQti3cneyE6qm3ptE/UjUwUsAeFeVkgJ9yFIQL2xjBOWqv1u+3aOP kuzmLzismSJHiIMPBmD4vu7/n8lHYTzdLOUTVvixwMgbSSHxFWa8wdeZML5//EIqQqRZ P2XOG2Ohv2Jq3V+BrKb36mr8/W76CoPEGsxeNntZLLpKZsnxL9Vq8UlRrJCN0JnFIXmi Ctsi4SUAob0Vk42kozR06R3ztey02+TY6VE6U+Iy+scmtYEqBD+oTb0qAw8fllrV05oP hLhPqxciK9C9J8BpVPZbjQK3+egz91N2YrpWNn1e4YchZCM6aySnOFSvK5ufYg1rJd8a 6TfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AKn2a5gA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mh11si1252141ejb.676.2020.10.05.23.05.46; Mon, 05 Oct 2020 23:06:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AKn2a5gA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727082AbgJFGDt (ORCPT + 99 others); Tue, 6 Oct 2020 02:03:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726761AbgJFGDs (ORCPT ); Tue, 6 Oct 2020 02:03:48 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D5C0C0613A7 for ; Mon, 5 Oct 2020 23:03:48 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id 34so7368147pgo.13 for ; Mon, 05 Oct 2020 23:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=o+1mE6CyvtWobK1yelGFLZic7reL9nnvtSTOf+SbuLw=; b=AKn2a5gAkmOS3c6KWOCMKE3zG3Yr5UDOsY6/N8l40OaXH4y/N7DSqqkQajgy41Pdt9 +57NKe9lna49m7GxxMfS/mY5SlHcJ08EUO33cGnDhzLZwI13XWrO0zqTlZtNWpoikCmD 41q/FOv2LZz3+a3ULfrwTu2Jhj80EkzgKXHME= 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; bh=o+1mE6CyvtWobK1yelGFLZic7reL9nnvtSTOf+SbuLw=; b=gvip6/0xhmVxg1pBlbxKmh+ErbqLYIX1PirrWjy45QlWkRPDMT4TskgbXvPSphW7cw 0DOFlPQ4BWp8mcSvD+CehtGnJzbtWS95YbyCALTIt4wMvhpDooL9QrP9KBBOyWGsdKKm tEK5lQ+WFbLFt4IjGXsphM/mFmimyxmrqK5qcMubn3njAcN3ew3gXpT/g0j3yU1+Hl+H XJJOTj1C/EZLlFjxZbI1xlHWwjIYGDWVxYVW4FVFBYIB5WWujXzkx6Dpyo+9uCn243Hn jYPCZ4zK220XYaQNIhoQ98hJI5dCHbgN3Xi48fMGzsgPlLb8H1PgSVTNIHUkELuYEs/V Tpqw== X-Gm-Message-State: AOAM531bwXj+j/aw4/y/VUXjT+ZqnrxfVh/4ZddRc72MEyTkBierW+oP dtt6KxdGVrtEG4eEXTb04NqXfA== X-Received: by 2002:a05:6a00:2291:b029:142:2501:3987 with SMTP id f17-20020a056a002291b029014225013987mr3072038pfe.76.1601964228199; Mon, 05 Oct 2020 23:03:48 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id r206sm1942936pfr.91.2020.10.05.23.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:03:47 -0700 (PDT) Date: Mon, 5 Oct 2020 23:03:46 -0700 From: Kees Cook To: Nathan Chancellor Cc: Andrew Morton , Linus Torvalds , Ard Biesheuvel , Arnd Bergmann , Masahiro Yamada , Michal Marek , Nick Desaulniers , Marco Elver , Randy Dunlap , Dmitry Vyukov , George Popescu , Herbert Xu , Peter Oberparleiter , Andrey Ryabinin , clang-built-linux@googlegroups.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] ubsan: Force -Wno-maybe-uninitialized only for GCC Message-ID: <202010052301.CFBC03C72E@keescook> References: <20201002221527.177500-1-keescook@chromium.org> <20201002221527.177500-4-keescook@chromium.org> <20201004071614.GC1650@Ryzen-9-3900X.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201004071614.GC1650@Ryzen-9-3900X.localdomain> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 04, 2020 at 12:16:14AM -0700, Nathan Chancellor wrote: > On Fri, Oct 02, 2020 at 03:15:26PM -0700, Kees Cook wrote: > > Clang handles 'maybe-uninitialized' better in the face of using UBSAN, > > so do not make this universally disabled for UBSAN builds. > > > > Signed-off-by: Kees Cook > > Well this patch is not strictly necessary because Clang does not support > -Wmaybe-uninitialized anyways :) its flags are -Wuninitialized and > -Wsometimes-uninitialized so the warning stays enabled for UBSAN as it > stands. Ah, yes. Heh. Well... perhaps I can just drop this patch. > However, something like this could still worthwhile because it would > save us one call to cc-disable-warning (yay micro optimizations). > > Maybe it just does not need to have a whole new symbol, just make it > > ubsan-cflags-$(CONFIG_CC_IS_GCC) > > instead of > > ubsan-cflags-$(CONFIG_UBSAN) If it gets kept, I'd still like it gated on CONFIG_UBSAN in some way (e.g. the patch has an implicit depends due to the "if UBSAN" section). But yes, this patch is rather a no-op. -- Kees Cook