Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp605918imu; Tue, 11 Dec 2018 04:45:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/X5bl+YrRgLygMyFXMubyILbT8XTRFBDcgQqGEVRZt/76qnPwxiwVyXbcIZueVKZy2Keenc X-Received: by 2002:a17:902:f01:: with SMTP id 1mr15359386ply.143.1544532352533; Tue, 11 Dec 2018 04:45:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544532352; cv=none; d=google.com; s=arc-20160816; b=FeZmsFtrDEhdCGMauq/al2eP16S3kz+/Co0weE07dO0F1RAXIx3S+rynAeN7wz0gbR 9hXJMPAC8Ivga90/K+GN0Dj+u4phOORD76HTcAydc7SSmsP+cOze4Oaz/UTZ1gjic2hL VYATTyAfJJZwrN3Umap2kzsbP/2qyvo4BssI+8lbFjMsZdpAeG/9ZDUk4bOb63LyIuKl KRFYgCQOz/vKXq0ZHIIHgRToF7u8rK/boCh+x8RsYWUBZ9jIM4X0ZhU91vBh/1Yt3NZh mrREeFmbM1gknod3a5wsCovS/Nxa3FYqQqF94q9RnBJ8Imw5a2Eard3TMv8HQ8aCMw87 +nsw== 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=gD8f9A+yOrKSkam/K81qSn+sZ/zk2aeP124oDPQh7j8=; b=K6ajBgmMZq15SyiSwTxIWMHforcGHyVHp8YGZ0eB4UZrbI/EE86N8TBP77p+qyEY78 7NFaRzelF9uUOIp+z1VUTbY+0Kr2XVdH4DeHXMUfrB8KhF8fVPaVJpFC7tLXH78gZYfQ gL4UZQLZ1krWr3m/HUe0ddVKfdq4oL64emyHS+9AprHYi/JSDRgwPxj4DqfRyvMB0snx UDuL8CgfLAqTxfma3V48rwebcziCNolQ39vc7vH89OHTJRJD3EPg/NxxfaumIZY8UWtc znXK7ETm+LP6ADLltu86kolBLRwgFcIeIyBsRdTmJwD25FCml8BU50kF8xxQV3rYxfsc zBQw== 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 72si12261021pla.218.2018.12.11.04.45.37; Tue, 11 Dec 2018 04:45:52 -0800 (PST) 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 S1726501AbeLKMmm (ORCPT + 99 others); Tue, 11 Dec 2018 07:42:42 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:45666 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbeLKMmm (ORCPT ); Tue, 11 Dec 2018 07:42:42 -0500 Received: by mail-qk1-f196.google.com with SMTP id y78so8442633qka.12 for ; Tue, 11 Dec 2018 04:42:41 -0800 (PST) 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=gD8f9A+yOrKSkam/K81qSn+sZ/zk2aeP124oDPQh7j8=; b=f+tEblF8n7ijq+Wjf++xHtwZkoaM93VLcaBHLMqd9Wm/BJdmPmOEx/oocjEtzN59Si 1vIrjJWmRrskbDU3JYLpgJ6hazlxZuPXrqIVSenvySJTjl0FWiMN8yhU9FEn8/6aRKfT c2TmU/oL+6F8LwU6vGiQuJ/tfPZpWCYFGTGeRoP4O8sKornxfM5uTkelCTYS9li/3T+A GJXgZtHknMJEpM0MZ6dRdafJe5WD1fqbHSvzpQt5szkwBYL+KMGYmtlAJZ8ee/b/W8LY r8qJ6Na0qFobYhVajP4s+5wP2uvddm/LnnMRtprgT5kck8qdY8IDnAkLt1O6TtyaS/ga a/8g== X-Gm-Message-State: AA+aEWbyOWnVrYlBt8ZsmsXIURuFvCMjb4sz/LdJrJNCU54u0T8reoWf dx5l2UempX1r+niBo+4NAhIXnuv7g2Ci7LtG9wY= X-Received: by 2002:a37:324a:: with SMTP id y71mr14519413qky.291.1544532161273; Tue, 11 Dec 2018 04:42:41 -0800 (PST) MIME-Version: 1.0 References: <721E7B42-2D55-4866-9C1A-3E8D64F33F9C@gmx.us> <20181207223449.38808-1-cai@lca.pw> In-Reply-To: <20181207223449.38808-1-cai@lca.pw> From: Arnd Bergmann Date: Tue, 11 Dec 2018 13:42:24 +0100 Message-ID: Subject: Re: [PATCH] arm64: increase stack size for KASAN_EXTRA To: cai@lca.pw Cc: Catalin Marinas , Will Deacon , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , kasan-dev , Linux-MM , Linux ARM , Linux Kernel Mailing List 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 Fri, Dec 7, 2018 at 11:35 PM Qian Cai wrote: > > If the kernel is configured with KASAN_EXTRA, the stack size is > increasted significantly due to enable this option will set > -fstack-reuse to "none" in GCC [1]. As the results, it could trigger > stack overrun quite often with 32k stack size compiled using GCC 8. For > example, this reproducer > > size > 7536 shrink_inactive_list > 7440 shrink_page_list > 6560 fscache_stats_show > 3920 jbd2_journal_commit_transaction > 3216 try_to_unmap_one > 3072 migrate_page_move_mapping > 3584 migrate_misplaced_transhuge_page > 3920 ip_vs_lblcr_schedule > 4304 lpfc_nvme_info_show > 3888 lpfc_debugfs_nvmestat_data.constprop > > There are other 49 functions are over 2k in size while compiling kernel > with "-Wframe-larger-than=" on this machine. Hence, it is too much work > to change Makefiles for each object to compile without > -fsanitize-address-use-after-scope individually. > > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715#c23 Could you clarify: are the numbers you see with or without the bugfix from that bugzilla? Arnd