From patchwork Mon Jan 30 20:49:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 4731 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2395552wrn; Mon, 30 Jan 2023 13:04:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXtvUcQhLQN7eqijkgEKQkud9tmvjgLDhbKhPnPudzZlhUtAhfQo72Zv3HhVKPECffFjLnhK X-Received: by 2002:a17:902:aa48:b0:194:892b:8654 with SMTP id c8-20020a170902aa4800b00194892b8654mr47012412plr.17.1675112652720; Mon, 30 Jan 2023 13:04:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675112652; cv=none; d=google.com; s=arc-20160816; b=hBnQKWah5BoObCP5+gGyAIL9RR1WnjaFYzGPWq6xMEJR9ACas4km7B8RGihNjuO/lt zQDtVhNWyKUJVvOxU992qHZjLjXgInR6OjHmkikxTw5itqKACb+1PpTCGWZ1Z51BylKy aQWWz6Nv06O4MKRXpzzUPolMBZdeSZ+vYDlabiYtFtG3igX3okbn+c4wIhUyDfL152Rf HzjBHRrDcQvoG4eyunlucsvADDb8/ugowvBEXbkJEtNnw8TwdTjMIcuJgs/HODhvJrC6 W/xqXD85nbOsj83xueG2z+FnQpyL7OKGfIyKIIeX/bGZCQyiaIO2/ld9JPTwa5KiT806 B8eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hkOxFb3yEq6h7w40h7f3LyAdThOsJZHxCl/P/Sxc7oQ=; b=MOootxLtBEHYHc8oEGbBQ6injNjg/ZDowNqvhLgpkqCgJvab02wnnUKW4v9O368Z8r jlR+2EjP1kkF2SIT07sxqxQVVRB6UeAJ79Gb5KusNK7GeWCRpcBXy+aBj6AULWF9M3jF KZjlEc0HvajKPxyCGAeCkbAZZgfXF5v/QNi+wCTVdaXg6BTZ+F/qkpCJ36I2d/cPWokl 6aYyEa7gYY4Jvjz9ZP/kraYpQI7PqXgcHS7YMsjK4upWF8JUlTFuOR3ugnSDVzNlxa+0 q43EbrmHfAxTFzkpkDNjngcGIVuoyYdXFgVtRWsCk48TU7KVB2gNH+8HxVeRKtZx93A9 x2Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=IjSdtAT7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p6-20020a1709028a8600b00192a2923f63si13115257plo.464.2023.01.30.13.03.56; Mon, 30 Jan 2023 13:04:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=IjSdtAT7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbjA3U4V (ORCPT + 99 others); Mon, 30 Jan 2023 15:56:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230168AbjA3U4O (ORCPT ); Mon, 30 Jan 2023 15:56:14 -0500 Received: from out-164.mta1.migadu.com (out-164.mta1.migadu.com [95.215.58.164]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFF823E609 for ; Mon, 30 Jan 2023 12:56:10 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1675111786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=hkOxFb3yEq6h7w40h7f3LyAdThOsJZHxCl/P/Sxc7oQ=; b=IjSdtAT7mJMj0n3equLk6P0c1en/EigWievoZ84+T0WHThgYyVm1Mlt7y1eDxyh5x6w1qk GynjcdifilVI+8ZRAC4HGbxVI1DSaIgUk3/XoNZr6Jo4VpXVNQXVkgNW5nkvfu8ftTFyLM 4wLznoICjyBMgYo9GjxcNHuR1Nht9lc= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH 00/18] lib/stackdepot: fixes and clean-ups Date: Mon, 30 Jan 2023 21:49:24 +0100 Message-Id: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756482924988203683?= X-GMAIL-MSGID: =?utf-8?q?1756482924988203683?= From: Andrey Konovalov A set of fixes, comments, and clean-ups I came up with while reading the stack depot code. The only fix that might be worth backporting to stable kernels is in the first patch. Andrey Konovalov (18): lib/stackdepot: fix setting next_slab_inited in init_stack_slab lib/stackdepot: put functions in logical order lib/stackdepot: use pr_fmt to define message format lib/stackdepot, mm: rename stack_depot_want_early_init lib/stackdepot: rename stack_depot_disable lib/stackdepot: annotate init and early init functions lib/stackdepot: lower the indentation in stack_depot_init lib/stackdepot: reorder and annotate global variables lib/stackdepot: rename hash table constants and variables lib/stackdepot: rename init_stack_slab lib/stackdepot: rename slab variables lib/stackdepot: rename handle and slab constants lib/stacktrace: drop impossible WARN_ON for depot_init_slab lib/stackdepot: annotate depot_init_slab and depot_alloc_stack lib/stacktrace, kasan, kmsan: rework extra_bits interface lib/stackdepot: annotate racy slab_index accesses lib/stackdepot: various comments clean-ups lib/stackdepot: move documentation comments to stackdepot.h include/linux/stackdepot.h | 152 +++++++-- lib/stackdepot.c | 628 ++++++++++++++++++------------------- mm/kasan/common.c | 2 +- mm/kmsan/core.c | 10 +- mm/page_owner.c | 2 +- mm/slub.c | 4 +- 6 files changed, 435 insertions(+), 363 deletions(-)