From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.devel Subject: Re: bug#56867: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7. Date: Thu, 4 Aug 2022 18:31:30 +0100 Message-ID: <20220804183130.09c9e1fbe51e1244aecfc5fa@gmail.com> References: <20220801090749.11655-1-ludo@gnu.org> <87pmhgks4j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4453"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu Aug 04 19:32:27 2022 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oJehv-0000yx-7W for guile-devel@m.gmane-mx.org; Thu, 04 Aug 2022 19:32:27 +0200 Original-Received: from localhost ([::1]:56966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJehu-0004JS-32 for guile-devel@m.gmane-mx.org; Thu, 04 Aug 2022 13:32:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJehA-0003ql-Oa for guile-devel@gnu.org; Thu, 04 Aug 2022 13:31:42 -0400 Original-Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:46954) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJeh9-0002bV-5j for guile-devel@gnu.org; Thu, 04 Aug 2022 13:31:40 -0400 Original-Received: by mail-ej1-x62b.google.com with SMTP id y13so474156ejp.13 for ; Thu, 04 Aug 2022 10:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:to:from:date:from:to:cc; bh=TENrIjtS9Mbr+UiJm7GqftqJT4R37tvI6FxpAjegSdQ=; b=K09/0iWyDNU3baiYo+0lJpf24W6eEIyX1gBXGcn6ZYMzh4L5PaJPvcLF2VchHO+LTK tqstT4oTdtrW0ttuRC+mQ9Fv2BNmB9DsrawCFhUNEAVjU4/FHHl+9Xqtdywkr96v7/6Z nYkR7wmjJefN5aklOUGzvPt47T/nsESCKC7OVqu2jM6UkQGUzK2OOMYreTEdzrKJZb91 MlAUpVrK3r8Qs5L3cdO18GuXxNDeOj2liNRI7sXxoEzQJBceiFgPwzNSdfYjiqOAd8uY rLWtT47P93OlKzS3FXbSb2KBWWTkPMyyJH9bN7T3g9QsrZMfzmbGzoVnuxm72lsseWiv 9fRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:to:from:date:x-gm-message-state:from:to:cc; bh=TENrIjtS9Mbr+UiJm7GqftqJT4R37tvI6FxpAjegSdQ=; b=XyCC9YSZwcMGdwLJ2XPTfm66ny/Y9Q7MA8EGyCCvj/EDddmdjiLA0GCKaSkCb3ckhd aVgPbqjE2pd1NAqaN9h1RX/GJ933sVla0XSEpR07QCKK+ACULVgSUHjWQkKjcDji+J+Y 3ReVnW+AC8XhLyGYO2qQbQ3p+m9+d0fgvVIFpaw7G6fcIerQaezOHk/ZWwlDUHUDNdxK 5wJYjU70EAzEQCxuXE2EoUxquTS+aRWwCHEIl+GFhHzigAisZgZJF2j5lbUvg/nkS3F7 BPGp9Z6WjdOM+tMtf0WenDoqpQBoDWqjfZ3p8T4vyqKeHfgTXhwhhJbCg8TmnzlWF4cQ fnQQ== X-Gm-Message-State: ACgBeo0QszgqOAypipOntmBp36i1LHEHc0+qN89A4/hDi3pn6+N5RPzu ZuCfiROXqtJNoUpaG6VqVTDEW4IlncA= X-Google-Smtp-Source: AA6agR5OS596RR3Y8uJ03TCrodD1orBHbCKYSeCy/Ci2fkY1PsaDtG6oqZEIwL/ED1UGlJkMzgXCOg== X-Received: by 2002:a17:907:e94:b0:730:af21:cf60 with SMTP id ho20-20020a1709070e9400b00730af21cf60mr2114555ejc.681.1659634296822; Thu, 04 Aug 2022 10:31:36 -0700 (PDT) Original-Received: from dell.homenet ([185.254.148.4]) by smtp.gmail.com with ESMTPSA id ck12-20020a0564021c0c00b0043e398c0534sm931257edb.94.2022.08.04.10.31.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 10:31:36 -0700 (PDT) Original-Received: from dell.homenet (localhost [127.0.0.1]) by dell.homenet (Postfix) with SMTP id 851764231AF for ; Thu, 4 Aug 2022 18:31:30 +0100 (BST) In-Reply-To: <87pmhgks4j.fsf@gnu.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-unknown-linux-gnu) Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=vine24683579@gmail.com; helo=mail-ej1-x62b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:21295 Archived-At: On Thu, 04 Aug 2022 16:20:12 +0200 Ludovic Courtès wrote: > Ludovic Courtès skribis: > > > The custom input/output port wrapping the TLS session record port would > > introduce overhead, and it would also prevent its uses in a non-blocking > > context--e.g., with Fibers. The port close mechanism added in GnuTLS > > 3.7.7 allows us to get rid of that wrapper. > > > > * guix/build/download.scm (wrap-record-port-for-gnutls<3.7.7): New > > procedure, with code formerly in 'tls-wrap'. > > (tls-wrap): Check for 'set-session-record-port-close!' and use it when > > available; otherwise call 'wrap-record-port-for-gnutls<3.7.7'. > > I synchronized Guile's copy of this code: > > 317b06bf8 web: 'tls-wrap' retries handshake upon non-fatal errors. > c01ca10b3 web: Do not wrap TLS port on GnuTLS >= 3.7.7. > > I realized that’s not enough to make it possible to use non-blocking > ports though. [snip revised patch] > Thoughts? I have not been following these patches and this may be completely irrelevant, but if the context of these patches is the use of gnutls-guile, then when I last looked (which was some time ago) gnutls-guile ports were not suspendable. So a non-blocking gnutls-guile port will still block when used with guile's suspendable ports. If I have missed the point please ignore this.