[Deepin-Kernel-SIG] [linux 6.6.y] [Deepin] Revert KABI fix changes.#1501
Conversation
deepin inclusion category: kabi This reverts commit 19a90fb. We release new kabi version, revert it. Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion category: kabi This reverts commit ebe57af. We release new kabi version, revert it. Link: deepin-community#1379 Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
… list of routes" deepin inclusion category: kabi This reverts commit 3427f09. We release new kabi version, revert it. Link: deepin-community#1452 Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion category: kabi This reverts commit 6cdefbb. We release new kabi version, revert it. Link: deepin-community#1367 Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusin category: kabi This reverts commit 527ec89. We release new kabi version, revert it. Link: deepin-community#1378 Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion category: kabi This reverts commit 3ab9823. We release new kabi version, revert it. Link: deepin-community#1368 Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Reviewer's GuideThis PR reverts Deepin-specific KABI indirections by inlining previously externalized fields back into core kernel structs and removing separate allocations, primarily in perf, fwnode, IPv6 FIB, BPF, netpoll, and skbuff paths, restoring upstream-style layouts and behavior while keeping Deepin KABI reserve hooks in place. Updated class diagram for perf event hardware structsclassDiagram
class perf_event {
+hw_perf_event hw
+__u32 orig_type
+void *filter
+DEEPIN_KABI_RESERVE_1
+DEEPIN_KABI_RESERVE_2
+DEEPIN_KABI_RESERVE_3
+DEEPIN_KABI_RESERVE_4
}
class hw_perf_event {
+u64 config
+u64 config1
+u64 last_tag
+u64 dyn_constraint
+unsigned long config_base
+unsigned long event_base
+int event_base_rdpmc
+int idx
+int last_cpu
+u64 sample_period
+u64 period_left
+u64 interrupts
+u64 freq_time_stamp
+u64 freq_count
+u64 freq
+u64 branch_reg
+unsigned int flags
}
class hw_perf_event_extra {
+u64 config
+u64 reg
+int idx
}
class hw_perf_event_extra_reg {
+u64 config
+int idx
}
class cpu_hw_events {
+int n_events
+perf_event *event_list
+int *assign
+bool excl_cntrs
}
class perf_event_attr {
+u64 config
+u64 config1
+u64 config2
}
perf_event *-- hw_perf_event : has
hw_perf_event o-- hw_perf_event_extra : extra_reg
hw_perf_event o-- hw_perf_event_extra_reg : branch_reg
cpu_hw_events o-- perf_event : event_list
perf_event --> perf_event_attr : attr
Updated class diagram for fwnode, IPv6 FIB, BPF and netpoll structsclassDiagram
class fwnode_handle {
+const fwnode_operations *ops
}
class fwnode_operations {
+void *get
+void put
+bool property_present
+int property_read_u8_array
+int property_read_u16_array
+int property_read_u32_array
+int property_read_u64_array
+int property_read_string_array
+int add_links
+void __iomem *iomap
+int irq_get
+int property_count_reference_with_args
+DEEPIN_KABI_RESERVE_1
+DEEPIN_KABI_RESERVE_2
+DEEPIN_KABI_RESERVE_3
+DEEPIN_KABI_RESERVE_4
}
fwnode_handle --> fwnode_operations : uses
class fib6_info {
+refcount_t fib6_ref
+unsigned long expires
+hlist_node gc_link
+dst_metrics *fib6_metrics
+fib6_table *fib6_table
+fib6_nh *fib6_nh
+rcu_head rcu
+nexthop *nh
+DEEPIN_KABI_RESERVE_1
+DEEPIN_KABI_RESERVE_2
}
class fib6_table {
+u32 tb6_id
+struct hlist_head tb6_gc_hlist
+inet_peer_base tb6_peers
+unsigned int flags
+unsigned int fib_seq
}
class dst_metrics {
+u32 metrics[ ]
}
class fib6_nh {
+int dummy
}
class nexthop {
+int dummy
}
fib6_info --> fib6_table : belongs_to
fib6_info o-- dst_metrics : metrics
fib6_info o-- fib6_nh : fib6_nh[]
fib6_info --> nexthop : nh
fib6_table o-- fib6_info : routes
class bpf_map_owner {
+bool xdp_has_frags
+u64 storage_cookie[MAX_BPF_CGROUP_STORAGE_TYPE]
+const btf_type *attach_func_proto
+enum bpf_attach_type expected_attach_type
}
class btf_type {
+u32 info
}
bpf_map_owner --> btf_type : uses
class netpoll {
+char name[16]
+net_device *dev
+u8 local_mac[ETH_ALEN]
+u8 remote_mac[ETH_ALEN]
+__be32 local_ip
+__be32 remote_ip
+__be16 local_port
+__be16 remote_port
+bool ipv6
+sk_buff_head skb_pool
+DEEPIN_KABI_RESERVE_1
+DEEPIN_KABI_RESERVE_2
}
class net_device {
+char name[16]
}
class sk_buff_head {
+sk_buff *next
+sk_buff *prev
+u32 qlen
}
netpoll --> net_device : uses
netpoll o-- sk_buff_head : skb_pool
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull request overview
This PR reverts prior Deepin kABI-specific struct extensions/aux allocations to bring multiple core kernel interfaces back in line with upstream Linux 6.6.y layouts and lifetime management (notably perf events and several networking-related structs).
Changes:
- Remove
hw_perf_event_extallocation/caching and fold required fields back intostruct hw_perf_event. - Restore upstream-like struct members for fwnode ops, IPv6 FIB GC tracking, netpoll skb pool handling, and BPF map owner state (replacing Deepin KABI macros/extends).
- Update x86 perf (Intel PMU + generic x86) to use the restored in-struct perf hardware fields.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| net/core/skbuff.c | Removes Deepin KABI conditional include/define and relies on upstream GRO header definition. |
| kernel/events/core.c | Drops perf_hw_event_cache and per-event hw_ext allocation/free paths. |
| include/net/ip6_fib.h | Restores IPv6 FIB GC fields (gc_link, tb6_gc_hlist) to upstream-style members. |
| include/linux/perf_event.h | Removes hw_perf_event_ext and adds config1/dyn_constraint into struct hw_perf_event; removes perf_event’s hw_ext pointer. |
| include/linux/netpoll.h | Moves skb_pool into the main struct netpoll layout as an in-tree member. |
| include/linux/fwnode.h | Restores property_count_reference_with_args as a direct function pointer member. |
| include/linux/bpf.h | Restores expected_attach_type as a direct member of struct bpf_map_owner. |
| arch/x86/events/intel/core.c | Switches Intel PMU ACR/dynamic constraint logic to use event->hw.* fields. |
| arch/x86/events/core.c | Initializes event->hw.dyn_constraint directly (no hw_ext). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| int (*property_count_reference_with_args)( | ||
| const struct fwnode_handle *fwnode, const char *list_name, | ||
| const char *cells_name)) | ||
| const char *cells_name); | ||
|
|
||
| DEEPIN_KABI_RESERVE(1) | ||
| DEEPIN_KABI_RESERVE(2) |
There was a problem hiding this comment.
struct fwnode_operations: replacing DEEPIN_KABI_USE(1, ...) with a direct function pointer plus DEEPIN_KABI_RESERVE(1) means that when CONFIG_DEEPIN_KABI_RESERVE is enabled the struct grows by an extra unsigned long slot (the reserve is no longer being “used”/replaced). If the intent is to keep the reserved-space model (per include/linux/deepin_kabi.h docs for RESERVE/USE), consider switching back to DEEPIN_KABI_USE(1, ...) or dropping DEEPIN_KABI_RESERVE(1) here so the added member occupies the reserved space rather than appending new padding.
| DEEPIN_KABI_RESERVE(1) | ||
| DEEPIN_KABI_RESERVE(2) |
There was a problem hiding this comment.
struct fib6_info: now that gc_link is a real field, leaving DEEPIN_KABI_RESERVE(1)/(2) in place means that with CONFIG_DEEPIN_KABI_RESERVE enabled the struct grows (the reserves are no longer being consumed via DEEPIN_KABI_USE). If the goal is still to use reserved slots as intended (see include/linux/deepin_kabi.h RESERVE/USE docs), consider either using DEEPIN_KABI_USE(1, 2, struct hlist_node gc_link) at the desired location or removing these reserves if they’re no longer needed for ABI management.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Cryolitia The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
We release new kabi version, revert them.
Summary by Sourcery
Revert previous Deepin KABI-related extensions and allocations, restoring in-tree kernel interfaces and structures for perf events, firmware nodes, IPv6 FIB GC, GRO handling, BPF map owner, and netpoll to their upstream layouts.
Bug Fixes:
Enhancements: