All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Christoph Hellwig <hch@lst.de>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Magnus Karlsson <magnus.karlsson@intel.com>,
	nex.sw.ncis.osdt.itp.upstreaming@intel.com, bpf@vger.kernel.org,
	netdev@vger.kernel.org, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v5 7/7] xsk: use generic DMA sync shortcut instead of a custom one
Date: Mon, 6 May 2024 11:29:31 -0700	[thread overview]
Message-ID: <20240506112931.39614ff0@kernel.org> (raw)
In-Reply-To: <20240506094855.12944-8-aleksander.lobakin@intel.com>

On Mon,  6 May 2024 11:48:55 +0200 Alexander Lobakin wrote:
> XSk infra's been using its own DMA sync shortcut to try avoiding
> redundant function calls. Now that there is a generic one, remove
> the custom implementation and rely on the generic helpers.
> xsk_buff_dma_sync_for_cpu() doesn't need the second argument anymore,
> remove it.

I think this is crashing xsk tests:

  [   91.048963] BUG: kernel NULL pointer dereference, address: 0000000000000464
  [   91.049412] #PF: supervisor read access in kernel mode
  [   91.049739] #PF: error_code(0x0000) - not-present page
  [   91.050057] PGD 0 P4D 0
  [   91.050221] Oops: 0000 [#1] PREEMPT SMP NOPTI
  [   91.050500] CPU: 1 PID: 114 Comm: new_name Tainted: G           OE      6.9.0-rc6-gad3c108348fd-dirty #372
  [   91.051088] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
  [   91.051649] RIP: 0010:xp_alloc+0x76/0x240
  [   91.051903] Code: 48 89 0a 48 89 00 48 89 40 08 41 c7 44 24 34 00 00 00 00 49 8b 44 24 18 48 05 00 01 00 00 49 89 04 24 49 89 44 24 10 48 8b 3b <f6> 87 64 04 00 00 20 0f 85 16 01 00 00 48 8b 44 24 08 65 48 33 04
  [   91.053055] RSP: 0018:ffff99e7c00f0b00 EFLAGS: 00010286
  [   91.053400] RAX: ffff99e7c0c9d100 RBX: ffff89a400901c00 RCX: 0000000000010000
  [   91.053838] RDX: 0000000000000000 RSI: 0000000000000010 RDI: 0000000000000000
  [   91.054277] RBP: ffff89a4026e30e0 R08: 0000000000000001 R09: 0000000000009000
  [   91.054716] R10: 779660ad50f0d4e6 R11: 79b5ce88640fb4f7 R12: ffff89a40c31d870
  [   91.055156] R13: 0000000000000020 R14: 0000000000000000 R15: ffff89a4068c6000
  [   91.055596] FS:  00007f87685bef80(0000) GS:ffff89a43bd00000(0000) knlGS:0000000000000000
  [   91.056090] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  [   91.056458] CR2: 0000000000000464 CR3: 000000010229c001 CR4: 0000000000770ef0
  [   91.056904] PKRU: 55555554
  [   91.057079] Call Trace:
  [   91.057237]  <IRQ>
  [   91.057371]  ? __die_body+0x1f/0x70
  [   91.057595]  ? page_fault_oops+0x15a/0x460
  [   91.057852]  ? find_held_lock+0x2b/0x80
  [   91.058093]  ? __skb_flow_dissect+0x30f/0x1f10
  [   91.058374]  ? lock_release+0xbd/0x280
  [   91.058610]  ? exc_page_fault+0x67/0x1e0
  [   91.058859]  ? asm_exc_page_fault+0x26/0x30
  [   91.059126]  ? xp_alloc+0x76/0x240
  [   91.059341]  __xsk_rcv+0x1f0/0x360
  [   91.059558]  ? __skb_get_hash+0x5b/0x1f0
  [   91.059804]  ? __skb_get_hash+0x5b/0x1f0
  [   91.060050]  __xsk_map_redirect+0x7c/0x2c0
  [   91.060315]  ? rcu_read_lock_held_common+0x2e/0x50
  [   91.060622]  xdp_do_redirect+0x28f/0x4b0
  [   91.060871]  veth_xdp_rcv_skb+0x29e/0x930
  [   91.061126]  veth_xdp_rcv+0x184/0x290
  [   91.061358]  ? update_load_avg+0x8c/0x8c0
  [   91.061609]  ? select_task_rq_fair+0x1ff/0x15a0
  [   91.061894]  ? place_entity+0x19/0x100
  [   91.062131]  veth_poll+0x6c/0x2f0
  [   91.062343]  ? _raw_spin_unlock_irqrestore+0x27/0x50
  [   91.062653]  ? try_to_wake_up+0x261/0x8d0
  [   91.062905]  ? find_held_lock+0x2b/0x80
  [   91.063147]  __napi_poll+0x27/0x200
  [   91.063376]  net_rx_action+0x172/0x320
  [   91.063617]  __do_softirq+0xb6/0x3a3
  [   91.063843]  ? __dev_direct_xmit+0x167/0x1b0
  [   91.064114]  do_softirq.part.0+0x3b/0x70
  [   91.064373]  </IRQ>
  [   91.064511]  <TASK>
  [   91.064650]  __local_bh_enable_ip+0xbd/0xe0
  [   91.064913]  __dev_direct_xmit+0x16c/0x1b0
  [   91.065171]  xsk_generic_xmit+0x703/0xb10
  [   91.065425]  xsk_sendmsg+0x21f/0x2f0

  reply	other threads:[~2024-05-06 18:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06  9:48 [PATCH net-next v5 0/7] dma: skip calling no-op sync ops when possible Alexander Lobakin
2024-05-06  9:48 ` [PATCH net-next v5 1/7] dma: compile-out DMA sync op calls when not used Alexander Lobakin
2024-05-06  9:48 ` [PATCH net-next v5 2/7] dma: avoid redundant calls for sync operations Alexander Lobakin
2024-05-06  9:48 ` [PATCH net-next v5 3/7] iommu/dma: avoid expensive indirect " Alexander Lobakin
2024-05-06  9:48 ` [PATCH net-next v5 4/7] page_pool: make sure frag API fields don't span between cachelines Alexander Lobakin
2024-05-06  9:48 ` [PATCH net-next v5 5/7] page_pool: don't use driver-set flags field directly Alexander Lobakin
2024-05-06  9:48 ` [PATCH net-next v5 6/7] page_pool: check for DMA sync shortcut earlier Alexander Lobakin
2024-05-06 11:50   ` Christoph Hellwig
2024-05-07  9:51     ` Alexander Lobakin
2024-05-07 10:41       ` Christoph Hellwig
2024-05-06  9:48 ` [PATCH net-next v5 7/7] xsk: use generic DMA sync shortcut instead of a custom one Alexander Lobakin
2024-05-06 18:29   ` Jakub Kicinski [this message]
2024-05-07 10:06     ` Alexander Lobakin

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=20240506112931.39614ff0@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nex.sw.ncis.osdt.itp.upstreaming@intel.com \
    --cc=pabeni@redhat.com \
    --cc=rafael@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.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.