Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4536460ybb; Tue, 14 Apr 2020 09:10:13 -0700 (PDT) X-Google-Smtp-Source: APiQypLjDqyEJpNblIPb5UkMxfetEB/FctMCPg8AJYXY6dE7iaSmnOSXCFW+zt5rdavaMr01J6VU X-Received: by 2002:a05:6402:32e:: with SMTP id q14mr21391225edw.84.1586880613507; Tue, 14 Apr 2020 09:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586880613; cv=none; d=google.com; s=arc-20160816; b=pSmz7sYS/mofTnUtHG/a8SHyg3wuw8iMCYft37InshcbrJdjYu7bNNWjKM+WzJGG03 7rtYuN+SRmMD0DWnpNeatA4YmrQMMxQA379iBtnkMwdE08UNl25F3LWdBCwppSy7h19Q fEJOmkz6N/rhsCduFqI9hXxGjvfnhM3RzTG0ugvOhyWBkiEsezY6/Oc7paploBwoHehb 1F0w15lrUzsTYQiQVqzjRagncrkOmsirCmmoIwbSV3Dd5HcJyzB5CMxNwO2H0ig99Ne/ HKaZWVTb5T7yy/vsrW9Ko+W6c3YxB3o0wSoMaWjNKCUjvB6l78dIyzZ7wRcE8dC3tT7O R33A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:from:organization:dkim-signature; bh=NYWOZo6GSM1gl5Dpdc7Qc14rRCkPfmWgzyLfnqiKprc=; b=mBYPb/iQ1nAfW+F0JzVXhybfN9ZnAPBNp7WgydXArtRfUPqwlmeMUqXKqvPLnbu6uj Cm83WEcQv4HXljIKbDbSMnYIuUn//D43uhyGL4r/1Qkn7W6MAMJ2HYBg25oWHw0T/uEd RyGJ7hFo23uyiQx2IQX819vBbpUO3J/eQmsp9B0LtuQ9CiTpcm/v8MbwtSfR9Fyg4eq9 uT6in2z2heP6vQZXOF/qTbOVcrC1jXRn/towKxjxu5r7JJb1y89qW03GzI/0z+BHOjlC Ej7zi5mKKwlBOwI9NibUj7zgY8IH5Z4JTbas/+wMrVNM/dTc5ClTOy4wMoN6g7VPA5e5 ocqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="BnfJ/Dtf"; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v25si5735783edx.49.2020.04.14.09.09.40; Tue, 14 Apr 2020 09:10:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="BnfJ/Dtf"; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389718AbgDNOU0 (ORCPT + 99 others); Tue, 14 Apr 2020 10:20:26 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:21553 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389707AbgDNOUW (ORCPT ); Tue, 14 Apr 2020 10:20:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586874020; 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; bh=NYWOZo6GSM1gl5Dpdc7Qc14rRCkPfmWgzyLfnqiKprc=; b=BnfJ/DtfIeeqI8s7n4VHOK8Agoyvguo9NoQfwQcB8bdhA3ZScLTCJRmDQ9rLVJWCb2yA/Y tCVwiEc641VQx024ULI5NKaElEoSU5LqtCqabb/nYTwRFncYIMcNjdCqZvyze9ygg7W8T8 PhHKuN+f4+EiMltlgGgsQcm2K5K3EL8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-463-95ZOvXX8MsyxzBYsrtgbiQ-1; Tue, 14 Apr 2020 10:20:14 -0400 X-MC-Unique: 95ZOvXX8MsyxzBYsrtgbiQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6FA47801A12; Tue, 14 Apr 2020 14:20:13 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-113-129.rdu2.redhat.com [10.10.113.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id B89C260BE1; Tue, 14 Apr 2020 14:20:11 +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 To: linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-afs@lists.infradead.org, ceph-devel@vger.kernel.org cc: dhowells@redhat.com, keyrings@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, fweimer@redhat.com Subject: What's a good default TTL for DNS keys in the kernel MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3865907.1586874010.1@warthog.procyon.org.uk> Date: Tue, 14 Apr 2020 15:20:10 +0100 Message-ID: <3865908.1586874010@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Since key.dns_resolver isn't given a TTL for the address information obtained for getaddrinfo(), no expiry is set on dns_resolver keys in the kernel for NFS, CIFS or Ceph. AFS gets one if it looks up a cell SRV or AFSDB record because that is looked up in the DNS directly, but it doesn't look up A or AAAA records, so doesn't get an expiry for the addresses themselves. I've previously asked the libc folks if there's a way to get this information exposed in struct addrinfo, but I don't think that ended up going anywhere - and, in any case, would take a few years to work through the system. For the moment, I think I should put a default on any dns_resolver keys and have it applied either by the kernel (configurable with a /proc/sys/ setting) or by the key.dnf_resolver program (configurable with an /etc file). Any suggestion as to the preferred default TTL? 10 minutes? David