Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp952657rdg; Fri, 13 Oct 2023 06:16:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8grOfle0gVmAgfQwpVXoYHzqlMwpB0USdtrAhqIFk+BXUDfxWu05rBvdrn9rqedDd7MGr X-Received: by 2002:a17:90b:4d90:b0:27c:fa8f:4e91 with SMTP id oj16-20020a17090b4d9000b0027cfa8f4e91mr104466pjb.23.1697202971508; Fri, 13 Oct 2023 06:16:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697202971; cv=none; d=google.com; s=arc-20160816; b=pgWHiILyfAeq1whMDEtlxs1RaR4E+z1zKE6ScN7L8v7SIgeAEwVj3z/0CBZhUqGX83 wjCqy1/Ln7/Z37qpMTwWyvntDWOPx/6PjdMHmoUhg+Ns0wBaxqxQutr8m2Vp0h1VvfMb 86niTMJsh7cV/8sX3if0Nsew0AF+rCHCmxHfm6BgF2LKEFGJeV5c41viflNLCPLpXVKQ cJUBUHo2TVHPG/qM2jAnH6tyDjBtY8ciSScCpNYqdXPLsncY3rfIJ0q4VkMDj6UolvQc 9ocrp/E2glUN3/iTTzPifhrP+4i7E/IYgb/qQCn7q0tlEUDW/lhLXWlZ7dslqXuk2+KJ pzmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=SkFG+3LyiNgprdYnBxxoNAJ5LTWjyrCvcaBrBUygRPY=; fh=g4XQDHlJKpseKHdii0CsU9tomRetKT49JhVfI69/HC4=; b=UuXJb7PHLGVeAVGV3AkhyB5uHViK92YdWCJr178vdWa/+4lriNEyTTrzJwJNLS7lM1 Il/31Fpq0hR/SZGg6A4Clk5bpqvqiITCBpMfZiRzSinjR3mtWygXZ3voLJ51Bxv0eJoq VR/vl8zCdRVfIBGtLBdBHue0wfBjnX9BK+m/9FT75+WlnA3sfqj2vK2QIEEvbIug5+27 bW2ygqLQx1+akwlFwDZaa0Pgba31WbkhdDeaiaold0wpQms9qvwBtwd43Y2JCkJwwUNn B/FmzFqYdbiEjW00Q/7dDhuSvy7E2DXA5ZMF6GJQah7I09UiAXlOEWVyFC7SKdV4d0GI Er7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=k8QvJEVP; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id a14-20020a17090a8c0e00b002613720fcd5si71634pjo.35.2023.10.13.06.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 06:16:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=k8QvJEVP; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 3FFFF809C909; Fri, 13 Oct 2023 06:16:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231901AbjJMNPm (ORCPT + 99 others); Fri, 13 Oct 2023 09:15:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230006AbjJMNPh (ORCPT ); Fri, 13 Oct 2023 09:15:37 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00AB5CA for ; Fri, 13 Oct 2023 06:15:35 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697202933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SkFG+3LyiNgprdYnBxxoNAJ5LTWjyrCvcaBrBUygRPY=; b=k8QvJEVPLl3+Wnza5ucCf/q5ANPBsfsS5q2DsJazrbN/aQ8GVelHKbK4ljsXFsEaww8Js+ Gx7b2Hn1SweS9x4S8glDkXjTavztLwL96TRRLXUuJ9rsSfDwkSOM2RdBa6698Y829n8qnK AiXQhF6e2HmfsUhzqkdpNhUImJQLZ2i4ouS2jqhEbzPN4qfA2gaqwd0/KziCTuD/++NdG4 JgGEuZjk60LgGg59Wcy4m680dMYCJRJX4RM26uaBpcAqnR+GC2r9E71oFe0Cjiz3uM9oEI JJCa29KRCm1VIfzjEgfggasJ+Pc6Y3IvA21xFg+gMlIzq2agfq7gaIZ45n3U/Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697202933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SkFG+3LyiNgprdYnBxxoNAJ5LTWjyrCvcaBrBUygRPY=; b=nQ8Tz2nlT9mL2M40ty37s55aeQyrJjiWyBvPdOrgzP9V4Ph06yuoCq3iOEqG6Fd1nmHWN9 bBa7RwJVhYSJapAQ== To: Andrzej Hajda , linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-mm@kvack.org Cc: Andrzej Hajda , Andi Shyti , Nirmoy Das , Janusz Krzysztofik Subject: Re: [PATCH v2] debugobjects: stop accessing objects after releasing spinlock In-Reply-To: <20230925131359.2948827-1-andrzej.hajda@intel.com> References: <20230925131359.2948827-1-andrzej.hajda@intel.com> Date: Fri, 13 Oct 2023 15:15:33 +0200 Message-ID: <87v8bak6iy.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Fri, 13 Oct 2023 06:16:09 -0700 (PDT) On Mon, Sep 25 2023 at 15:13, Andrzej Hajda wrote: > After spinlock release object can be modified/freed by concurrent thread. > Using it in such case is error prone, even for printing object state. It cannot be freed. If that happens then the calling code will have an UAF problem on the tracked item too. If there is a concurrent modification then again, the calling code is lacking serialization on the tracked object. debugobject fundamentally relies on the call site being consistent simply because it _cannot_ invoke the fixup callbacks with the hash bucket lock held. What's the actualy problem you are trying to solve here. The changelog does not explain anything except of handwaving about modified/freed. Thanks, tglx