Netdev List
 help / color / mirror / Atom feed
From: Nils Juenemann <nils.juenemann@gmail.com>
To: rjethwani@everpuredata.com
Cc: borisp@nvidia.com, davem@davemloft.net, edumazet@google.com,
	john.fastabend@gmail.com, kuba@kernel.org, leon@kernel.org,
	mbloch@nvidia.com, netdev@vger.kernel.org,
	nils.juenemann@gmail.com, pabeni@redhat.com, saeedm@nvidia.com,
	sd@queasysnail.net, tariqt@nvidia.com
Subject: Re: [PATCH net-next v14 0/9] tls: Add TLS 1.3 hardware offload support
Date: Wed,  8 Jul 2026 08:03:19 +0200	[thread overview]
Message-ID: <20260708060319.68063-1-nils.juenemann@gmail.com> (raw)
In-Reply-To: <CAKaoeS3RbLP=D1G6HHaSfQLj4VSi_W=HZ9EnKxKia_EjcT1vSw@mail.gmail.com>

On Tue, Jul 7, 2026 at 5:31 PM Rishikesh Jethwani <rjethwani@everpuredata.com> wrote:
>
> Could you post the disassembly [...] count how many distinct loads of
> sk+0x4f8 the compiler emitted in that region.

objdump of mlx5e_ktls_handle_rx_skb, CQE_TLS_OFFLOAD_RESYNC branch
(+0x63) through RIP+0x10a; bytes match the oops Code around the fault:

  11bd03:	48 83 82 90 01 00 00 	addq   $0x1,0x190(%rdx)
  11bd0a:	01
  11bd0b:	48 8b b6 d0 00 00 00 	mov    0xd0(%rsi),%rsi
  11bd12:	49 89 fc             	mov    %rdi,%r12
  11bd15:	4c 8b b7 00 01 00 00 	mov    0x100(%rdi),%r14
  11bd1c:	0f b7 46 0c          	movzwl 0xc(%rsi),%eax
  11bd20:	4d 8b be 08 01 00 00 	mov    0x108(%r14),%r15
  11bd27:	66 3d 81 00          	cmp    $0x81,%ax
  11bd2b:	0f 84 a4 01 00 00    	je     11bed5 <mlx5e_ktls_handle_rx_skb+0x235>
  11bd31:	66 3d 88 a8          	cmp    $0xa888,%ax
  11bd35:	0f 84 9a 01 00 00    	je     11bed5 <mlx5e_ktls_handle_rx_skb+0x235>
  11bd3b:	0f b7 43 78          	movzwl 0x78(%rbx),%eax
  11bd3f:	49 89 c5             	mov    %rax,%r13
  11bd42:	48 01 c6             	add    %rax,%rsi
  11bd45:	45 8b 8e e0 00 00 00 	mov    0xe0(%r14),%r9d
  11bd4c:	0f b6 06             	movzbl (%rsi),%eax
  11bd4f:	83 e0 f0             	and    $0xfffffff0,%eax
  11bd52:	3c 40                	cmp    $0x40,%al
  11bd54:	0f 84 a8 01 00 00    	je     11bf02 <mlx5e_ktls_handle_rx_skb+0x262>
  11bd5a:	44 0f b7 46 2a       	movzwl 0x2a(%rsi),%r8d
  11bd5f:	41 8d 45 28          	lea    0x28(%r13),%eax
  11bd63:	0f b7 56 28          	movzwl 0x28(%rsi),%edx
  11bd67:	4c 89 ff             	mov    %r15,%rdi
  11bd6a:	89 45 d4             	mov    %eax,-0x2c(%rbp)
  11bd6d:	48 8d 4e 18          	lea    0x18(%rsi),%rcx
  11bd71:	4c 8d 76 28          	lea    0x28(%rsi),%r14
  11bd75:	48 83 c6 08          	add    $0x8,%rsi
  11bd79:	6a 00                	push   $0x0
  11bd7b:	66 41 c1 c0 08       	rol    $0x8,%r8w
  11bd80:	45 0f b7 c0          	movzwl %r8w,%r8d
  11bd84:	e8 00 00 00 00       	call   11bd89 <mlx5e_ktls_handle_rx_skb+0xe9>
  11bd89:	49 89 c7             	mov    %rax,%r15
  11bd8c:	58                   	pop    %rax
  11bd8d:	4d 85 ff             	test   %r15,%r15
  11bd90:	0f 84 4a ff ff ff    	je     11bce0 <mlx5e_ktls_handle_rx_skb+0x40>
  11bd96:	41 0f b6 47 12       	movzbl 0x12(%r15),%eax
  11bd9b:	3c 06                	cmp    $0x6,%al
  11bd9d:	0f 84 cc 00 00 00    	je     11be6f <mlx5e_ktls_handle_rx_skb+0x1cf>
  11bda3:	49 8b 87 f8 04 00 00 	mov    0x4f8(%r15),%rax
  11bdaa:	48 8b 40 30          	mov    0x30(%rax),%rax

