From owner-freebsd-current@freebsd.org Sun Mar 14 15:54:47 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A6EA5AA7E7 for ; Sun, 14 Mar 2021 15:54:47 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dz3yt1sdVz3vMg for ; Sun, 14 Mar 2021 15:54:45 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f171.google.com with SMTP id d20so32088102oiw.10 for ; Sun, 14 Mar 2021 08:54:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=UIAArkemRtXv16Yk21zbotr2Coy8gZksO1Rp7ODp2Lk=; b=WwZFtV3Xj0qB2IFtLvdfj2nHpaAE+K9+WWKwkhV177+asMlJe3Cycj+/a0S0T0i8rT 6NTOFKm9oU5TXxi56CW08AAQ/ibY7EXvFx0ds61Y/g5kPvxYc/UUYx+sP1CHvVULd6Bj DLKyoofTAriXZucF9pbAfF3XfyLW68y5CA0QEGBvrL7uMH58nRX4jQUtPngH3cadjf11 PL3v8Rt6HGmqN8vb5/utpmXwmu1Zam+8w7wAZdNw5NbIXGjMEkz+0ZmnFa5maNz/CgLB GpUHkvufYbL1HMhaJ+SqzjhcMWQavdQmI+UF4tBcDyBgHnVHk0QUHey2+Mth9ZzFY4Tx EPUg== X-Gm-Message-State: AOAM532CStGRO3TTeyN97wvEJlFpqbbmpiC6wycU4r/4qa0Z97tB9/ir Y6gd0cBpEzDingwlguBJtzvkzVIO9F9yxhNtl6sSm5ZLYF20bw== X-Google-Smtp-Source: ABdhPJzSiWva670wtoed76bEBmqooQABylyIF5KOzcZIyTmqrD1uDv+asitVkHWDnYTvaTJ4gFRm6VekB9IVy+d/JtE= X-Received: by 2002:a05:6808:14c8:: with SMTP id f8mr16651393oiw.55.1615737284929; Sun, 14 Mar 2021 08:54:44 -0700 (PDT) MIME-Version: 1.0 References: <20210311003136.GM56617@kduck.mit.edu> <20210311031501.GP56617@kduck.mit.edu> In-Reply-To: From: Alan Somers Date: Sun, 14 Mar 2021 09:54:33 -0600 Message-ID: Subject: Re: Getting started with ktls To: FreeBSD CURRENT X-Rspamd-Queue-Id: 4Dz3yt1sdVz3vMg X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.171 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.998]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.167.171:from]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DOM_EQ_FROM_DOM(0.00)[]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[asomers]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[209.85.167.171:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.171:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.171:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-current] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2021 15:54:47 -0000 On Sun, Mar 14, 2021 at 8:57 AM tech-lists wrote: > On Thu, Mar 11, 2021 at 03:42:55PM +0000, Rick Macklem wrote: > >I'm going to cheat and top post (the discussion looks > >pretty convoluted). > > > >- The kernel must be built with "options KERN_TLS" > >- OpenSSL must be built with KTLS enabled > >- These two sysctls need to be set to 1 > > kern.ipc.tls.enable > > kern.ipc.mb_use_ext_pgs > > Hello, > > I'd like to try ktls but have found the following: > > On AMD64 (stable/13) this option is present in the GENERIC kernel > of world built about a month ago: stable/13-n244496-618dee60231 > and openssl version is 1.1.1i-freebsd > > On ARM64 (stable/13) it's *not* present in a world built earlier > today from stable/13-n244876-0b45290603b. Here, the openssl version > is 1.1.1j-freebsd > > On another ARM64 (main/14) it *is* present in main-n245445-07564e17620 > built with sources from the 11th March. openssl is 1.1.1j-freebsd here > as well. > > I'd like to have it (ktls) available on the ARM64 > stable/13-n244876-0b45290603b. Is it just a matter of adding the option, > and then the sysctls become available? Is it "better" with openssl[-devel] > in ports or openssl in base? > > thanks, > -- > J.\ It's present in current kernels for both 13 and 14, amd64 and aarch64. However, it's not present in 13's openssl. To use it, you must either rebuild world with WITH_OPENSSL_KTLS=YES in /etc/src.conf, install security/openssl-devel from pkg, or built security/openssl from ports with the KTLS option enabled. I don't know if any version of openssl is "better" than another. The sysctls should be available in any case. -Alan