Skip to content

Commit

Permalink
init: Change kernel version for linux-6.6
Browse files Browse the repository at this point in the history
Just an interesting kernel hacking.

Signed-off-by: ut005081 <[email protected]>
Signed-off-by: WangYuli <[email protected]>
  • Loading branch information
shy129 authored and Avenger-285714 committed Aug 9, 2024
1 parent 35cfd66 commit f9a3803
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 10
SUBLEVEL = 3
PATCHLEVEL = 6
SUBLEVEL = 44
EXTRAVERSION =
NAME = Baby Opossum Posse

Expand Down Expand Up @@ -1244,10 +1244,10 @@ endef
define filechk_version.h
if [ $(SUBLEVEL) -gt 255 ]; then \
echo \#define LINUX_VERSION_CODE $(shell \
expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + 255); \
expr 6 \* 65536 + 10 \* 256 + 3); \
else \
echo \#define LINUX_VERSION_CODE $(shell \
expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \
expr 6 \* 65536 + 10 \* 256 + 3); \
fi; \
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + \
((c) > 255 ? 255 : (c)))'; \
Expand Down
5 changes: 5 additions & 0 deletions fs/pstore/ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
#define RAMOOPS_KERNMSG_HDR "===="
#define MIN_MEM_SIZE 4096UL

#ifdef LINUX_VERSION_CODE
#undef LINUX_VERSION_CODE
#endif
#define LINUX_VERSION_CODE KERNEL_VERSION(6, 6, 44)

static ulong record_size = MIN_MEM_SIZE;
module_param(record_size, ulong, 0400);
MODULE_PARM_DESC(record_size,
Expand Down
5 changes: 5 additions & 0 deletions init/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
#include <linux/utsname.h>
#include <linux/proc_ns.h>

#ifdef LINUX_VERSION_CODE
#undef LINUX_VERSION_CODE
#endif
#define LINUX_VERSION_CODE KERNEL_VERSION(6, 6, 44)

static int __init early_hostname(char *arg)
{
size_t bufsize = sizeof(init_uts_ns.name.nodename);
Expand Down
5 changes: 5 additions & 0 deletions kernel/bpf/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
#include <net/netkit.h>
#include <net/tcx.h>

#ifdef LINUX_VERSION_CODE
#undef LINUX_VERSION_CODE
#endif
#define LINUX_VERSION_CODE KERNEL_VERSION(6, 6, 44)

#define IS_FD_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY || \
(map)->map_type == BPF_MAP_TYPE_CGROUP_ARRAY || \
(map)->map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS)
Expand Down
5 changes: 5 additions & 0 deletions kernel/power/snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@

#include "power.h"

#ifdef LINUX_VERSION_CODE
#undef LINUX_VERSION_CODE
#endif
#define LINUX_VERSION_CODE KERNEL_VERSION(6, 6, 44)

#if defined(CONFIG_STRICT_KERNEL_RWX) && defined(CONFIG_ARCH_HAS_SET_MEMORY)
static bool hibernate_restore_protection;
static bool hibernate_restore_protection_active;
Expand Down
6 changes: 6 additions & 0 deletions kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@

#include "uid16.h"

#ifdef LINUX_VERSION_CODE
#undef LINUX_VERSION_CODE
#endif
#define LINUX_VERSION_CODE KERNEL_VERSION(6, 6, 44)


#ifndef SET_UNALIGN_CTL
# define SET_UNALIGN_CTL(a, b) (-EINVAL)
#endif
Expand Down

0 comments on commit f9a3803

Please sign in to comment.