Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4385511rdb; Thu, 14 Sep 2023 23:47:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG7SJUwiHwsVMe1+HDEKhbnP0D1uynX8EuEZfJQ33ARbmhnpsYFtHszXApFnKmuiPA8Nsc9 X-Received: by 2002:a05:6a00:39a5:b0:68b:fdfe:76c2 with SMTP id fi37-20020a056a0039a500b0068bfdfe76c2mr820401pfb.20.1694760463050; Thu, 14 Sep 2023 23:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694760463; cv=none; d=google.com; s=arc-20160816; b=l6NFwR5WluoZXtK+m6fuRNpibnsWjmI8tTOhKk9CuZ60AflIruksVR3P6jO7RHKUcT VOCRf73DROIz/raCZAlsVOC+6z7orSpwLesg4AlSZ/aB2nqpElNUsW+Af3iXtu/iXgBm o90fGTKY3TyWQw9ysWjJ4GsDZhP+R+AXjbkar9apyed2vfdqxn8YzMnRss3UcEQ28FKq Hpcc5G+1Ly9vglsRZ/LDLNbc2NJnocrPdlq+alylOjraFs8kbACZwTWPDgrL4NWbVOBu 38QN3jsqAxFL6sCGI6Y/kafRJj1hPCfJ0+Ks85FMhurkw5Ar+8LKXavcipHscerMVzOY 4XYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lYluOBaH1EHWk8SrAv7BsePqVdzKSF7hvQZ8jrr6zOA=; fh=4QV6Z+oABtayt45fuMQHrr+29fYg9Y9YgA2gIkEaK9I=; b=pUxT1QhCSDGof7oi+TTisfnrqeygcAIlbAiKzuoCvZBoI3XvVyammnnn+ZHRe39yAr kNGC8a1UqvcQZ7shtoZL+VBd2KjGaKkvHJmY0LTZnrwDxBFkjpD6kG8lt0Sb9wkAf7PT 8fRwu2ivtQDO8i1W0AchAaCVoyYBz7RNMGfOSwZW8IMUF4D7eiLQ/1lrKXm5BJ1pGZkc jaYOS7M2uyFy/O/3hR+9t+zE/ZCycKulmNrv9oF119Q1bAEQ34rbKcsxGkBjwscHYSt9 bpcuiwXwPEHqMwMMAQxvRX97JoWW/b1yznE6r9p/4TqhDPBxyIMya4lfIrp+OyzdWt74 KUjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=hLv8Q2h+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id cw14-20020a056a00450e00b0068a683896b0si2731022pfb.152.2023.09.14.23.47.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 23:47:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=hLv8Q2h+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5E75883700C5; Thu, 14 Sep 2023 12:40:07 -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 S231243AbjINTkG (ORCPT + 99 others); Thu, 14 Sep 2023 15:40:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjINTkF (ORCPT ); Thu, 14 Sep 2023 15:40:05 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39C5726AB; Thu, 14 Sep 2023 12:40:01 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E52C22185C; Thu, 14 Sep 2023 19:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1694720399; h=from:from:reply-to: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=lYluOBaH1EHWk8SrAv7BsePqVdzKSF7hvQZ8jrr6zOA=; b=hLv8Q2h+K2BGrnxA69yqxfRxRgvWqDBU5/7xCauJ1LNGdVDe0LlDNnAbTNBRZ7vFbt9uwa oaCUGqEHWfh9PcGEm7O76Zd9a0CpWesj/vj2u4+HRY3WIBI+Z/t0zmN9BykdWaQgW0JT/C 6vEr4GDHDT5MeJAgSxh5K0GcN+YuyHA= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BA4E413580; Thu, 14 Sep 2023 19:39:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ifydK49hA2VeBQAAMHmgww (envelope-from ); Thu, 14 Sep 2023 19:39:59 +0000 Date: Thu, 14 Sep 2023 21:39:58 +0200 From: Michal Hocko To: Jean Delvare Cc: Luis Chamberlain , linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] module: print module name on refcount error Message-ID: References: <20230626123252.73dbc139@endymion.delvare> <20230828141830.02de4d90@endymion.delvare> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230828141830.02de4d90@endymion.delvare> 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]); Thu, 14 Sep 2023 12:40:07 -0700 (PDT) X-Spam-Status: No, score=-0.9 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 On Mon 28-08-23 14:18:30, Jean Delvare wrote: [...] > > > It would likely be better to use refcount_t instead of atomic_t. > > > > Patches welcomed. > > Michal, do I understand correctly that this would prevent the case our > customer had (too many gets), but won't make a difference for actual > too-many-puts situations? yes, refcount_t cannot protect from too-many-puts because there is not real way to protect from those AFAICS. At a certain moment you just drop to 0 and lose your object and all following that is a UAF. But I do not think this is actually the interesting case at all. -- Michal Hocko SUSE Labs