Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1791962rdb; Mon, 9 Oct 2023 03:10:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGK0Xp22Nixe5kmdv/abwragqOtkpUx+UPcz61HncSRASdNKi89vgQd8g54sqyxswyWqK20 X-Received: by 2002:a17:903:230a:b0:1c7:7e00:8075 with SMTP id d10-20020a170903230a00b001c77e008075mr18933838plh.66.1696846249273; Mon, 09 Oct 2023 03:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696846249; cv=none; d=google.com; s=arc-20160816; b=FJ5tQiAxz9II17Xf6G8YV85G6jFNUFbN6KwNhyZyrm2AeJPDhwl/fOsLQM+0NOPrtB T5+HHEfuJBmAMCu+mnQh22QlQ/ySAay2wyOlfFDS5qBR9iFlu8XdkpFzp48U3zfDSMmN CA65Ks62Q1jqM4W7yI2Zg9YmHYlkbfAEWCg4ino8w+dUyKfBd1UghZeG/XxJqjjsRrN+ b6OoIA3aI0GkajQGorMDT1Va/inxr8nOrNEw5lT1+fPtlNQcHbUU8UWuey6OEoaXMBw/ sBotu8Nf001mHX4G4u8ni+s71iRMdvWNJv/bYkDoQ28KyUCSxyxcwbGsnQgY6lJpT1bj FOKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=pKAlUAosFjrafJFjKgxhfBSe7ZC79o6SyWOfRs4IFUY=; fh=D7uhrQnmQG6xf11gbvfi3iQ1A4p/6GZN4OQA8frEvwo=; b=UdhAP6zFH2AmZ0tMPrkY67o2Z6kO2kereqWQ76bYKVHXGBpA0xcETB+16en7TRZ2UG semKFlHYG2+S7XNcjHuBG8zUzqi5Ha4QD4pSeO7BfZbSJzqZmCJJ4JO8ryPGe7fA9bTb bou/K+F9+4+cUhhd+sxENddNyuXCrkJwLDLZXOJmd5PhGiBsNYwM/kDthMipnCE6LX+I 3OObTkjKX+3uKqoO8FFUMED5QD3QUumrd6co5jV/MInd50XgTwajyn8D+cycv3FpSD/A 0GaneBQN3f0GuqczBwF1nwYnOLbodYyEHygN1yeSnQi9demIqUVLP6gq/ATIOsn2ivCZ iCyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=FsXlUi6x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id kq12-20020a170903284c00b001c3aed2db5dsi8950298plb.409.2023.10.09.03.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 03:10:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=FsXlUi6x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5E2CF807E8AD; Mon, 9 Oct 2023 03:10:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346076AbjJIKKi (ORCPT + 99 others); Mon, 9 Oct 2023 06:10:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346067AbjJIKKf (ORCPT ); Mon, 9 Oct 2023 06:10:35 -0400 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31DCCAB for ; Mon, 9 Oct 2023 03:10:31 -0700 (PDT) Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-7741c5bac51so248429385a.1 for ; Mon, 09 Oct 2023 03:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696846230; x=1697451030; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pKAlUAosFjrafJFjKgxhfBSe7ZC79o6SyWOfRs4IFUY=; b=FsXlUi6xXf4Nqmp4w6GIxsb14u+p1d1Bc50hwMPaLypETRr6O5r4Pwvgg2tMhFBf6H Eb+M9rD7Wuz6VNua0vT009coOFxAiC3gby4mTKdjiTStP006RwuEjrauAPoUQRzoQ6au YSaoE+JBT0sSC66WWReMe7dZ+OW7sP50omR8TbeP5QjOKXVG6gM0rmJEYP09rjqyWeNk ANWcmNp5DymrnPLoIiotNifFFtgHUFhFrrAk7LVGbLoccFeTn+Y9Wlx6mxz4yPGEMsEK aaAh9QsEuwiV4gWQaz+XMwcQ4dn2rtPL+/l83HQ0u1H18dk1EG+Oi8C+vsVfUbQjgupE ZxRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696846230; x=1697451030; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pKAlUAosFjrafJFjKgxhfBSe7ZC79o6SyWOfRs4IFUY=; b=Y27Aj1+EnI3CY0rqr5bCjMf6v+4lVuiZo6kyIj2T3CFHRjwS4TUTbmj1CWOkf0cICA JzFEgywLMwBribq0rf1D4KqAvVE0Lcpsy6SOQopNfLZMRXGOuqN9pcPzZACoF29LUynk xwjM6tIKR941P0NbHJiV2To+c8Wx3hnRKWxLrKJJL6aj712IxoJdSNInvKTei2jHrCMW ahNnpdofU2BDeldeAc2bpF0drnMyq9k7HGrYICl4ZENhMuCcnlkHEUxwAnpCTCMuSxI/ rX8OZnKmDBYKGGXx1ZpmmUQ+d3Dzwre73J2utYOYwQMzrazQHEONt4Zh+ikLbp+SWk9z Fx0Q== X-Gm-Message-State: AOJu0Yxm2tQHZ6BI2CTjc2dcPLfBoMxBU/6S0/3/x7D4H6ccrSWaJ5Vi G24+b//1YR7sNhwDIQvYk8FN9KvGY/9y++nzwDhTJg== X-Received: by 2002:a05:6214:301b:b0:65b:1594:264e with SMTP id ke27-20020a056214301b00b0065b1594264emr15604865qvb.51.1696846230114; Mon, 09 Oct 2023 03:10:30 -0700 (PDT) MIME-Version: 1.0 References: <2a161c99c47a45f8e9f7a21a732c60f0cd674a66.1694625260.git.andreyknvl@google.com> In-Reply-To: <2a161c99c47a45f8e9f7a21a732c60f0cd674a66.1694625260.git.andreyknvl@google.com> From: Alexander Potapenko Date: Mon, 9 Oct 2023 12:09:54 +0200 Message-ID: Subject: Re: [PATCH v2 14/19] lib/stackdepot, kasan: add flags to __stack_depot_save and rename To: andrey.konovalov@linux.dev Cc: Marco Elver , Andrey Konovalov , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Oscar Salvador , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 09 Oct 2023 03:10:46 -0700 (PDT) On Wed, Sep 13, 2023 at 7:17=E2=80=AFPM wrote: > > From: Andrey Konovalov > > Change the bool can_alloc argument of __stack_depot_save to a > u32 argument that accepts a set of flags. > > The following patch will add another flag to stack_depot_save_flags > besides the existing STACK_DEPOT_FLAG_CAN_ALLOC. > > Also rename the function to stack_depot_save_flags, as __stack_depot_save > is a cryptic name, > > Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko (assuming you'll address Marco's comment) ... > void kasan_record_aux_stack_noalloc(void *addr) > { > - return __kasan_record_aux_stack(addr, false); > + return __kasan_record_aux_stack(addr, 0); Maybe make the intent to not allocate more explicit by declaring some STACK_DEPOT_FLAG_CAN_NOT_ALLOC =3D 0? (Leaving this up to you)