From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_ADSP_ALL,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6F84C432C0 for ; Fri, 29 Nov 2019 19:48:21 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 379C6216F4 for ; Fri, 29 Nov 2019 19:48:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=valentin-vidic.from.hr header.i=@valentin-vidic.from.hr header.b="JdVJMZVm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 379C6216F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=valentin-vidic.from.hr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1iamFN-0003pX-6e; Fri, 29 Nov 2019 14:48:09 -0500 Received: from valentin-vidic.from.hr ([2001:470:1f0b:3b7::1]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1iamFK-0003pP-Je for kernelnewbies@kernelnewbies.org; Fri, 29 Nov 2019 14:48:06 -0500 X-Virus-Scanned: Debian amavisd-new at valentin-vidic.from.hr Received: by valentin-vidic.from.hr (Postfix, from userid 1000) id A87DF2FE; Fri, 29 Nov 2019 20:48:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=valentin-vidic.from.hr; s=2017; t=1575056881; bh=8nOCduDsGfrrdCAtRXI6/vGbuAi0qkbDKUbsYV7F1u8=; h=Date:From:To:Subject:References:In-Reply-To:From; b=JdVJMZVmOEDpfDrx46jf41WMzpa77Gj32sl92ThVop8pyAmMg1lyQ/jZkXrclcceC wTuHw4vjMkeoN77A3UjaHqqYRc3GIhl2bO1IZv7/BjE8JtpwOHJxmfhE3eTeOf5uyo Zwwvpnp6eW4kUcACWkkEi7J3xEyL2PxfakH34XLZKMOfVN3wEOX0MuqckJfTvGJnTg aJ3G3xDs9m7DpXt59oHBHJKdh8GyiYb+gd9BjKGJBYNcAtht9rd6TfaomTusLVCIca dfHo+TRqrtg1sUF0vUmkK/aGRmsLizun76MRRhJgpd8PP4tCxJHkZz2eo5omsexsTH 9z3oSEFf8aVQg== Date: Fri, 29 Nov 2019 20:48:01 +0100 From: Valentin =?utf-8?B?VmlkacSH?= To: kernelnewbies@kernelnewbies.org Subject: Re: Kernel TLS Message-ID: <20191129194801.GI20116@valentin-vidic.from.hr> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Fri, Nov 29, 2019 at 02:36:10PM -0500, Jeffrey Walton wrote: > I'm trying to run through the example at > https://www.kernel.org/doc/html/latest/networking/tls.html#kernel-tls > . > > I'm working on Fedora 31 x86_64 (fully patched). Running my program results in: > > $ ./ktls > setsockopt failed, 2, No such file or directory > > I observed: > > $ cat /proc/sys/net/ipv4/tcp_available_ulp > $ > > Is there a way to enable ULP at boot? Or is this a kernel config > option? Or maybe I am doing something else wrong? strace gives me: ... socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 3 setsockopt(3, SOL_TCP, TCP_ULP, [7564404], 4) = -1 ENOENT (No such file or directory) fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x2), ...}) = 0 brk(NULL) = 0x55d76b14e000 brk(0x55d76b16f000) = 0x55d76b16f000 write(1, "setsockopt failed, 2, No such fi"..., 48setsockopt failed, 2, No such file or directory ) = 48 exit_group(1) = ? +++ exited with 1 +++ $ grep TLS /boot/config-4.19.0-6-amd64 CONFIG_HAVE_COPY_THREAD_TLS=y # CONFIG_TLS is not set # CONFIG_VIDEO_IVTV_DEPRECATED_IOCTLS is not set So you probably need to rebuild the kernel with CONFIG_TLS to get this working. -- Valentin _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies