Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2405458ybt; Tue, 16 Jun 2020 05:25:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynbleU7xYN7u9TOw6rYv26DUFqmZ4G5+3xOip4uF1nojhOgbpamGq7BOMN4YI3iAzTpeyp X-Received: by 2002:a50:d7d1:: with SMTP id m17mr2416932edj.126.1592310324030; Tue, 16 Jun 2020 05:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592310324; cv=none; d=google.com; s=arc-20160816; b=hOk4eRLMIJ7TC2QQ5j2Abxov0PUDNNSyFf56Xb6Xss5EJ5GZumS8nNGlJ4SqdMABxI xha/1Plsd5XkMefnj3zRtq1FfhDUbJqO3fCEXBya5wayIk7x6hDwGSrNl0nRk6HIwU8Z VjfxkmCuMFHDSYlAw/DZl4rsnq4b10cN6La/cKuOQVXzRg35H5VmYqKCNe3mO/rrGIk/ 3oCzVKQ8UMZBWjt9GGzw6RPbTp4fn9M5SE/EZ8fZF5QUtMskHUjZHYtTMk4+KbX1JlH6 KWJlts2k02KnPuDlptVU3E5Yv1XFy4gYs/xynQQnWxF8NiUVXmld++qGJax4qH4qINas 5JBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2dyDpoLwIzV8Y2oUVWLUvllKR0lYbevMOUFT0R36afQ=; b=IUeCVnq/zYuI364rewaq/oYxdhvEogFBH5rI1q7ksFw3S/DbHZHie/4CsTwCoVJZGk A9RNmg0ark7aRAJn5AL/OkvAuv4ImOOJqyWKWjf+RZTe3/vh5HeE23+l5BeI+/ZGe/8N SGwbblRJWjmeDHJybI6IJT3bwGi5B1hHqAlpUgIgV02NjdUdBZjTais39RYenI/FivzJ /LMTKAsVgWip67gHvUOzoVXFU06hQmcCocW2l6GDNyu1uBL5BgPe9iVzE5XEKWeVQn6U Ppva1I4i5LzZzCIP0WzBGWk0pc/tn74M37m4HsW+Jh/u8y7Vi4/QDGiwZ7Emfc52S23B gItg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WCJ8C9Th; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si10438590ejr.737.2020.06.16.05.25.01; Tue, 16 Jun 2020 05:25:24 -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=@google.com header.s=20161025 header.b=WCJ8C9Th; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726052AbgFPMVH (ORCPT + 99 others); Tue, 16 Jun 2020 08:21:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbgFPMVG (ORCPT ); Tue, 16 Jun 2020 08:21:06 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAD81C08C5C2 for ; Tue, 16 Jun 2020 05:21:06 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id b5so18582766iln.5 for ; Tue, 16 Jun 2020 05:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2dyDpoLwIzV8Y2oUVWLUvllKR0lYbevMOUFT0R36afQ=; b=WCJ8C9ThcrJ9JyM+LwYLoP8teUs6OOqWzFt0B+WKUmQEDEJARfMFSYesiYcnxggBAO SL62uH4RsxB8ER24y/h+PA6x7JTVxMhOg82AcTYagDooAJo3f6UHmLWMlARu4z8y2MXE bg+RASloJPg/QWVzEyAuA+mQ4WSLUZ/NfgurTZYfatDjrt4aB7v1BSo8AvY0W5sy3/fb VtDpxR/N1pieOam7mj9O7r/vuPpWYEA7fthd7HnxpWgeUJU87sx3d2INqr+nBlfc+iTf bhZug5enKk5d8LgFHimwLSQamDALpuEszfYS7E2bz4CIH8K3GH/f1KbtgNHCeDJ8sxF9 0yUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2dyDpoLwIzV8Y2oUVWLUvllKR0lYbevMOUFT0R36afQ=; b=KnhZ1HuEn9V4RDhZkeBoLk6Tow3KWtlz1JxslUjcljeaww8TnonL4/ouN8S5rVn3cW xWG8Ki8ML/HE3CkqvwcwiG1Ujnb3fULEau16XQdNTceSCpFYQzqBhucsqmB+BKVb0W2j Kt27LRoWbQStvhpOJylPX6qjloPVGT3BwDsS2ZNft8MaMsiN03PAoBF0jslw7oZFpQX6 QY1n2B1UWW7q3llAT72LjMTc8EuSRIp0eO9eY04LER8yVWvl0NmdQec9jI86Jcycicrb YcYo02S2nVgMqVcLpLCZHATcLKidN5GSULXQy512CpMpIMmqavokMLCueXfhgELVEIQ+ nz2A== X-Gm-Message-State: AOAM53100cKN2He438VqWNwVqQvA1ysapAQgQnQjC57e+XNWK3G5/C8W PwXPs+oi1Vzc9i9e+J3s3jP3Hu3YtWrDHrTgFH0+iQ== X-Received: by 2002:a92:a112:: with SMTP id v18mr2615151ili.278.1592310065900; Tue, 16 Jun 2020 05:21:05 -0700 (PDT) MIME-Version: 1.0 References: <20200616083435.223038-1-glider@google.com> <20200616100309.GA2614426@kroah.com> In-Reply-To: From: =?UTF-8?Q?Maciej_=C5=BBenczykowski?= Date: Tue, 16 Jun 2020 05:20:54 -0700 Message-ID: Subject: Re: [PATCH v2] [RFC] security: allow using Clang's zero initialization for stack variables To: Alexander Potapenko Cc: Greg KH , Masahiro Yamada , Kees Cook , James Morris , Nick Desaulniers , linux-security-module , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > We could make INIT_STACK_ALL_ZERO fall back to INIT_STACK_ALL_PATTERN > if the compiler flag goes away - does this make sense? No, I'm pretty sure failing to build, or at least not setting anything is better. AFAIK pattern actually introduces new bugs that aren't visible at all with neither of these flags set. (because in practice the default no flag behaviour seems to zero some stuff [probably padding] that it doesn't with pattern)