Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7372790ybi; Mon, 22 Jul 2019 11:57:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiu0p0ehR5wx0RJPfnDSe/GBXwjfZu3a2Hi+s4o9sajnrbVY+D+7PPkwROHbuFnp+zL515 X-Received: by 2002:a17:90a:17c4:: with SMTP id q62mr79791076pja.104.1563821856835; Mon, 22 Jul 2019 11:57:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563821856; cv=none; d=google.com; s=arc-20160816; b=REvGZdOEjeZu+YvYToxl8uHcTS6DxCn5h/ikGeGl7Jtfj6m9pkzqkP6cDQMppIsYqY QkgL1CkavnHuB0v9TIzqocGlDjAGkzHqoZt7/ihNN/MYiktTJVCSaiIledXzu6YO5iCw qRd/ZG867tpZ5skdy7GN8JziRoYejbNlclV8NLHdx3nduZwojvZLobMgZyToNC9XbVCD vU8Ks37Z/Ajq65GlQa3PrPYUEv8iY3XmU/dCyYgQH0jFyaJDW1CImT+Dap2wWArb8+zu nQdOAcPc9KqR8VFuJXkVBaBMQmXMlRuZvuS6p0qA5gYFP0q0m65xhWdm+Gs6j8u+m3gc +vzw== 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; bh=ah6GZe+0UgXZUd+jkutuNIUFv66KlGrmYWfNByDcOvg=; b=N9ASgQrXEP7GLALiBxC7xefi09kzeDywyufh3S+XGCoeLBXXJos+TDXempovfw9KOD HNDz5ae+HFxXg9mQz10sWVpBVFddKJBrRq1JBycnuoYfl35UWjvQA2NwwVJWY/vy2y1F fvtWb5H4xtupDrktm0HmqvgTJGxLa4+SqwJUxcvtErBSEPbe242RIGCgW+9mJkiaV7/D QVO3hFZTKS5RH0jzY9A24wIR1cqJJBSjvuGipMnj4TAUlt3rJfAx0WAS0HyhxLfAN/8f TJpZ+8/O3966V2u+6mv7jSvIUDUk4ylkYEelCgdK6V/DY/J8lOPJY7j0CZIlllHlBaPh T84Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si9879606pgq.414.2019.07.22.11.57.20; Mon, 22 Jul 2019 11:57:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730864AbfGVO05 (ORCPT + 99 others); Mon, 22 Jul 2019 10:26:57 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:43083 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725907AbfGVO05 (ORCPT ); Mon, 22 Jul 2019 10:26:57 -0400 Received: by mail-qk1-f193.google.com with SMTP id m14so3052827qka.10; Mon, 22 Jul 2019 07:26:56 -0700 (PDT) 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=ah6GZe+0UgXZUd+jkutuNIUFv66KlGrmYWfNByDcOvg=; b=YiHIKSd/Y12Jj4HEZ/c0CIq4VcU7J+EREpXOgiwu0Z4dZsNHvJBBw+WciCnsCvxQph Tr+5vm38/wzhGyAAJ5FzbImSVr7MXLUNOyX/HVq/dmBeZo1JwELWlqXtrAkDfYx+GbkD xV5ndf8EGQ5+wdtQaAxTtzsAwsSU8Z8FjjYtound6momZ3YVtjRybrz9puAXZ/xyF64g SioWnE08q9GeLNLvfELhmvn5+GWM7o8esz+PJcN15q+nqcLK23rry8tkx4l2kFpX1xMA wcSBvbd9xH2iXW51hjXbOGhtocwzTeF6Ox7WNdC7xGxkVIk8C4loro46mAV0jIqriaYC 2KLg== X-Gm-Message-State: APjAAAVvq37G0+pbbFuAZtRjVpi3u0kyYKN/ZTF50JweCIydaeJg1PMm vAumt2BXhk+yWiO5vdSCQ4pYmBnfm7xbL574kXA= X-Received: by 2002:a05:620a:b:: with SMTP id j11mr13035375qki.352.1563805616319; Mon, 22 Jul 2019 07:26:56 -0700 (PDT) MIME-Version: 1.0 References: <20190722114134.3123901-1-arnd@arndb.de> In-Reply-To: From: Arnd Bergmann Date: Mon, 22 Jul 2019 16:26:40 +0200 Message-ID: Subject: Re: [PATCH] [RESEND v2] structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK To: Alexander Potapenko Cc: Dmitriy Vyukov , Marco Elver , Andrew Morton , James Morris , "Serge E. Hallyn" , Kees Cook , Ard Biesheuvel , Masahiro Yamada , 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 On Mon, Jul 22, 2019 at 3:43 PM Alexander Potapenko wrote: > On Mon, Jul 22, 2019 at 1:41 PM Arnd Bergmann wrote: > > > > KASAN_STACK is currently implied by KASAN on gcc, but could be made a > > user selectable option if we want to allow combining (non-stack) KASAN > > with GCC_PLUGIN_STRUCTLEAK_BYREF. > > > > Note that it would be possible to specifically address the files that > > print the warning, but presumably the overall stack usage is still > > significantly higher than in other configurations, so this would not > > address the full problem. > > > > I could not test this with CONFIG_INIT_STACK_ALL, which may or may not > > suffer from a similar problem. > We would love to be able to run KASAN together with > CONFIG_INIT_STACK_ALL on syzbot, as this will potentially reduce the > number of flaky errors. Doesn't that just limit the usefulness of KASAN, as you no longer catch actual accesses to unintialized variables that KASAN is designed to find? > Given that we already increase the stack size in KASAN builds, how big > of a problem are these warnings? > Perhaps it's better to disable them in this configuration, or push the limit up? I'm really hoping to lower the per-function limit for 'allmodconfig' builds, since both a high limit and lots of bogus warnings prevent us from noticing any newly introduced functions that use a lot of kernel stack without KASAN. An allmodconfig build (and ideally also any randconfig build) should always complete without warnings to be useful for compile testing. Arnd