From: "Valentin Vidić" <vvidic@valentin-vidic.from.hr>
To: kernelnewbies@kernelnewbies.org
Subject: Re: Kernel TLS
Date: Fri, 29 Nov 2019 20:48:01 +0100 [thread overview]
Message-ID: <20191129194801.GI20116@valentin-vidic.from.hr> (raw)
In-Reply-To: <CAH8yC8nZ=Ka5SLKnMWr7ukC4zFA8_Zi226UoKHUA4jZMY0LoNQ@mail.gmail.com>
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
next prev parent reply other threads:[~2019-11-29 19:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-29 19:36 Kernel TLS Jeffrey Walton
2019-11-29 19:46 ` Alexander Mihalicyn
2019-11-29 19:48 ` Valentin Vidić [this message]
2019-11-29 19:57 ` Jeffrey Walton
2019-11-29 20:04 ` Jeffrey Walton
2019-11-30 4:37 ` Jeffrey Walton
2019-11-30 6:16 ` Alexander Mihalicyn
2019-11-30 6:40 ` Valdis Klētnieks
2019-11-30 8:13 ` Bjørn Mork
2019-11-30 9:11 ` Valdis Klētnieks
2019-11-30 10:10 ` Bjørn Mork
2019-11-30 10:34 ` Valdis Klētnieks
2019-11-30 12:54 ` [PATCH] net/tls: Fix return values for setsockopt Valentin Vidic
2019-11-30 13:15 ` Jeffrey Walton
2019-11-30 13:31 ` Valentin Vidić
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191129194801.GI20116@valentin-vidic.from.hr \
--to=vvidic@valentin-vidic.from.hr \
--cc=kernelnewbies@kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.