Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4697807imm; Mon, 18 Jun 2018 21:09:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJvBdnaO4qF4X2Hz2OTna3AkhlmbhuhlKFADvXbf91Ssj0Usts4xQiYpWgfOECjV+r/TUYU X-Received: by 2002:a65:6008:: with SMTP id m8-v6mr13482495pgu.134.1529381390441; Mon, 18 Jun 2018 21:09:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529381390; cv=none; d=google.com; s=arc-20160816; b=Y4Arhh4GR7kXAGcI1IgFP0c4u1HyuOOJOVVgeg5lxnwE1DxSnhD2qn/Ut6eed3Rqct ALU9yRacIq1K6G20oVEjuZzOlCQywVaRMP2FWJpcTvAb2wZS4dIT6dsxQKK63oVxIJyi BQb5oWszgLXZ5QceuazYVRTXG4pHaZapKcKJVM3ZE2MM8w61DNhMvezqSNf+wu3j0O7M Slh6cs5hxiQvodBUBfF56WCjwEfsgSIC6UenPJEgE9XVusVpvzU1q1mk9xeugLxvLd/u +NoursIItNbqoYMc4jCZmyZCmD0BdTOmIQoHd0rKs0ZM2ouvDiYKkWnhQ7ti+mvKoK/2 YjIg== 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 :arc-authentication-results; bh=2UJG83R9Q8/9uKiPMLY6oWhnMFJXmaltjYZk/MmntRE=; b=JGA/X2PHCuZioZyjWao4cEsZJC3TyCrFMrIAH3HXQtos/jGQkqxxvJa4BSQw4ctHjv xjEn8Uv9UhsvmmKdIhegmcEiMGyJUblxXKxDhwqDuFfNv8hgE8orxyiac633hVLGuRJZ OwYNmuTntV+1Ij4tmR7oBvpy64YRQp1iUFNZ2WDN3mVoDeGfCilTK4NNMOVumT7SVL2o pgEEKcCVXy1Q04MoV+oJF4SLQ137MbrWszxmkKKUV0X+yV720xZuQITrINmRw33oeosS 7ipCCzYZiwIcWsT74jRvAlOJDWfcaILkqSmp6eXP/3nIBs3kwjjhzCX0+38IO8JvRyYF N4WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=sDt1aDtS; 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=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2-v6si16377865plh.387.2018.06.18.21.09.36; Mon, 18 Jun 2018 21:09:50 -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=@zx2c4.com header.s=mail header.b=sDt1aDtS; 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=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750973AbeFSEI1 (ORCPT + 99 others); Tue, 19 Jun 2018 00:08:27 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:45193 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750718AbeFSEI0 (ORCPT ); Tue, 19 Jun 2018 00:08:26 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id d6e5fd93 for ; Tue, 19 Jun 2018 04:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=62IULhG24/vJtvRYDGsowsqVdbI=; b=sDt1aD tSA/AVB4clusYBH+WS1JLrBf5+H7FRcpVaPE0R1/jrHfyWBGc60v7xXfHx00T5eC HCpWSG7YpxxZC5xEcDf/mIbH5o96WwnfIf07FfkBExa5ya99GRax6yb3XFKI+J6J lxZwVKANt8Qi+8vn7qCyOdv4N0095y2VLKnXUF91go2HDUk9drthrm2PI80OIkuN 2Szvlpiz7JhCS0AVLblU+yqj4XzNiQZkUNkpJaUHItlmpxkn0PmmKwpSRF9iBQKn HqfzVRIbuLV7Z8J0HdAe+9eEcQcEU/Yguhz6t7hFeLAJsxOUiOgqVOkCovF7AimW XXXT/t4KhAKdx+Tw== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id bbeb3508 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Tue, 19 Jun 2018 04:02:35 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id e8-v6so16941915oii.2 for ; Mon, 18 Jun 2018 21:08:25 -0700 (PDT) X-Gm-Message-State: APt69E3n9QUUTiiCTyBCfQXVKWbWyAJMBROvL5+LLrc/6ck8W0wgJaAb 0SqkP5FXp+W9zWSRjiqCaU28XeNBBUFwYv+04oY= X-Received: by 2002:aca:52cb:: with SMTP id g194-v6mr6495025oib.241.1529381303173; Mon, 18 Jun 2018 21:08:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Jason A. Donenfeld" Date: Tue, 19 Jun 2018 06:08:11 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Possible regression in "slab, slub: skip unnecessary kasan_cache_shutdown()" To: Shakeel Butt Cc: aryabinin@virtuozzo.com, Alexander Potapenko , Dmitry Vyukov , cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, Andrew Morton , kasan-dev@googlegroups.com, Linux-MM , 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 Tue, Jun 19, 2018 at 5:59 AM Shakeel Butt wrote: > Hi Jason, yes please do send me the test suite with the kernel config. $ git clone https://git.zx2c4.com/WireGuard $ cd WireGuard/src $ [[ $(gcc -v 2>&1) =~ gcc\ version\ 8\.1\.0 ]] || echo crash needs 8.1 $ export DEBUG_KERNEL=yes $ export KERNEL_VERSION=4.18-rc1 $ make test-qemu -j$(nproc) This will build a kernel and a minimal userland and load it in qemu, which must be installed. This code is what causes the crash: The self test that's executed: https://git.zx2c4.com/WireGuard/tree/src/selftest/ratelimiter.h Which exercises this code: https://git.zx2c4.com/WireGuard/tree/src/ratelimiter.c The problem occurs after gc_entries(NULL) frees things (line 124 in ratelimiter.h above), and then line 133 reallocates those objects. Sometime after that happens, elsewhere in the kernel invokes this kasan issue in the kasan cache cleanup. I realize it's disappointing that the test case here is in WireGuard, which isn't (yet!) upstream. That's why in my original message I wrote: > Rather, it looks like this > commit introduces a performance optimization, rather than a > correctness fix, so it seems that whatever test case is failing is > likely an incorrect failure. Does that seem like an accurate > possibility to you? I was hoping to only point you toward my own code after establishing the possibility that the bug is not my own. If you still think there's a chance this is due to my own correctness issue, and your commit has simply unearthed it, let me know and I'll happily keep debugging on my own before pinging you further. Regards, Jason