One load of sk+0x4f8 in this range, at 11bda3 (the fault). r15 only
becomes sk at 11bd89 (mov %rax,%r15), so there is no sk+0x4f8
dereference before 11bda3 in this range. The only other sk+0x4f8
load in the function is 11be20, after the fault and not reached. So my
earlier "two independent loads, second reading NULL" was wrong.

Thanks,
Nils

  reply	other threads:[~2026-07-08  6:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 21:27 [PATCH net-next v14 0/9] tls: Add TLS 1.3 hardware offload support Rishikesh Jethwani
2026-05-15 21:27 ` [PATCH v14 1/9] net: tls: reject TLS 1.3 offload in chcr_ktls and nfp drivers Rishikesh Jethwani
2026-05-15 21:27 ` [PATCH v14 2/9] net/mlx5e: add TLS 1.3 hardware offload support Rishikesh Jethwani
2026-05-15 21:27 ` [PATCH v14 3/9] tls: " Rishikesh Jethwani
2026-05-15 21:27 ` [PATCH v14 4/9] tls: split tls_set_sw_offload into init and finalize stages Rishikesh Jethwani
2026-05-15 21:27 ` [PATCH v14 5/9] tls: prep helpers and refactors for HW offload KeyUpdate Rishikesh Jethwani
2026-05-15 21:27 ` [PATCH v14 6/9] tls: device: add TX KeyUpdate support Rishikesh Jethwani
2026-05-25 21:16   ` Jakub Kicinski
2026-06-17 22:32     ` Rishikesh Jethwani
2026-06-17 22:56       ` Jakub Kicinski
2026-05-15 21:27 ` [PATCH v14 7/9] tls: device: add RX " Rishikesh Jethwani
2026-05-25 21:16   ` Jakub Kicinski
2026-06-17 22:36     ` Rishikesh Jethwani
2026-05-15 21:27 ` [PATCH v14 8/9] tls: device: add tracepoints for RX KeyUpdate path Rishikesh Jethwani
2026-05-15 21:27 ` [PATCH v14 9/9] selftests: net: add TLS hardware offload test Rishikesh Jethwani
2026-05-25 21:16   ` Jakub Kicinski
2026-05-17 22:21 ` [PATCH net-next v14 0/9] tls: Add TLS 1.3 hardware offload support Sabrina Dubroca
2026-06-27 21:06 ` Nils Juenemann
2026-07-06 22:14   ` Rishikesh Jethwani
2026-07-07 19:34     ` Nils Juenemann
2026-07-05 10:44 ` Nils Juenemann
2026-07-07 22:38   ` Rishikesh Jethwani
2026-07-07 23:23     ` Nils Juenemann
2026-07-08  0:02       ` Nils Juenemann
2026-07-08  0:31         ` Rishikesh Jethwani
2026-07-08  6:03           ` Nils Juenemann [this message]
2026-07-10 17:56             ` Rishikesh Jethwani

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=20260708060319.68063-1-nils.juenemann@gmail.com \
    --to=nils.juenemann@gmail.com \
    --cc=borisp@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rjethwani@everpuredata.com \
    --cc=saeedm@nvidia.com \
    --cc=sd@queasysnail.net \
    --cc=tariqt@nvidia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox