Project

General

Profile

Actions

Bug #15483

closed

remove circular from ndi_devi_enter et al

Added by Dan Cross about 1 year ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

#15463 paves the way for removing the `circular` argument completely from ndi_devi_enter, ndi_devi_tryenter, ndi_devi_exit, etc. Removing those has cascading effects across the source base and the delta is fairly large.

Actions #1

Updated by Electric Monk about 1 year ago

  • Gerrit CR set to 2716
Actions #2

Updated by Dan Cross about 1 year ago

  • Category set to kernel
  • Status changed from New to In Progress
  • Assignee set to Dan Cross
Actions #3

Updated by Dan Cross about 1 year ago

A side note: these are private interfaces with no stability guarantees, so removing these parameters is fine.

At Robert's request, I checked the symbol table on the closed binaries to see if they are using any of the effected functions. Exactly one driver (kernel/drv/amd64/mpt) uses the ndi_devi_enter and ndi_devi_exit (and I don't expect to see that symbol anywhere outside of the kernel, since it's a kernel-only function).

However, this should be ok: the way the SYSV ABI works for AMD64, the extra parameter will be stuffed in a caller-save register both both calls, but simply ignored in the callee; assuming that the mpt driver doesn't try to inspect the value of circular after the call (which in all honesty it really shouldn't; I consider the instance we saw of this in the MDI code a bug), these should amount to a nop.

Actions #4

Updated by Dan Cross 12 months ago

This has now been tested by a few different folks (basically, the same set who tested #15463). We have confidence it works for NVMe, USB, SATA and mpt_sas hotplug and it's been stress-tested at Oxide.

Actions #5

Updated by Electric Monk 11 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 3fe80ca4a1f8a033d672a9a2e6e4babac651205a

commit  3fe80ca4a1f8a033d672a9a2e6e4babac651205a
Author: Dan Cross <cross@oxidecomputer.com>
Date:   2023-05-09T15:19:57.000Z

    15483 remove circular from ndi_devi_enter et al
    Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Dan McDonald <danmcd@mnx.io>

Actions

Also available in: Atom PDF