summarylogtreecommitdiffstats
path: root/kernel-6.15.patch
blob: c1c2498dc1306a126a58a6f6519aea31786d4d8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
diff -ruN a/Makefile b/Makefile
--- a/Makefile	2025-05-22 20:08:18.000000000 +0200
+++ b/Makefile	2025-06-21 17:46:52.251037509 +0200
@@ -4,7 +4,7 @@
 # for upstream, we don't need any addition makefiles,
 # but for a standalone module the configuration is necessary
 # EXTRA_CFLAGS += "-D DEBUG"
-EXTRA_CFLAGS += "-D STANDALONE_BDEVFILTER"
+CFLAGS_MODULE += "-D STANDALONE_BDEVFILTER"
 include ${M}/Makefile-config
 include ${M}/Makefile-bdevfilter
 include ${M}/Makefile-standalone
diff -ruN a/Makefile-bdevfilter b/Makefile-bdevfilter
--- a/Makefile-bdevfilter	2025-05-22 20:08:18.000000000 +0200
+++ b/Makefile-bdevfilter	2025-06-21 17:48:00.506215070 +0200
@@ -1,9 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
 # Additions for standalone bdevfilter module
 
-EXTRA_CFLAGS += "-Wno-unused-function"
+CFLAGS_MODULE += "-Wno-unused-function"
 
-EXTRA_CFLAGS += $(shell 							\
+CFLAGS_MODULE += $(shell 							\
 	grep -qw "TSK_TRACE_FL_TRACE_BIT" $(srctree)/include/linux/ftrace.h &&	\
 		echo -D HAVE_NOT_FTRACE_FREE_FILTER)
 
diff -ruN a/Makefile-config b/Makefile-config
--- a/Makefile-config	2025-05-22 20:08:18.000000000 +0200
+++ b/Makefile-config	2025-06-21 17:47:12.159413235 +0200
@@ -1,91 +1,91 @@
 # SPDX-License-Identifier: GPL-2.0
 
-EXTRA_CFLAGS += $(shell 							\
+CFLAGS_MODULE += $(shell 							\
 	grep -qw "struct ftrace_regs" $(srctree)/include/linux/ftrace.h	&&	\
 		echo -D HAVE_FTRACE_REGS)
-EXTRA_CFLAGS += $(shell 							\
+CFLAGS_MODULE += $(shell 							\
 	grep -qw "ftrace_regs_set_instruction_pointer" $(srctree)/include/linux/ftrace.h && \
 		echo -D HAVE_FTRACE_REGS_SET_INSTRUCTION_POINTER)
-EXTRA_CFLAGS += $(shell 							\
+CFLAGS_MODULE += $(shell 							\
 	grep -qw "blk_qc_t submit_bio_noacct" $(srctree)/include/linux/blkdev.h	&& \
 		echo -D HAVE_QC_SUBMIT_BIO_NOACCT)
-EXTRA_CFLAGS += $(shell 							\
+CFLAGS_MODULE += $(shell 							\
 	grep -qw "void submit_bio_noacct" $(srctree)/include/linux/blkdev.h &&	\
 		echo -D HAVE_VOID_SUBMIT_BIO_NOACCT)
-EXTRA_CFLAGS += $(shell 							\
+CFLAGS_MODULE += $(shell 							\
 	grep -qw "struct super_block \*freeze_bdev"				\
 		$(srctree)/include/linux/blkdev.h &&				\
 		echo -D HAVE_SUPER_BLOCK_FREEZE)
-EXTRA_CFLAGS += $(shell 							\
+CFLAGS_MODULE += $(shell 							\
 	grep -qw "*bi_bdev;" $(srctree)/include/linux/blk_types.h &&		\
 		echo -D HAVE_BI_BDEV)
-EXTRA_CFLAGS += $(shell 							\
+CFLAGS_MODULE += $(shell 							\
 	grep -qw "*bi_disk;" $(srctree)/include/linux/blk_types.h &&		\
 		echo -D HAVE_BI_BDISK)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/genhd.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/genhd.h &&		\
 	grep -qw "sector_t bdev_nr_sectors" $(srctree)/include/linux/genhd.h &&	\
 		echo -D HAVE_BDEV_NR_SECTORS)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 	grep -qw "sector_t bdev_nr_sectors" $(srctree)/include/linux/blkdev.h && \
 		echo -D HAVE_BDEV_NR_SECTORS)
-EXTRA_CFLAGS += $(shell 							\
+CFLAGS_MODULE += $(shell 							\
 	grep -qw "blk_mq_alloc_disk" $(srctree)/include/linux/blk-mq.h &&	\
 		echo -D HAVE_BLK_MQ_ALLOC_DISK)
-EXTRA_CFLAGS += $(shell 							\
+CFLAGS_MODULE += $(shell 							\
 	grep -qw "BIO_MAX_PAGES" $(srctree)/include/linux/bio.h &&		\
 		echo -D HAVE_BIO_MAX_PAGES)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/genhd.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/genhd.h &&		\
 	grep -qw "int add_disk" $(srctree)/include/linux/genhd.h &&		\
 		echo -D HAVE_ADD_DISK_RESULT)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 	grep -qw "int add_disk" $(srctree)/include/linux/blkdev.h &&		\
 		echo -D HAVE_ADD_DISK_RESULT)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/genhd.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/genhd.h &&		\
 	grep -qw "int __must_check add_disk" $(srctree)/include/linux/genhd.h && \
 		echo -D HAVE_ADD_DISK_RESULT)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 	grep -qw "int __must_check add_disk" $(srctree)/include/linux/blkdev.h && \
 		echo -D HAVE_ADD_DISK_RESULT)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/genhd.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/genhd.h &&		\
 	grep -qw "void blk_cleanup_disk" $(srctree)/include/linux/genhd.h &&	\
 		echo -D HAVE_BLK_CLEANUP_DISK)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 	grep -qw "void blk_cleanup_disk" $(srctree)/include/linux/blkdev.h &&	\
 		echo -D HAVE_BLK_CLEANUP_DISK)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/genhd.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/genhd.h &&		\
 		echo -D HAVE_GENHD_H)
-EXTRA_CFLAGS += $(shell 							\
+CFLAGS_MODULE += $(shell 							\
 	grep "bio_alloc_bioset" $(srctree)/include/linux/bio.h |		\
 	grep -qw "struct block_device" &&					\
 		echo -D HAVE_BDEV_BIO_ALLOC)
 
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/device/class.h &&	\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/device/class.h &&	\
 	grep -qw "define class_create" $(srctree)/include/linux/device/class.h && \
 		echo -D HAVE_DEFINE_CLASS_CREATE_H)
 # special for sles 15 sp3
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/device.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/device.h &&		\
 	grep -qw "define class_create" $(srctree)/include/linux/device.h &&	\
 		echo -D HAVE_DEFINE_CLASS_CREATE_H)
 
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 	grep -qw "struct blk_holder_ops" $(srctree)/include/linux/blkdev.h &&	\
 		echo -D HAVE_BLK_HOLDER_OPS)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 	grep -qw "struct bdev_handle" $(srctree)/include/linux/blkdev.h &&	\
 		echo -D HAVE_BDEV_HANDLE)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 	grep -qw "bdev_file_open_by_dev" $(srctree)/include/linux/blkdev.h &&	\
 		echo -D HAVE_BDEV_FILE_OPEN)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 	grep -qw "int bdev_freeze" $(srctree)/include/linux/blkdev.h &&		\
 		echo -D HAVE_BDEV_FREEZE)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 	grep "__blk_alloc_disk" $(srctree)/include/linux/blkdev.h |		\
 	grep -qw "struct queue_limits" &&					\
 		echo -D HAVE_BDEV_QUEUE_LIMITS)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 	grep -qw "void blk_queue_max_hw_sectors" $(srctree)/include/linux/blkdev.h &&	\
 		echo -D HAVE_BLK_QUEUE_MAX_HW_SECTORS)
-EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blk-mq.h &&		\
+CFLAGS_MODULE += $(shell test -f $(srctree)/include/linux/blk-mq.h &&		\
 	grep -qw "BLK_MQ_F_SHOULD_MERGE" $(srctree)/include/linux/blk-mq.h &&	\
 		echo -D HAVE_BLK_MQ_F_SHOULD_MERGE)
diff -ruN a/Makefile-standalone b/Makefile-standalone
--- a/Makefile-standalone	2025-05-22 20:08:18.000000000 +0200
+++ b/Makefile-standalone	2025-06-21 17:48:10.219385197 +0200
@@ -1,56 +1,56 @@
 # SPDX-License-Identifier: GPL-2.0
 # Additions for standalone module modification
 
-EXTRA_CFLAGS += "-D BLK_SNAP_MODIFICATION"
-EXTRA_CFLAGS += "-D MOD_NAME=\"standalone\" "
+CFLAGS_MODULE += "-D BLK_SNAP_MODIFICATION"
+CFLAGS_MODULE += "-D MOD_NAME=\"standalone\" "
 
 # The power of 2 for minimum tracking block size.
 # The minimum tracking block size by default is 64 KB (shift 16)
 # It's looks good for block device 128 GB or lower.
 # In this case, the block device is divided into 2097152 blocks.
-EXTRA_CFLAGS += "-D CONFIG_BLK_SNAP_TRACKING_BLOCK_MINIMUM_SHIFT=16"
+CFLAGS_MODULE += "-D CONFIG_BLK_SNAP_TRACKING_BLOCK_MINIMUM_SHIFT=16"
 
 # The limit of the maximum number of tracking blocks.
 # As the size of the block device grows, the size of the tracking block
 # size should also grow. For this purpose, the limit of the maximum
 # number of block size is set.
