Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1086442rdb; Wed, 6 Dec 2023 08:13:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFuhQ2OCiSD+pVKdEqIwZNvsXHOrbDSGlgJl/Y+vjmko7NOVzwgW1hPMQF+YWoxolohOYRo X-Received: by 2002:a17:902:ea11:b0:1d0:9a64:e514 with SMTP id s17-20020a170902ea1100b001d09a64e514mr869221plg.23.1701879214425; Wed, 06 Dec 2023 08:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701879214; cv=none; d=google.com; s=arc-20160816; b=SBfqWxagREZwVi0bYyF6Oa64lqG7DGQnhOv3tFIr3AeWaxncT4d//5F7BtViD1ezN0 8qdCzRWJjqbvyNpd08FzcNlyUOBKZ1flSYpGKXg+lgTdnxfirJyCjmJUQ22Mu2Cp6S+J PMkwGcYDn/++SoOMPWhUd56ho115Z7MvI9oX5GhrS62tWqSd3VdGA7NVmu1M29SyFbdH XF7Gf6naiHsduztRCklf1bip+biuJQ1hk1Aj495eTiV1O+xgqdlA52fTaLIZI9a1juSk Y5CwHMqHY0U97X4wJZuNqoq1tCjElAGbvxot+dhVlP3AsUeVzVwPgDW+of7H+0zuJTAC ozIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=b00doOcUAWq1RTxBpUUl3AhHUCRtaaT2eXgI04xU0rI=; fh=+2zEMJbyu5WlLwKnirRzLL6Yo2WLeYuznaLQC7ZTFk4=; b=LoABoSKoS3gv35pseBaraHyNAYloizD0wBjnr3+2o6XRW/WYC0VYBpGqsOdT971Pdk eJ+WibNJUs+xQ+99Ec6iSRS4Hy50oV5wW34ae877Q/ddLqU9QXWhzmKem8pWgCYwI809 lnggqREf0EkHeNXMXdDcN7eJMxX9GI0zAisbP7V70QsAl8Mad+FcGW1vKyfvpqVgv/5J Da8CryspVJCN9tqXAlddcDL+hTFWU3s/VQhA/9I9EL5/wrBo+HAWVjv14aOhKGI7V832 OZgBAKFwwkLfYcd9xCWl6wfNVjh3/Khmy0qD86VUSJezeUGCxSUw8oyMi7RhIxp+L9UQ X8XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MuUazF83; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ik14-20020a170902ab0e00b001d0969c5b76si33534plb.74.2023.12.06.08.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 08:13:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MuUazF83; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BF4398029D35; Wed, 6 Dec 2023 08:13:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229522AbjLFQNM (ORCPT + 99 others); Wed, 6 Dec 2023 11:13:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjLFQNL (ORCPT ); Wed, 6 Dec 2023 11:13:11 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A332E122 for ; Wed, 6 Dec 2023 08:13:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701879196; 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=b00doOcUAWq1RTxBpUUl3AhHUCRtaaT2eXgI04xU0rI=; b=MuUazF834pLLeZBTRSB7JzZhqFvmt1A49hU/8g8OCt2qAQd0HQp5lZRGcNW2+mdM32s8zT RzHXEqw7V1BnR3sywhACyETlpDUrTGEbgvZPZRImBO/fImA7MD3i+zrjeW3jvU7rLvR4Wn hkVSoHmt5QxEs+WsUm7VOpsww8ApapA= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-517-yIe0WVutN_udtif27DAn6w-1; Wed, 06 Dec 2023 11:13:07 -0500 X-MC-Unique: yIe0WVutN_udtif27DAn6w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 142363806105; Wed, 6 Dec 2023 16:04:04 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4435340C6EB9; Wed, 6 Dec 2023 16:04:03 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20231206145744.17277-1-lhenriques@suse.de> References: <20231206145744.17277-1-lhenriques@suse.de> To: Luis Henriques Cc: dhowells@redhat.com, Jarkko Sakkinen , Eric Biggers , keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] keys: flush work when accessing /proc/key-users MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <498293.1701878642.1@warthog.procyon.org.uk> Date: Wed, 06 Dec 2023 16:04:02 +0000 Message-ID: <498294.1701878642@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Wed, 06 Dec 2023 08:13:28 -0800 (PST) Luis Henriques wrote: > This patch is mostly for getting some feedback on how to fix an fstest > failing for ext4/fscrypt (generic/581). Basically, the test relies on the > data read from /proc/key-users to be up-to-date regarding the number of > keys a given user currently has. However, this file can't be trusted > because it races against the keys GC. Unfortunately, I don't think your patch helps. If the GC hasn't started yet, it won't achieve anything and the GC can still be triggered at any time after the flush and thus race. What is it you're actually trying to determine? And is it only for doing the test? David