Bug 277659 - [exp-run] check use of inp_ppcb
Summary: [exp-run] check use of inp_ppcb
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-13 02:04 UTC by Gleb Smirnoff
Modified: 2024-03-29 19:20 UTC (History)
1 user (show)

See Also:
glebius: exp-run?


Attachments
inp_ppcb.diff (11.68 KB, text/plain)
2024-03-13 02:05 UTC, Gleb Smirnoff
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gleb Smirnoff freebsd_committer freebsd_triage 2024-03-13 02:04:30 UTC
I'd like to see if there is any software in ports that would use
inp_ppcb pointer that used to live in kernel struct inpcb and is
also exported into couple user visible structures.

I need exp-run with this patch attached.
Comment 1 Gleb Smirnoff freebsd_committer freebsd_triage 2024-03-13 02:05:05 UTC
Created attachment 249125 [details]
inp_ppcb.diff

The patch to apply to tested world.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-03-29 19:20:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1a8d176432e76d7725ed1ac0b44f63ac6cc82397

commit 1a8d176432e76d7725ed1ac0b44f63ac6cc82397
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2024-03-29 19:16:59 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2024-03-29 19:18:32 +0000

    inpcb: fully retire inp_ppcb pointer

    Before a protocol specific control block started to embed inpcb in self
    (see 0aa120d52f3c, e68b3792440c, 483fe96511ec) this pointer used to point
    at it.

    Retain kf_sock_inpcb field in the struct kinfo_file in <sys/user.h>.  The
    exp-run detected a minimal use of the field in ports:
      * sysutils/lsof - patched upstream
      * net-mgmt/netdata  - patch accepted upstream
      * emulators/qemu-user-static - upstream master branch seems not using
        the field anymore
    We can keep the field around for some time, but eventually it may be
    reused for something else.

    PR:                     277659 (exp-run)
    Reviewed by:            tuexen
    Differential Revision:  https://reviews.freebsd.org/D44491

 lib/libprocstat/libprocstat.c        | 29 ++++-------------------------
 lib/libprocstat/libprocstat.h        |  1 -
 lib/libprocstat/libprocstat_compat.c |  2 +-
 sys/kern/sys_socket.c                |  8 ++------
 sys/netinet/in_pcb.c                 |  9 ---------
 sys/netinet/in_pcb.h                 |  9 ++++-----
 sys/netinet/tcp_subr.c               |  7 -------
 sys/sys/user.h                       |  2 +-
 usr.bin/fstat/fstat.c                | 15 +++++----------
 usr.bin/systat/netstat.c             | 28 +++++++++++++---------------
 10 files changed, 30 insertions(+), 80 deletions(-)