-EXTRA_CFLAGS += "-D CONFIG_BLK_SNAP_TRACKING_BLOCK_MAXIMUM_COUNT=2097152"
+CFLAGS_MODULE += "-D CONFIG_BLK_SNAP_TRACKING_BLOCK_MAXIMUM_COUNT=2097152"
 
 # The minimum chunk size is 256 KB (shift 18).
 # It's looks good for block device 128 GB or lower.
 # In this case, the block device is divided into 524288 chunks.
-EXTRA_CFLAGS += "-D CONFIG_BLK_SNAP_CHUNK_MINIMUM_SHIFT=18"
+CFLAGS_MODULE += "-D CONFIG_BLK_SNAP_CHUNK_MINIMUM_SHIFT=18"
 
 # Since reading and writing to snapshots is performed in large chunks,
 # a cache is implemented to optimize reading small portions of data
 # from the snapshot image. As the number of chunks in the cache
 # increases, memory consumption also increases.
 # The minimum recommended value is four.
-EXTRA_CFLAGS += "-D CONFIG_BLK_SNAP_CHUNK_MAXIMUM_IN_CACHE=32"
+CFLAGS_MODULE += "-D CONFIG_BLK_SNAP_CHUNK_MAXIMUM_IN_CACHE=32"
 
 # A buffer can be allocated for each chunk. After use, this buffer is not
 # released immediately, but is sent to the pool of free buffers.
 # However, if there are too many free buffers in the pool, they are released
 # immediately. The maximum size of the pool is regulated by this define.
-EXTRA_CFLAGS += "-D CONFIG_BLK_SNAP_FREE_DIFF_BUFFER_POOL_SIZE=128"
+CFLAGS_MODULE += "-D CONFIG_BLK_SNAP_FREE_DIFF_BUFFER_POOL_SIZE=128"
 
 # The minimum allowable size of the difference storage in sectors.
 # When reached, an event is generated about the lack of free space.
-EXTRA_CFLAGS += "-D CONFIG_BLK_SNAP_DIFF_STORAGE_MINIMUM=2097152"
+CFLAGS_MODULE += "-D CONFIG_BLK_SNAP_DIFF_STORAGE_MINIMUM=2097152"
 
-# EXTRA_CFLAGS += "-D CONFIG_BLK_SNAP_ALLOW_DIFF_STORAGE_IN_MEMORY"
-EXTRA_CFLAGS += "-D CONFIG_BLK_SNAP_DEBUG_MEMORY_LEAK"
+# CFLAGS_MODULE += "-D CONFIG_BLK_SNAP_ALLOW_DIFF_STORAGE_IN_MEMORY"
+CFLAGS_MODULE += "-D CONFIG_BLK_SNAP_DEBUG_MEMORY_LEAK"
 
 # Some specific keys for out-of-tree module configuration
-EXTRA_CFLAGS += "-D BLK_SNAP_FILELOG"
-EXTRA_CFLAGS += "-D BLK_SNAP_SEQUENTALFREEZE"
-#EXTRA_CFLAGS += "-D BLK_SNAP_DEBUGLOG"
-# EXTRA_CFLAGS += "-D BLK_SNAP_DEBUG_DIFF_STORAGE_LISTS"
-# EXTRA_CFLAGS += "-D BLK_SNAP_DEBUG_DIFF_BUFFER"
-# EXTRA_CFLAGS += "-D BLK_SNAP_DEBUG_CHUNK_IO"
-# EXTRA_CFLAGS += "-D BLK_SNAP_DEBUG_IMAGE_WRITE"
-# EXTRA_CFLAGS += "-D BLK_SNAP_DEBUG_SECTOR_STATE"
-# EXTRA_CFLAGS += "-D BLK_SNAP_DEBUG_RELEASE_SNAPSHOT"
+CFLAGS_MODULE += "-D BLK_SNAP_FILELOG"
+CFLAGS_MODULE += "-D BLK_SNAP_SEQUENTALFREEZE"
+#CFLAGS_MODULE += "-D BLK_SNAP_DEBUGLOG"
+# CFLAGS_MODULE += "-D BLK_SNAP_DEBUG_DIFF_STORAGE_LISTS"
+# CFLAGS_MODULE += "-D BLK_SNAP_DEBUG_DIFF_BUFFER"
+# CFLAGS_MODULE += "-D BLK_SNAP_DEBUG_CHUNK_IO"
+# CFLAGS_MODULE += "-D BLK_SNAP_DEBUG_IMAGE_WRITE"
+# CFLAGS_MODULE += "-D BLK_SNAP_DEBUG_SECTOR_STATE"
+# CFLAGS_MODULE += "-D BLK_SNAP_DEBUG_RELEASE_SNAPSHOT"
 
 $(KERNEL_MODULE_NAME)-y += log.o
 $(KERNEL_MODULE_NAME)-y += log_histogram.o