kernel 5.4.6
This commit is contained in:
Regular → Executable
Regular → Executable
+9968
-7325
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,37 @@
|
|||||||
|
From 84ecc2f6eb1cb12e6d44818f94fa49b50f06e6ac Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gen Zhang <blackgod016574@gmail.com>
|
||||||
|
Date: Thu, 23 May 2019 08:34:52 +0800
|
||||||
|
Subject: consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c
|
||||||
|
|
||||||
|
In function con_insert_unipair(), when allocation for p2 and p1[n]
|
||||||
|
fails, ENOMEM is returned, but previously allocated p1 is not freed,
|
||||||
|
remains as leaking memory. Thus we should free p1 as well when this
|
||||||
|
allocation fails.
|
||||||
|
|
||||||
|
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
|
||||||
|
Reviewed-by: Kees Cook <keescook@chromium.org>
|
||||||
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
---
|
||||||
|
drivers/tty/vt/consolemap.c | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
|
||||||
|
index b28aa0d289f8..79fcc96cc7c0 100644
|
||||||
|
--- a/drivers/tty/vt/consolemap.c
|
||||||
|
+++ b/drivers/tty/vt/consolemap.c
|
||||||
|
@@ -489,7 +489,11 @@ con_insert_unipair(struct uni_pagedir *p, u_short unicode, u_short fontpos)
|
||||||
|
p2 = p1[n = (unicode >> 6) & 0x1f];
|
||||||
|
if (!p2) {
|
||||||
|
p2 = p1[n] = kmalloc_array(64, sizeof(u16), GFP_KERNEL);
|
||||||
|
- if (!p2) return -ENOMEM;
|
||||||
|
+ if (!p2) {
|
||||||
|
+ kfree(p1);
|
||||||
|
+ p->uni_pgdir[n] = NULL;
|
||||||
|
+ return -ENOMEM;
|
||||||
|
+ }
|
||||||
|
memset(p2, 0xff, 64*sizeof(u16)); /* No glyphs for the characters (yet) */
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
cgit 1.2-0.3.lf.el7
|
||||||
|
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
|
||||||
|
Makefile | 18 +++++-------------
|
||||||
|
scripts/kconfig/Makefile | 4 ----
|
||||||
|
2 files changed, 5 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
|
diff -Nurp linux-5.4.orig/Makefile linux-5.4/Makefile
|
||||||
|
--- linux-5.4.orig/Makefile 2019-11-30 23:06:49.394199628 +0200
|
||||||
|
+++ linux-5.4/Makefile 2019-11-30 23:08:00.927203318 +0200
|
||||||
|
@@ -1093,8 +1093,7 @@ include/config/kernel.release: FORCE
|
||||||
|
# Carefully list dependencies so we do not try to build scripts twice
|
||||||
|
# in parallel
|
||||||
|
PHONY += scripts
|
||||||
|
-scripts: scripts_basic scripts_dtc
|
||||||
|
- $(Q)$(MAKE) $(build)=$(@)
|
||||||
|
+scripts:
|
||||||
|
|
||||||
|
# Things we need to do before we recursively start building the kernel
|
||||||
|
# or the modules are listed in "prepare".
|
||||||
|
@@ -1112,7 +1111,7 @@ prepare0: archprepare
|
||||||
|
$(Q)$(MAKE) $(build)=.
|
||||||
|
|
||||||
|
# All the preparing..
|
||||||
|
-prepare: prepare0 prepare-objtool
|
||||||
|
+prepare:
|
||||||
|
|
||||||
|
# Support for using generic headers in asm-generic
|
||||||
|
asm-generic := -f $(srctree)/scripts/Makefile.asm-generic obj
|
||||||
|
@@ -1363,15 +1362,8 @@ CLEAN_DIRS += include/ksym
|
||||||
|
CLEAN_FILES += modules.builtin.modinfo
|
||||||
|
|
||||||
|
# Directories & files removed with 'make mrproper'
|
||||||
|
-MRPROPER_DIRS += include/config include/generated \
|
||||||
|
- arch/$(SRCARCH)/include/generated .tmp_objdiff \
|
||||||
|
- debian/ snap/ tar-install/
|
||||||
|
-MRPROPER_FILES += .config .config.old .version \
|
||||||
|
- Module.symvers \
|
||||||
|
- signing_key.pem signing_key.priv signing_key.x509 \
|
||||||
|
- x509.genkey extra_certificates signing_key.x509.keyid \
|
||||||
|
- signing_key.x509.signer vmlinux-gdb.py \
|
||||||
|
- *.spec
|
||||||
|
+MRPROPER_DIRS += ""
|
||||||
|
+MRPROPER_FILES += ""
|
||||||
|
|
||||||
|
# Directories & files removed with 'make distclean'
|
||||||
|
DISTCLEAN_DIRS +=
|
||||||
|
@@ -1394,7 +1386,7 @@ clean: archclean vmlinuxclean
|
||||||
|
#
|
||||||
|
mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
|
||||||
|
mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
|
||||||
|
-mrproper-dirs := $(addprefix _mrproper_,scripts)
|
||||||
|
+mrproper-dirs := $(addprefix _mrproper_,scripts)
|
||||||
|
|
||||||
|
PHONY += $(mrproper-dirs) mrproper
|
||||||
|
$(mrproper-dirs):
|
||||||
|
diff -Nurp linux-5.4.orig/scripts/kconfig/Makefile linux-5.4/scripts/kconfig/Makefile
|
||||||
|
--- linux-5.4.orig/scripts/kconfig/Makefile 2019-11-25 02:32:01.000000000 +0200
|
||||||
|
+++ linux-5.4/scripts/kconfig/Makefile 2019-11-30 23:07:24.957201462 +0200
|
||||||
|
@@ -24,16 +24,12 @@ endif
|
||||||
|
unexport CONFIG_
|
||||||
|
|
||||||
|
xconfig: $(obj)/qconf
|
||||||
|
- $< $(silent) $(Kconfig)
|
||||||
|
|
||||||
|
gconfig: $(obj)/gconf
|
||||||
|
- $< $(silent) $(Kconfig)
|
||||||
|
|
||||||
|
menuconfig: $(obj)/mconf
|
||||||
|
- $< $(silent) $(Kconfig)
|
||||||
|
|
||||||
|
config: $(obj)/conf
|
||||||
|
- $< $(silent) --oldaskconfig $(Kconfig)
|
||||||
|
|
||||||
|
nconfig: $(obj)/nconf
|
||||||
|
$< $(silent) $(Kconfig)
|
||||||
@@ -0,0 +1,321 @@
|
|||||||
|
|
||||||
|
fs/aufs/Kconfig | 2 +-
|
||||||
|
fs/dcache.c | 2 ++
|
||||||
|
fs/exec.c | 1 +
|
||||||
|
fs/fcntl.c | 1 +
|
||||||
|
fs/file_table.c | 2 ++
|
||||||
|
fs/inode.c | 1 +
|
||||||
|
fs/namespace.c | 3 +++
|
||||||
|
fs/notify/group.c | 1 +
|
||||||
|
fs/open.c | 1 +
|
||||||
|
fs/read_write.c | 4 ++++
|
||||||
|
fs/splice.c | 2 ++
|
||||||
|
fs/sync.c | 1 +
|
||||||
|
fs/xattr.c | 1 +
|
||||||
|
kernel/locking/lockdep.c | 1 +
|
||||||
|
kernel/task_work.c | 1 +
|
||||||
|
security/device_cgroup.c | 1 +
|
||||||
|
security/security.c | 8 ++++++++
|
||||||
|
17 files changed, 32 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/aufs/Kconfig linux-5.4-aufs-mod/fs/aufs/Kconfig
|
||||||
|
--- linux-5.4-aufs/fs/aufs/Kconfig 2019-11-28 01:25:59.062925618 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/aufs/Kconfig 2019-11-28 01:38:40.564895255 +0200
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
config AUFS_FS
|
||||||
|
- bool "Aufs (Advanced multi layered unification filesystem) support"
|
||||||
|
+ tristate "Aufs (Advanced multi layered unification filesystem) support"
|
||||||
|
help
|
||||||
|
Aufs is a stackable unification filesystem such as Unionfs,
|
||||||
|
which unifies several directories and provides a merged single
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/dcache.c linux-5.4-aufs-mod/fs/dcache.c
|
||||||
|
--- linux-5.4-aufs/fs/dcache.c 2019-11-28 01:25:59.069925618 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/dcache.c 2019-11-28 01:38:40.585895254 +0200
|
||||||
|
@@ -1369,6 +1369,7 @@ rename_retry:
|
||||||
|
seq = 1;
|
||||||
|
goto again;
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(d_walk);
|
||||||
|
|
||||||
|
struct check_mount {
|
||||||
|
struct vfsmount *mnt;
|
||||||
|
@@ -2914,6 +2915,7 @@ void d_exchange(struct dentry *dentry1,
|
||||||
|
|
||||||
|
write_sequnlock(&rename_lock);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(d_exchange);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* d_ancestor - search for an ancestor
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/exec.c linux-5.4-aufs-mod/fs/exec.c
|
||||||
|
--- linux-5.4-aufs/fs/exec.c 2019-11-25 02:32:01.000000000 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/exec.c 2019-11-28 01:38:40.589895254 +0200
|
||||||
|
@@ -110,6 +110,7 @@ bool path_noexec(const struct path *path
|
||||||
|
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
|
||||||
|
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(path_noexec);
|
||||||
|
|
||||||
|
#ifdef CONFIG_USELIB
|
||||||
|
/*
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/fcntl.c linux-5.4-aufs-mod/fs/fcntl.c
|
||||||
|
--- linux-5.4-aufs/fs/fcntl.c 2019-11-28 01:25:59.069925618 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/fcntl.c 2019-11-28 01:38:40.589895254 +0200
|
||||||
|
@@ -85,6 +85,7 @@ int setfl(int fd, struct file * filp, un
|
||||||
|
out:
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(setfl);
|
||||||
|
|
||||||
|
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
|
||||||
|
int force)
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/file_table.c linux-5.4-aufs-mod/fs/file_table.c
|
||||||
|
--- linux-5.4-aufs/fs/file_table.c 2019-11-25 02:32:01.000000000 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/file_table.c 2019-11-28 01:38:40.589895254 +0200
|
||||||
|
@@ -162,6 +162,7 @@ over:
|
||||||
|
}
|
||||||
|
return ERR_PTR(-ENFILE);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(alloc_empty_file);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Variant of alloc_empty_file() that doesn't check and modify nr_files.
|
||||||
|
@@ -375,6 +377,7 @@ void __fput_sync(struct file *file)
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT_SYMBOL(fput);
|
||||||
|
+EXPORT_SYMBOL_GPL(__fput_sync);
|
||||||
|
|
||||||
|
void __init files_init(void)
|
||||||
|
{
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/inode.c linux-5.4-aufs-mod/fs/inode.c
|
||||||
|
--- linux-5.4-aufs/fs/inode.c 2019-11-28 01:25:59.070925617 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/inode.c 2019-11-28 01:38:40.589895254 +0200
|
||||||
|
@@ -1682,6 +1682,7 @@ int update_time(struct inode *inode, str
|
||||||
|
|
||||||
|
return update_time(inode, time, flags);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(update_time);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* touch_atime - update the access time
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/namespace.c linux-5.4-aufs-mod/fs/namespace.c
|
||||||
|
--- linux-5.4-aufs/fs/namespace.c 2019-11-28 01:25:59.070925617 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/namespace.c 2019-11-28 01:38:40.589895254 +0200
|
||||||
|
@@ -431,6 +431,7 @@ void __mnt_drop_write(struct vfsmount *m
|
||||||
|
mnt_dec_writers(real_mount(mnt));
|
||||||
|
preempt_enable();
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(__mnt_drop_write);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mnt_drop_write - give up write access to a mount
|
||||||
|
@@ -781,6 +782,7 @@ int is_current_mnt_ns(struct vfsmount *m
|
||||||
|
{
|
||||||
|
return check_mnt(real_mount(mnt));
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(is_current_mnt_ns);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* vfsmount lock must be held for write
|
||||||
|
@@ -1903,6 +1905,7 @@ int iterate_mounts(int (*f)(struct vfsmo
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(iterate_mounts);
|
||||||
|
|
||||||
|
static void lock_mnt_tree(struct mount *mnt)
|
||||||
|
{
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/notify/group.c linux-5.4-aufs-mod/fs/notify/group.c
|
||||||
|
--- linux-5.4-aufs/fs/notify/group.c 2019-11-25 02:32:01.000000000 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/notify/group.c 2019-11-28 01:38:40.590895253 +0200
|
||||||
|
@@ -99,6 +99,7 @@ void fsnotify_get_group(struct fsnotify_
|
||||||
|
{
|
||||||
|
refcount_inc(&group->refcnt);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(fsnotify_get_group);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Drop a reference to a group. Free it if it's through.
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/open.c linux-5.4-aufs-mod/fs/open.c
|
||||||
|
--- linux-5.4-aufs/fs/open.c 2019-11-25 02:32:01.000000000 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/open.c 2019-11-28 01:38:48.762894928 +0200
|
||||||
|
@@ -65,6 +65,7 @@ int do_truncate(struct dentry *dentry, l
|
||||||
|
inode_unlock(dentry->d_inode);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(do_truncate);
|
||||||
|
|
||||||
|
long vfs_truncate(const struct path *path, loff_t length)
|
||||||
|
{
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/read_write.c linux-5.4-aufs-mod/fs/read_write.c
|
||||||
|
--- linux-5.4-aufs/fs/read_write.c 2019-11-28 01:25:59.070925617 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/read_write.c 2019-11-28 01:38:48.780894927 +0200
|
||||||
|
@@ -468,6 +468,7 @@ ssize_t vfs_read(struct file *file, char
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(vfs_read);
|
||||||
|
|
||||||
|
static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
|
||||||
|
{
|
||||||
|
@@ -508,6 +509,7 @@ vfs_readf_t vfs_readf(struct file *file)
|
||||||
|
return new_sync_read;
|
||||||
|
return ERR_PTR(-ENOSYS);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(vfs_readf);
|
||||||
|
|
||||||
|
vfs_writef_t vfs_writef(struct file *file)
|
||||||
|
{
|
||||||
|
@@ -519,6 +521,7 @@ vfs_writef_t vfs_writef(struct file *fil
|
||||||
|
return new_sync_write;
|
||||||
|
return ERR_PTR(-ENOSYS);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(vfs_writef);
|
||||||
|
|
||||||
|
ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
|
||||||
|
{
|
||||||
|
@@ -588,6 +591,7 @@ ssize_t vfs_write(struct file *file, con
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(vfs_write);
|
||||||
|
|
||||||
|
/* file_ppos returns &file->f_pos or NULL if file is stream */
|
||||||
|
static inline loff_t *file_ppos(struct file *file)
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/splice.c linux-5.4-aufs-mod/fs/splice.c
|
||||||
|
--- linux-5.4-aufs/fs/splice.c 2019-11-28 01:25:59.071925617 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/splice.c 2019-11-28 01:38:48.780894927 +0200
|
||||||
|
@@ -847,6 +847,7 @@ long do_splice_from(struct pipe_inode_in
|
||||||
|
|
||||||
|
return splice_write(pipe, out, ppos, len, flags);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(do_splice_from);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Attempt to initiate a splice from a file to a pipe.
|
||||||
|
@@ -876,6 +877,7 @@ long do_splice_to(struct file *in, loff_
|
||||||
|
|
||||||
|
return splice_read(in, ppos, pipe, len, flags);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(do_splice_to);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* splice_direct_to_actor - splices data directly between two non-pipes
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/sync.c linux-5.4-aufs-mod/fs/sync.c
|
||||||
|
--- linux-5.4-aufs/fs/sync.c 2019-11-28 01:25:59.071925617 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/sync.c 2019-11-28 01:38:48.780894927 +0200
|
||||||
|
@@ -39,6 +39,7 @@ int __sync_filesystem(struct super_block
|
||||||
|
sb->s_op->sync_fs(sb, wait);
|
||||||
|
return __sync_blockdev(sb->s_bdev, wait);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(__sync_filesystem);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write out and wait upon all dirty data associated with this
|
||||||
|
diff -Nurp linux-5.4-aufs/fs/xattr.c linux-5.4-aufs-mod/fs/xattr.c
|
||||||
|
--- linux-5.4-aufs/fs/xattr.c 2019-11-25 02:32:01.000000000 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/fs/xattr.c 2019-11-28 01:38:48.780894927 +0200
|
||||||
|
@@ -296,6 +296,7 @@ vfs_getxattr_alloc(struct dentry *dentry
|
||||||
|
*xattr_value = value;
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(vfs_getxattr_alloc);
|
||||||
|
|
||||||
|
ssize_t
|
||||||
|
__vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
|
||||||
|
diff -Nurp linux-5.4-aufs/kernel/locking/lockdep.c linux-5.4-aufs-mod/kernel/locking/lockdep.c
|
||||||
|
--- linux-5.4-aufs/kernel/locking/lockdep.c 2019-11-28 01:25:59.072925617 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/kernel/locking/lockdep.c 2019-11-28 01:38:48.780894927 +0200
|
||||||
|
@@ -174,6 +174,7 @@ inline struct lock_class *lockdep_hlock_
|
||||||
|
*/
|
||||||
|
return lock_classes + class_idx;
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(lockdep_hlock_class);
|
||||||
|
#define hlock_class(hlock) lockdep_hlock_class(hlock)
|
||||||
|
|
||||||
|
#ifdef CONFIG_LOCK_STAT
|
||||||
|
diff -Nurp linux-5.4-aufs/kernel/task_work.c linux-5.4-aufs-mod/kernel/task_work.c
|
||||||
|
--- linux-5.4-aufs/kernel/task_work.c 2019-11-25 02:32:01.000000000 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/kernel/task_work.c 2019-11-28 01:38:48.786894927 +0200
|
||||||
|
@@ -116,3 +116,4 @@ void task_work_run(void)
|
||||||
|
} while (work);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(task_work_run);
|
||||||
|
diff -Nurp linux-5.4-aufs/security/device_cgroup.c linux-5.4-aufs-mod/security/device_cgroup.c
|
||||||
|
--- linux-5.4-aufs/security/device_cgroup.c 2019-11-25 02:32:01.000000000 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/security/device_cgroup.c 2019-11-28 01:38:48.790894927 +0200
|
||||||
|
@@ -824,3 +824,4 @@ int __devcgroup_check_permission(short t
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(__devcgroup_check_permission);
|
||||||
|
diff -Nurp linux-5.4-aufs/security/security.c linux-5.4-aufs-mod/security/security.c
|
||||||
|
--- linux-5.4-aufs/security/security.c 2019-11-25 02:32:01.000000000 +0200
|
||||||
|
+++ linux-5.4-aufs-mod/security/security.c 2019-11-28 01:38:48.794894926 +0200
|
||||||
|
@@ -1036,6 +1036,7 @@ int security_path_rmdir(const struct pat
|
||||||
|
return 0;
|
||||||
|
return call_int_hook(path_rmdir, 0, dir, dentry);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(security_path_rmdir);
|
||||||
|
|
||||||
|
int security_path_unlink(const struct path *dir, struct dentry *dentry)
|
||||||
|
{
|
||||||
|
@@ -1052,6 +1053,7 @@ int security_path_symlink(const struct p
|
||||||
|
return 0;
|
||||||
|
return call_int_hook(path_symlink, 0, dir, dentry, old_name);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(security_path_symlink);
|
||||||
|
|
||||||
|
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
|
||||||
|
struct dentry *new_dentry)
|
||||||
|
@@ -1060,6 +1062,7 @@ int security_path_link(struct dentry *ol
|
||||||
|
return 0;
|
||||||
|
return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(security_path_link);
|
||||||
|
|
||||||
|
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
|
||||||
|
const struct path *new_dir, struct dentry *new_dentry,
|
||||||
|
@@ -1087,6 +1090,7 @@ int security_path_truncate(const struct
|
||||||
|
return 0;
|
||||||
|
return call_int_hook(path_truncate, 0, path);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(security_path_truncate);
|
||||||
|
|
||||||
|
int security_path_chmod(const struct path *path, umode_t mode)
|
||||||
|
{
|
||||||
|
@@ -1094,6 +1098,7 @@ int security_path_chmod(const struct pat
|
||||||
|
return 0;
|
||||||
|
return call_int_hook(path_chmod, 0, path, mode);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(security_path_chmod);
|
||||||
|
|
||||||
|
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
|
||||||
|
{
|
||||||
|
@@ -1101,6 +1106,7 @@ int security_path_chown(const struct pat
|
||||||
|
return 0;
|
||||||
|
return call_int_hook(path_chown, 0, path, uid, gid);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(security_path_chown);
|
||||||
|
|
||||||
|
int security_path_chroot(const struct path *path)
|
||||||
|
{
|
||||||
|
@@ -1201,6 +1207,7 @@ int security_inode_permission(struct ino
|
||||||
|
return 0;
|
||||||
|
return call_int_hook(inode_permission, 0, inode, mask);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(security_inode_permission);
|
||||||
|
|
||||||
|
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
|
||||||
|
{
|
||||||
|
@@ -1378,6 +1385,7 @@ int security_file_permission(struct file
|
||||||
|
|
||||||
|
return fsnotify_perm(file, mask);
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(security_file_permission);
|
||||||
|
|
||||||
|
int security_file_alloc(struct file *file)
|
||||||
|
{
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
diff -Nurp linux-5.3-aufs/include/uapi/linux/aufs_type.h linux-5.3-aufs-ver/include/uapi/linux/aufs_type.h
|
||||||
|
--- linux-5.3-aufs/include/uapi/linux/aufs_type.h 2019-09-24 16:13:44.012259519 +0300
|
||||||
|
+++ linux-5.3-aufs-ver/include/uapi/linux/aufs_type.h 2019-09-24 20:04:21.924707762 +0300
|
||||||
|
@@ -27,7 +27,7 @@
|
||||||
|
|
||||||
|
#include <linux/limits.h>
|
||||||
|
|
||||||
|
-#define AUFS_VERSION "5.x-rcN"
|
||||||
|
+#define AUFS_VERSION "5.4"
|
||||||
|
|
||||||
|
/* todo? move this to linux-2.6.19/include/magic.h */
|
||||||
|
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
|||||||
|
--- a/Makefile.orig 2019-11-25 03:32:01.000000000 +0300
|
||||||
|
+++ b/Makefile 2019-12-11 03:20:12.876664698 +0300
|
||||||
|
@@ -509,15 +509,6 @@
|
||||||
|
# ignore whole output directory
|
||||||
|
outputmakefile:
|
||||||
|
ifdef building_out_of_srctree
|
||||||
|
- $(Q)if [ -f $(srctree)/.config -o \
|
||||||
|
- -d $(srctree)/include/config -o \
|
||||||
|
- -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
|
||||||
|
- echo >&2 "***"; \
|
||||||
|
- echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \
|
||||||
|
- echo >&2 "*** in $(abs_srctree)";\
|
||||||
|
- echo >&2 "***"; \
|
||||||
|
- false; \
|
||||||
|
- fi
|
||||||
|
$(Q)ln -fsn $(srctree) source
|
||||||
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
|
||||||
|
$(Q)test -e .gitignore || \
|
||||||
@@ -0,0 +1,780 @@
|
|||||||
|
--- a/Makefile.orig 2019-11-25 03:32:01.000000000 +0300
|
||||||
|
+++ b/Makefile 2019-12-11 16:59:26.708807035 +0300
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
PATCHLEVEL = 4
|
||||||
|
SUBLEVEL = 0
|
||||||
|
EXTRAVERSION =
|
||||||
|
-NAME = Kleptomaniac Octopus
|
||||||
|
+NAME = Bobtail Squid
|
||||||
|
|
||||||
|
# *DOCUMENTATION*
|
||||||
|
# To see a list of typical targets execute "make help"
|
||||||
|
@@ -206,16 +206,30 @@
|
||||||
|
KBUILD_CHECKSRC = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
-# Use make M=dir or set the environment variable KBUILD_EXTMOD to specify the
|
||||||
|
-# directory of external module to build. Setting M= takes precedence.
|
||||||
|
+# Use make M=dir to specify directory of external module to build
|
||||||
|
+# Old syntax make ... SUBDIRS=$PWD is still supported
|
||||||
|
+# Setting the environment variable KBUILD_EXTMOD take precedence
|
||||||
|
+ifdef SUBDIRS
|
||||||
|
+ $(warning ================= WARNING ================)
|
||||||
|
+ $(warning 'SUBDIRS' will be removed after Linux 5.3)
|
||||||
|
+ $(warning )
|
||||||
|
+ $(warning If you are building an individual subdirectory)
|
||||||
|
+ $(warning in the kernel tree, you can do like this:)
|
||||||
|
+ $(warning $$ make path/to/dir/you/want/to/build/)
|
||||||
|
+ $(warning (Do not forget the trailing slash))
|
||||||
|
+ $(warning )
|
||||||
|
+ $(warning If you are building an external module,)
|
||||||
|
+ $(warning Please use 'M=' or 'KBUILD_EXTMOD' instead)
|
||||||
|
+ $(warning ==========================================)
|
||||||
|
+ KBUILD_EXTMOD ?= $(SUBDIRS)
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
ifeq ("$(origin M)", "command line")
|
||||||
|
KBUILD_EXTMOD := $(M)
|
||||||
|
endif
|
||||||
|
|
||||||
|
export KBUILD_CHECKSRC KBUILD_EXTMOD
|
||||||
|
|
||||||
|
-extmod-prefix = $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)
|
||||||
|
-
|
||||||
|
ifeq ($(abs_srctree),$(abs_objtree))
|
||||||
|
# building in the source tree
|
||||||
|
srctree := .
|
||||||
|
@@ -257,62 +271,52 @@
|
||||||
|
%asm-generic kernelversion %src-pkg
|
||||||
|
no-sync-config-targets := $(no-dot-config-targets) install %install \
|
||||||
|
kernelrelease
|
||||||
|
-single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/
|
||||||
|
|
||||||
|
-config-build :=
|
||||||
|
-mixed-build :=
|
||||||
|
-need-config := 1
|
||||||
|
-may-sync-config := 1
|
||||||
|
-single-build :=
|
||||||
|
+config-targets := 0
|
||||||
|
+mixed-targets := 0
|
||||||
|
+dot-config := 1
|
||||||
|
+may-sync-config := 1
|
||||||
|
|
||||||
|
ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
|
||||||
|
ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
|
||||||
|
- need-config :=
|
||||||
|
+ dot-config := 0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),)
|
||||||
|
ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
|
||||||
|
- may-sync-config :=
|
||||||
|
+ may-sync-config := 0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(KBUILD_EXTMOD),)
|
||||||
|
- may-sync-config :=
|
||||||
|
+ may-sync-config := 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(KBUILD_EXTMOD),)
|
||||||
|
ifneq ($(filter config %config,$(MAKECMDGOALS)),)
|
||||||
|
- config-build := 1
|
||||||
|
+ config-targets := 1
|
||||||
|
ifneq ($(words $(MAKECMDGOALS)),1)
|
||||||
|
- mixed-build := 1
|
||||||
|
+ mixed-targets := 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
-# We cannot build single targets and the others at the same time
|
||||||
|
-ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
|
||||||
|
- single-build := 1
|
||||||
|
- ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
|
||||||
|
- mixed-build := 1
|
||||||
|
- endif
|
||||||
|
-endif
|
||||||
|
-
|
||||||
|
# For "make -j clean all", "make -j mrproper defconfig all", etc.
|
||||||
|
ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),)
|
||||||
|
ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),)
|
||||||
|
- mixed-build := 1
|
||||||
|
+ mixed-targets := 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# install and modules_install need also be processed one by one
|
||||||
|
ifneq ($(filter install,$(MAKECMDGOALS)),)
|
||||||
|
ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
|
||||||
|
- mixed-build := 1
|
||||||
|
+ mixed-targets := 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
-ifdef mixed-build
|
||||||
|
+ifeq ($(mixed-targets),1)
|
||||||
|
# ===========================================================================
|
||||||
|
# We're called with mixed targets (*config and build targets).
|
||||||
|
# Handle them one by one.
|
||||||
|
@@ -328,7 +332,7 @@
|
||||||
|
$(MAKE) -f $(srctree)/Makefile $$i; \
|
||||||
|
done
|
||||||
|
|
||||||
|
-else # !mixed-build
|
||||||
|
+else
|
||||||
|
|
||||||
|
include scripts/Kbuild.include
|
||||||
|
|
||||||
|
@@ -388,7 +392,9 @@
|
||||||
|
export KCONFIG_CONFIG
|
||||||
|
|
||||||
|
# SHELL used by kbuild
|
||||||
|
-CONFIG_SHELL := sh
|
||||||
|
+CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
||||||
|
+ else if [ -x /bin/bash ]; then echo /bin/bash; \
|
||||||
|
+ else echo sh; fi ; fi)
|
||||||
|
|
||||||
|
HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null)
|
||||||
|
HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null)
|
||||||
|
@@ -425,7 +431,6 @@
|
||||||
|
PYTHON2 = python2
|
||||||
|
PYTHON3 = python3
|
||||||
|
CHECK = sparse
|
||||||
|
-BASH = bash
|
||||||
|
|
||||||
|
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
||||||
|
-Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
|
||||||
|
@@ -465,13 +470,12 @@
|
||||||
|
KBUILD_CFLAGS_KERNEL :=
|
||||||
|
KBUILD_AFLAGS_MODULE := -DMODULE
|
||||||
|
KBUILD_CFLAGS_MODULE := -DMODULE
|
||||||
|
-KBUILD_LDFLAGS_MODULE :=
|
||||||
|
-export KBUILD_LDS_MODULE := $(srctree)/scripts/module-common.lds
|
||||||
|
+KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
|
||||||
|
KBUILD_LDFLAGS :=
|
||||||
|
GCC_PLUGINS_CFLAGS :=
|
||||||
|
CLANG_FLAGS :=
|
||||||
|
|
||||||
|
-export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||||
|
+export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||||
|
export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE PAHOLE LEX YACC AWK INSTALLKERNEL
|
||||||
|
export PERL PYTHON PYTHON2 PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
||||||
|
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
|
||||||
|
@@ -482,6 +486,7 @@
|
||||||
|
export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
|
||||||
|
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
|
||||||
|
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
|
||||||
|
+export KBUILD_ARFLAGS
|
||||||
|
|
||||||
|
# Files to ignore in find ... statements
|
||||||
|
|
||||||
|
@@ -501,7 +506,6 @@
|
||||||
|
$(Q)rm -f .tmp_quiet_recordmcount
|
||||||
|
|
||||||
|
PHONY += outputmakefile
|
||||||
|
-# Before starting out-of-tree build, make sure the source tree is clean.
|
||||||
|
# outputmakefile generates a Makefile in the output directory, if using a
|
||||||
|
# separate output directory. This allows convenient use of make in the
|
||||||
|
# output directory.
|
||||||
|
@@ -509,15 +513,6 @@
|
||||||
|
# ignore whole output directory
|
||||||
|
outputmakefile:
|
||||||
|
ifdef building_out_of_srctree
|
||||||
|
- $(Q)if [ -f $(srctree)/.config -o \
|
||||||
|
- -d $(srctree)/include/config -o \
|
||||||
|
- -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
|
||||||
|
- echo >&2 "***"; \
|
||||||
|
- echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \
|
||||||
|
- echo >&2 "*** in $(abs_srctree)";\
|
||||||
|
- echo >&2 "***"; \
|
||||||
|
- false; \
|
||||||
|
- fi
|
||||||
|
$(Q)ln -fsn $(srctree) source
|
||||||
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
|
||||||
|
$(Q)test -e .gitignore || \
|
||||||
|
@@ -549,7 +544,7 @@
|
||||||
|
# and from include/config/auto.conf.cmd to detect the compiler upgrade.
|
||||||
|
CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1)
|
||||||
|
|
||||||
|
-ifdef config-build
|
||||||
|
+ifeq ($(config-targets),1)
|
||||||
|
# ===========================================================================
|
||||||
|
# *config targets only - make sure prerequisites are updated, and descend
|
||||||
|
# in scripts/kconfig to make the *config target
|
||||||
|
@@ -560,13 +555,13 @@
|
||||||
|
include arch/$(SRCARCH)/Makefile
|
||||||
|
export KBUILD_DEFCONFIG KBUILD_KCONFIG CC_VERSION_TEXT
|
||||||
|
|
||||||
|
-config: outputmakefile scripts_basic FORCE
|
||||||
|
+config: scripts_basic outputmakefile FORCE
|
||||||
|
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||||
|
|
||||||
|
-%config: outputmakefile scripts_basic FORCE
|
||||||
|
+%config: scripts_basic outputmakefile FORCE
|
||||||
|
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||||
|
|
||||||
|
-else #!config-build
|
||||||
|
+else
|
||||||
|
# ===========================================================================
|
||||||
|
# Build targets only - this includes vmlinux, arch specific targets, clean
|
||||||
|
# targets and others. In general all targets except *config targets.
|
||||||
|
@@ -599,7 +594,7 @@
|
||||||
|
# in addition to whatever we do anyway.
|
||||||
|
# Just "make" or "make all" shall build modules as well
|
||||||
|
|
||||||
|
-ifneq ($(filter all _all modules nsdeps,$(MAKECMDGOALS)),)
|
||||||
|
+ifneq ($(filter all _all modules,$(MAKECMDGOALS)),)
|
||||||
|
KBUILD_MODULES := 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
@@ -609,7 +604,7 @@
|
||||||
|
|
||||||
|
export KBUILD_MODULES KBUILD_BUILTIN
|
||||||
|
|
||||||
|
-ifdef need-config
|
||||||
|
+ifeq ($(dot-config),1)
|
||||||
|
include include/config/auto.conf
|
||||||
|
endif
|
||||||
|
|
||||||
|
@@ -650,10 +645,15 @@
|
||||||
|
export RETPOLINE_CFLAGS
|
||||||
|
export RETPOLINE_VDSO_CFLAGS
|
||||||
|
|
||||||
|
+# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
|
||||||
|
+# values of the respective KBUILD_* variables
|
||||||
|
+ARCH_CPPFLAGS :=
|
||||||
|
+ARCH_AFLAGS :=
|
||||||
|
+ARCH_CFLAGS :=
|
||||||
|
include arch/$(SRCARCH)/Makefile
|
||||||
|
|
||||||
|
-ifdef need-config
|
||||||
|
-ifdef may-sync-config
|
||||||
|
+ifeq ($(dot-config),1)
|
||||||
|
+ifeq ($(may-sync-config),1)
|
||||||
|
# Read in dependencies to all Kconfig* files, make sure to run syncconfig if
|
||||||
|
# changes are detected. This should be included after arch/$(SRCARCH)/Makefile
|
||||||
|
# because some architectures define CROSS_COMPILE there.
|
||||||
|
@@ -676,7 +676,7 @@
|
||||||
|
# The syncconfig should be executed only once to make all the targets.
|
||||||
|
%/auto.conf %/auto.conf.cmd %/tristate.conf: $(KCONFIG_CONFIG)
|
||||||
|
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
|
||||||
|
-else # !may-sync-config
|
||||||
|
+else
|
||||||
|
# External modules and some install targets need include/generated/autoconf.h
|
||||||
|
# and include/config/auto.conf but do not care if they are up-to-date.
|
||||||
|
# Use auto.conf to trigger the test
|
||||||
|
@@ -692,7 +692,7 @@
|
||||||
|
/bin/false)
|
||||||
|
|
||||||
|
endif # may-sync-config
|
||||||
|
-endif # need-config
|
||||||
|
+endif # $(dot-config)
|
||||||
|
|
||||||
|
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
|
||||||
|
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
|
||||||
|
@@ -700,12 +700,10 @@
|
||||||
|
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
|
||||||
|
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
|
||||||
|
|
||||||
|
-ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
|
||||||
|
-KBUILD_CFLAGS += -O2
|
||||||
|
-else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
|
||||||
|
-KBUILD_CFLAGS += -O3
|
||||||
|
-else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||||
|
-KBUILD_CFLAGS += -Os
|
||||||
|
+ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||||
|
+KBUILD_CFLAGS += -Os
|
||||||
|
+else
|
||||||
|
+KBUILD_CFLAGS += -O2
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED
|
||||||
|
@@ -753,11 +751,6 @@
|
||||||
|
# These warnings generated too much noise in a regular build.
|
||||||
|
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
|
||||||
|
KBUILD_CFLAGS += -Wno-unused-but-set-variable
|
||||||
|
-
|
||||||
|
-# Warn about unmarked fall-throughs in switch statement.
|
||||||
|
-# Disabled for clang while comment to attribute conversion happens and
|
||||||
|
-# https://github.com/ClangBuiltLinux/linux/issues/636 is discussed.
|
||||||
|
-KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,)
|
||||||
|
endif
|
||||||
|
|
||||||
|
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
|
||||||
|
@@ -852,6 +845,9 @@
|
||||||
|
# warn about C99 declaration after statement
|
||||||
|
KBUILD_CFLAGS += -Wdeclaration-after-statement
|
||||||
|
|
||||||
|
+# Warn about unmarked fall-throughs in switch statement.
|
||||||
|
+KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,)
|
||||||
|
+
|
||||||
|
# Variable Length Arrays (VLAs) should not be used anywhere in the kernel
|
||||||
|
KBUILD_CFLAGS += -Wvla
|
||||||
|
|
||||||
|
@@ -897,14 +893,18 @@
|
||||||
|
KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
|
||||||
|
endif
|
||||||
|
|
||||||
|
+# use the deterministic mode of AR if available
|
||||||
|
+KBUILD_ARFLAGS := $(call ar-option,D)
|
||||||
|
+
|
||||||
|
include scripts/Makefile.kasan
|
||||||
|
include scripts/Makefile.extrawarn
|
||||||
|
include scripts/Makefile.ubsan
|
||||||
|
|
||||||
|
-# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
|
||||||
|
-KBUILD_CPPFLAGS += $(KCPPFLAGS)
|
||||||
|
-KBUILD_AFLAGS += $(KAFLAGS)
|
||||||
|
-KBUILD_CFLAGS += $(KCFLAGS)
|
||||||
|
+# Add any arch overrides and user supplied CPPFLAGS, AFLAGS and CFLAGS as the
|
||||||
|
+# last assignments
|
||||||
|
+KBUILD_CPPFLAGS += $(ARCH_CPPFLAGS) $(KCPPFLAGS)
|
||||||
|
+KBUILD_AFLAGS += $(ARCH_AFLAGS) $(KAFLAGS)
|
||||||
|
+KBUILD_CFLAGS += $(ARCH_CFLAGS) $(KCFLAGS)
|
||||||
|
|
||||||
|
KBUILD_LDFLAGS_MODULE += --build-id
|
||||||
|
LDFLAGS_vmlinux += --build-id
|
||||||
|
@@ -913,13 +913,6 @@
|
||||||
|
LDFLAGS_vmlinux += $(call ld-option, -X,)
|
||||||
|
endif
|
||||||
|
|
||||||
|
-ifeq ($(CONFIG_RELR),y)
|
||||||
|
-LDFLAGS_vmlinux += --pack-dyn-relocs=relr
|
||||||
|
-endif
|
||||||
|
-
|
||||||
|
-# make the checker run with the right architecture
|
||||||
|
-CHECKFLAGS += --arch=$(ARCH)
|
||||||
|
-
|
||||||
|
# insure the checker run with the right endianness
|
||||||
|
CHECKFLAGS += $(if $(CONFIG_CPU_BIG_ENDIAN),-mbig-endian,-mlittle-endian)
|
||||||
|
|
||||||
|
@@ -1010,7 +1003,7 @@
|
||||||
|
|
||||||
|
PHONY += prepare0
|
||||||
|
|
||||||
|
-export MODORDER := $(extmod-prefix)modules.order
|
||||||
|
+export MODORDER := $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)modules.order
|
||||||
|
|
||||||
|
ifeq ($(KBUILD_EXTMOD),)
|
||||||
|
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
|
||||||
|
@@ -1023,9 +1016,6 @@
|
||||||
|
$(patsubst %/,%,$(filter %/, $(init-) $(core-) \
|
||||||
|
$(drivers-) $(net-) $(libs-) $(virt-))))
|
||||||
|
|
||||||
|
-build-dirs := $(vmlinux-dirs)
|
||||||
|
-clean-dirs := $(vmlinux-alldirs)
|
||||||
|
-
|
||||||
|
init-y := $(patsubst %/, %/built-in.a, $(init-y))
|
||||||
|
core-y := $(patsubst %/, %/built-in.a, $(core-y))
|
||||||
|
drivers-y := $(patsubst %/, %/built-in.a, $(drivers-y))
|
||||||
|
@@ -1040,7 +1030,7 @@
|
||||||
|
export KBUILD_VMLINUX_LIBS := $(libs-y1)
|
||||||
|
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
|
||||||
|
export LDFLAGS_vmlinux
|
||||||
|
-# used by scripts/Makefile.package
|
||||||
|
+# used by scripts/package/Makefile
|
||||||
|
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) LICENSES arch include scripts tools)
|
||||||
|
|
||||||
|
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)
|
||||||
|
@@ -1048,7 +1038,7 @@
|
||||||
|
# Recurse until adjust_autoksyms.sh is satisfied
|
||||||
|
PHONY += autoksyms_recursive
|
||||||
|
ifdef CONFIG_TRIM_UNUSED_KSYMS
|
||||||
|
-autoksyms_recursive: descend modules.order
|
||||||
|
+autoksyms_recursive: $(vmlinux-deps) modules.order
|
||||||
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
|
||||||
|
"$(MAKE) -f $(srctree)/Makefile vmlinux"
|
||||||
|
endif
|
||||||
|
@@ -1080,7 +1070,17 @@
|
||||||
|
|
||||||
|
# The actual objects are generated when descending,
|
||||||
|
# make sure no implicit rule kicks in
|
||||||
|
-$(sort $(vmlinux-deps)): descend ;
|
||||||
|
+$(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
|
||||||
|
+
|
||||||
|
+# Handle descending into subdirectories listed in $(vmlinux-dirs)
|
||||||
|
+# Preset locale variables to speed up the build process. Limit locale
|
||||||
|
+# tweaks to this spot to avoid wrong language settings when running
|
||||||
|
+# make menuconfig etc.
|
||||||
|
+# Error messages still appears in the original language
|
||||||
|
+
|
||||||
|
+PHONY += $(vmlinux-dirs)
|
||||||
|
+$(vmlinux-dirs): prepare
|
||||||
|
+ $(Q)$(MAKE) $(build)=$@ need-builtin=1 need-modorder=1
|
||||||
|
|
||||||
|
filechk_kernel.release = \
|
||||||
|
echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
|
||||||
|
@@ -1102,9 +1102,24 @@
|
||||||
|
# archprepare is used in arch Makefiles and when processed asm symlink,
|
||||||
|
# version.h and scripts_basic is processed / created.
|
||||||
|
|
||||||
|
-PHONY += prepare archprepare
|
||||||
|
+PHONY += prepare archprepare prepare3
|
||||||
|
|
||||||
|
-archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \
|
||||||
|
+# prepare3 is used to check if we are building in a separate output directory,
|
||||||
|
+# and if so do:
|
||||||
|
+# 1) Check that make has not been executed in the kernel src $(srctree)
|
||||||
|
+prepare3: include/config/kernel.release
|
||||||
|
+ifdef building_out_of_srctree
|
||||||
|
+ @$(kecho) ' Using $(srctree) as source for kernel'
|
||||||
|
+ $(Q)if [ -f $(srctree)/.config -o \
|
||||||
|
+ -d $(srctree)/include/config -o \
|
||||||
|
+ -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
|
||||||
|
+ echo >&2 " $(srctree) is not clean, please run 'make ARCH=$(ARCH) mrproper'"; \
|
||||||
|
+ echo >&2 " in the '$(srctree)' directory.";\
|
||||||
|
+ /bin/false; \
|
||||||
|
+ fi;
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+archprepare: archheaders archscripts scripts prepare3 outputmakefile \
|
||||||
|
asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h
|
||||||
|
|
||||||
|
prepare0: archprepare
|
||||||
|
@@ -1220,15 +1235,16 @@
|
||||||
|
kselftest:
|
||||||
|
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
|
||||||
|
|
||||||
|
-kselftest-%: FORCE
|
||||||
|
- $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests $*
|
||||||
|
+PHONY += kselftest-clean
|
||||||
|
+kselftest-clean:
|
||||||
|
+ $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests clean
|
||||||
|
|
||||||
|
PHONY += kselftest-merge
|
||||||
|
kselftest-merge:
|
||||||
|
$(if $(wildcard $(objtree)/.config),, $(error No .config exists, config your kernel first!))
|
||||||
|
$(Q)find $(srctree)/tools/testing/selftests -name config | \
|
||||||
|
xargs $(srctree)/scripts/kconfig/merge_config.sh -m $(objtree)/.config
|
||||||
|
- $(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
|
||||||
|
+ +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Devicetree files
|
||||||
|
@@ -1239,11 +1255,11 @@
|
||||||
|
|
||||||
|
ifneq ($(dtstree),)
|
||||||
|
|
||||||
|
-%.dtb: include/config/kernel.release scripts_dtc
|
||||||
|
+%.dtb: prepare3 scripts_dtc
|
||||||
|
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
|
||||||
|
|
||||||
|
PHONY += dtbs dtbs_install dt_binding_check
|
||||||
|
-dtbs dtbs_check: include/config/kernel.release scripts_dtc
|
||||||
|
+dtbs dtbs_check: prepare3 scripts_dtc
|
||||||
|
$(Q)$(MAKE) $(build)=$(dtstree)
|
||||||
|
|
||||||
|
dtbs_check: export CHECK_DTBS=1
|
||||||
|
@@ -1282,16 +1298,17 @@
|
||||||
|
|
||||||
|
PHONY += modules
|
||||||
|
modules: $(if $(KBUILD_BUILTIN),vmlinux) modules.order modules.builtin
|
||||||
|
+ @$(kecho) ' Building modules, stage 2.';
|
||||||
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||||
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh
|
||||||
|
|
||||||
|
-modules.order: descend
|
||||||
|
- $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(build-dirs)) > $@
|
||||||
|
+modules.order: $(vmlinux-dirs)
|
||||||
|
+ $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(vmlinux-dirs)) > $@
|
||||||
|
|
||||||
|
-modbuiltin-dirs := $(addprefix _modbuiltin_, $(build-dirs))
|
||||||
|
+modbuiltin-dirs := $(addprefix _modbuiltin_, $(vmlinux-dirs))
|
||||||
|
|
||||||
|
modules.builtin: $(modbuiltin-dirs)
|
||||||
|
- $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(build-dirs)) > $@
|
||||||
|
+ $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(vmlinux-dirs)) > $@
|
||||||
|
|
||||||
|
PHONY += $(modbuiltin-dirs)
|
||||||
|
# tristate.conf is not included from this Makefile. Add it as a prerequisite
|
||||||
|
@@ -1364,14 +1381,12 @@
|
||||||
|
|
||||||
|
# Directories & files removed with 'make mrproper'
|
||||||
|
MRPROPER_DIRS += include/config include/generated \
|
||||||
|
- arch/$(SRCARCH)/include/generated .tmp_objdiff \
|
||||||
|
- debian/ snap/ tar-install/
|
||||||
|
+ arch/$(SRCARCH)/include/generated .tmp_objdiff
|
||||||
|
MRPROPER_FILES += .config .config.old .version \
|
||||||
|
Module.symvers \
|
||||||
|
signing_key.pem signing_key.priv signing_key.x509 \
|
||||||
|
x509.genkey extra_certificates signing_key.x509.keyid \
|
||||||
|
- signing_key.x509.signer vmlinux-gdb.py \
|
||||||
|
- *.spec
|
||||||
|
+ signing_key.x509.signer vmlinux-gdb.py
|
||||||
|
|
||||||
|
# Directories & files removed with 'make distclean'
|
||||||
|
DISTCLEAN_DIRS +=
|
||||||
|
@@ -1381,8 +1396,11 @@
|
||||||
|
#
|
||||||
|
clean: rm-dirs := $(CLEAN_DIRS)
|
||||||
|
clean: rm-files := $(CLEAN_FILES)
|
||||||
|
+clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs))
|
||||||
|
|
||||||
|
-PHONY += archclean vmlinuxclean
|
||||||
|
+PHONY += $(clean-dirs) clean archclean vmlinuxclean
|
||||||
|
+$(clean-dirs):
|
||||||
|
+ $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
||||||
|
|
||||||
|
vmlinuxclean:
|
||||||
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
|
||||||
|
@@ -1423,11 +1441,13 @@
|
||||||
|
|
||||||
|
# Packaging of the kernel to various formats
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
+package-dir := scripts/package
|
||||||
|
|
||||||
|
%src-pkg: FORCE
|
||||||
|
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(package-dir) $@
|
||||||
|
%pkg: include/config/kernel.release FORCE
|
||||||
|
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(package-dir) $@
|
||||||
|
+
|
||||||
|
|
||||||
|
# Brief documentation of the typical targets used
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
@@ -1480,9 +1500,6 @@
|
||||||
|
@echo ' headerdep - Detect inclusion cycles in headers'
|
||||||
|
@echo ' coccicheck - Check with Coccinelle'
|
||||||
|
@echo ''
|
||||||
|
- @echo 'Tools:'
|
||||||
|
- @echo ' nsdeps - Generate missing symbol namespace dependencies'
|
||||||
|
- @echo ''
|
||||||
|
@echo 'Kernel selftest:'
|
||||||
|
@echo ' kselftest - Build and run kernel selftest (run as root)'
|
||||||
|
@echo ' Build, install, and boot kernel before'
|
||||||
|
@@ -1493,10 +1510,8 @@
|
||||||
|
@echo ''
|
||||||
|
@$(if $(dtstree), \
|
||||||
|
echo 'Devicetree:'; \
|
||||||
|
- echo '* dtbs - Build device tree blobs for enabled boards'; \
|
||||||
|
- echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \
|
||||||
|
- echo ' dt_binding_check - Validate device tree binding documents'; \
|
||||||
|
- echo ' dtbs_check - Validate device tree source files';\
|
||||||
|
+ echo '* dtbs - Build device tree blobs for enabled boards'; \
|
||||||
|
+ echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \
|
||||||
|
echo '')
|
||||||
|
|
||||||
|
@echo 'Userspace tools targets:'
|
||||||
|
@@ -1504,7 +1519,7 @@
|
||||||
|
@echo ' or "cd tools; make help"'
|
||||||
|
@echo ''
|
||||||
|
@echo 'Kernel packaging:'
|
||||||
|
- @$(MAKE) -f $(srctree)/scripts/Makefile.package help
|
||||||
|
+ @$(MAKE) $(build)=$(package-dir) help
|
||||||
|
@echo ''
|
||||||
|
@echo 'Documentation targets:'
|
||||||
|
@$(MAKE) -f $(srctree)/Documentation/Makefile dochelp
|
||||||
|
@@ -1529,7 +1544,7 @@
|
||||||
|
@echo ' make C=1 [targets] Check re-compiled c source with $$CHECK (sparse by default)'
|
||||||
|
@echo ' make C=2 [targets] Force check of all c source with $$CHECK'
|
||||||
|
@echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
|
||||||
|
- @echo ' make W=n [targets] Enable extra build checks, n=1,2,3 where'
|
||||||
|
+ @echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where'
|
||||||
|
@echo ' 1: warnings which may be relevant and do not occur too often'
|
||||||
|
@echo ' 2: warnings which occur quite often but may still be relevant'
|
||||||
|
@echo ' 3: more obscure warnings, can most likely be ignored'
|
||||||
|
@@ -1558,7 +1573,7 @@
|
||||||
|
DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
|
||||||
|
linkcheckdocs dochelp refcheckdocs
|
||||||
|
PHONY += $(DOC_TARGETS)
|
||||||
|
-$(DOC_TARGETS):
|
||||||
|
+$(DOC_TARGETS): scripts_basic FORCE
|
||||||
|
$(Q)$(MAKE) $(build)=Documentation $@
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
@@ -1603,9 +1618,13 @@
|
||||||
|
echo " is missing; modules will have no dependencies and modversions."; \
|
||||||
|
echo )
|
||||||
|
|
||||||
|
-build-dirs := $(KBUILD_EXTMOD)
|
||||||
|
-PHONY += modules
|
||||||
|
-modules: descend $(objtree)/Module.symvers
|
||||||
|
+module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
|
||||||
|
+PHONY += $(module-dirs) modules
|
||||||
|
+$(module-dirs): prepare $(objtree)/Module.symvers
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) need-modorder=1
|
||||||
|
+
|
||||||
|
+modules: $(module-dirs)
|
||||||
|
+ @$(kecho) ' Building modules, stage 2.';
|
||||||
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||||
|
|
||||||
|
PHONY += modules_install
|
||||||
|
@@ -1621,12 +1640,13 @@
|
||||||
|
_emodinst_post: _emodinst_
|
||||||
|
$(call cmd,depmod)
|
||||||
|
|
||||||
|
-clean-dirs := $(KBUILD_EXTMOD)
|
||||||
|
-clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
|
||||||
|
+clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD))
|
||||||
|
|
||||||
|
-PHONY += /
|
||||||
|
-/:
|
||||||
|
- @echo >&2 '"$(MAKE) /" is no longer supported. Please use "$(MAKE) ./" instead.'
|
||||||
|
+PHONY += $(clean-dirs) clean
|
||||||
|
+$(clean-dirs):
|
||||||
|
+ $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
||||||
|
+
|
||||||
|
+clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
|
||||||
|
|
||||||
|
PHONY += help
|
||||||
|
help:
|
||||||
|
@@ -1641,21 +1661,6 @@
|
||||||
|
PHONY += prepare
|
||||||
|
endif # KBUILD_EXTMOD
|
||||||
|
|
||||||
|
-# Handle descending into subdirectories listed in $(build-dirs)
|
||||||
|
-# Preset locale variables to speed up the build process. Limit locale
|
||||||
|
-# tweaks to this spot to avoid wrong language settings when running
|
||||||
|
-# make menuconfig etc.
|
||||||
|
-# Error messages still appears in the original language
|
||||||
|
-PHONY += descend $(build-dirs)
|
||||||
|
-descend: $(build-dirs)
|
||||||
|
-$(build-dirs): prepare
|
||||||
|
- $(Q)$(MAKE) $(build)=$@ single-build=$(single-build) need-builtin=1 need-modorder=1
|
||||||
|
-
|
||||||
|
-clean-dirs := $(addprefix _clean_, $(clean-dirs))
|
||||||
|
-PHONY += $(clean-dirs) clean
|
||||||
|
-$(clean-dirs):
|
||||||
|
- $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
||||||
|
-
|
||||||
|
clean: $(clean-dirs)
|
||||||
|
$(call cmd,rmdirs)
|
||||||
|
$(call cmd,rmfiles)
|
||||||
|
@@ -1664,7 +1669,7 @@
|
||||||
|
-o -name '*.ko.*' \
|
||||||
|
-o -name '*.dtb' -o -name '*.dtb.S' -o -name '*.dt.yaml' \
|
||||||
|
-o -name '*.dwo' -o -name '*.lst' \
|
||||||
|
- -o -name '*.su' -o -name '*.mod' -o -name '*.ns_deps' \
|
||||||
|
+ -o -name '*.su' -o -name '*.mod' \
|
||||||
|
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
|
||||||
|
-o -name '*.lex.c' -o -name '*.tab.[ch]' \
|
||||||
|
-o -name '*.asn1.[ch]' \
|
||||||
|
@@ -1677,20 +1682,11 @@
|
||||||
|
# Generate tags for editors
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
quiet_cmd_tags = GEN $@
|
||||||
|
- cmd_tags = $(BASH) $(srctree)/scripts/tags.sh $@
|
||||||
|
+ cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
|
||||||
|
|
||||||
|
tags TAGS cscope gtags: FORCE
|
||||||
|
$(call cmd,tags)
|
||||||
|
|
||||||
|
-# Script to generate missing namespace dependencies
|
||||||
|
-# ---------------------------------------------------------------------------
|
||||||
|
-
|
||||||
|
-PHONY += nsdeps
|
||||||
|
-
|
||||||
|
-nsdeps: modules
|
||||||
|
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost nsdeps
|
||||||
|
- $(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@
|
||||||
|
-
|
||||||
|
# Scripts to check various things for consistency
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -1707,7 +1703,7 @@
|
||||||
|
| xargs $(PERL) -w $(srctree)/scripts/checkversion.pl
|
||||||
|
|
||||||
|
coccicheck:
|
||||||
|
- $(Q)$(BASH) $(srctree)/scripts/$@
|
||||||
|
+ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@
|
||||||
|
|
||||||
|
namespacecheck:
|
||||||
|
$(PERL) $(srctree)/scripts/namespace.pl
|
||||||
|
@@ -1755,47 +1751,45 @@
|
||||||
|
|
||||||
|
# Single targets
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
-# To build individual files in subdirectories, you can do like this:
|
||||||
|
-#
|
||||||
|
-# make foo/bar/baz.s
|
||||||
|
-#
|
||||||
|
-# The supported suffixes for single-target are listed in 'single-targets'
|
||||||
|
-#
|
||||||
|
-# To build only under specific subdirectories, you can do like this:
|
||||||
|
-#
|
||||||
|
-# make foo/bar/baz/
|
||||||
|
-
|
||||||
|
-ifdef single-build
|
||||||
|
-
|
||||||
|
-single-all := $(filter $(single-targets), $(MAKECMDGOALS))
|
||||||
|
-
|
||||||
|
-# .ko is special because modpost is needed
|
||||||
|
-single-ko := $(sort $(filter %.ko, $(single-all)))
|
||||||
|
-single-no-ko := $(sort $(patsubst %.ko,%.mod, $(single-all)))
|
||||||
|
-
|
||||||
|
-$(single-ko): single_modpost
|
||||||
|
- @:
|
||||||
|
-$(single-no-ko): descend
|
||||||
|
- @:
|
||||||
|
-
|
||||||
|
+# Single targets are compatible with:
|
||||||
|
+# - build with mixed source and output
|
||||||
|
+# - build with separate output dir 'make O=...'
|
||||||
|
+# - external modules
|
||||||
|
+#
|
||||||
|
+# target-dir => where to store outputfile
|
||||||
|
+# build-dir => directory in kernel source tree to use
|
||||||
|
+
|
||||||
|
+build-target = $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD)/)$@
|
||||||
|
+build-dir = $(patsubst %/,%,$(dir $(build-target)))
|
||||||
|
+
|
||||||
|
+%.i: prepare FORCE
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||||
|
+%.ll: prepare FORCE
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||||
|
+%.lst: prepare FORCE
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||||
|
+%.o: prepare FORCE
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||||
|
+%.s: prepare FORCE
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||||
|
+%.symtypes: prepare FORCE
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||||
|
ifeq ($(KBUILD_EXTMOD),)
|
||||||
|
-# For the single build of in-tree modules, use a temporary file to avoid
|
||||||
|
+# For the single build of an in-tree module, use a temporary file to avoid
|
||||||
|
# the situation of modules_install installing an invalid modules.order.
|
||||||
|
-MODORDER := .modules.tmp
|
||||||
|
+%.ko: MODORDER := .modules.tmp
|
||||||
|
endif
|
||||||
|
-
|
||||||
|
-PHONY += single_modpost
|
||||||
|
-single_modpost: $(single-no-ko)
|
||||||
|
- $(Q){ $(foreach m, $(single-ko), echo $(extmod-prefix)$m;) } > $(MODORDER)
|
||||||
|
+%.ko: prepare FORCE
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target:.ko=.mod)
|
||||||
|
+ $(Q)echo $(build-target) > $(MODORDER)
|
||||||
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||||
|
|
||||||
|
-KBUILD_MODULES := 1
|
||||||
|
-
|
||||||
|
-export KBUILD_SINGLE_TARGETS := $(addprefix $(extmod-prefix), $(single-no-ko))
|
||||||
|
+# Modules
|
||||||
|
+PHONY += /
|
||||||
|
+/: ./
|
||||||
|
|
||||||
|
-single-build = $(if $(filter-out $@/, $(single-no-ko)),1)
|
||||||
|
-
|
||||||
|
-endif
|
||||||
|
+%/: prepare FORCE
|
||||||
|
+ $(Q)$(MAKE) KBUILD_MODULES=1 $(build)=$(build-dir) need-modorder=1
|
||||||
|
|
||||||
|
# FIXME Should go into a make.lib or something
|
||||||
|
# ===========================================================================
|
||||||
|
@@ -1816,9 +1810,9 @@
|
||||||
|
|
||||||
|
-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)
|
||||||
|
|
||||||
|
-endif # config-targets
|
||||||
|
-endif # mixed-build
|
||||||
|
-endif # need-sub-make
|
||||||
|
+endif # ifeq ($(config-targets),1)
|
||||||
|
+endif # ifeq ($(mixed-targets),1)
|
||||||
|
+endif # need-sub-make
|
||||||
|
|
||||||
|
PHONY += FORCE
|
||||||
|
FORCE:
|
||||||
Regular → Executable
+23
-8
@@ -12,7 +12,7 @@
|
|||||||
<IsA>kernel</IsA>
|
<IsA>kernel</IsA>
|
||||||
<Summary>The Linux kernel (the core of the Linux operating system) for Pisi Linux</Summary>
|
<Summary>The Linux kernel (the core of the Linux operating system) for Pisi Linux</Summary>
|
||||||
<Description>kernel contains the Linux kernel, the core of any Linux operating system. The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc.</Description>
|
<Description>kernel contains the Linux kernel, the core of any Linux operating system. The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc.</Description>
|
||||||
<Archive sha1sum="eb09a8e0483a9ec40bdb767551d0eda27f7c221a" type="targz">https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.tar.gz</Archive>
|
<Archive sha1sum="8fd0449a462c77f3e5b35848f4bf3c41411702d6" type="targz">https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.4.tar.gz</Archive>
|
||||||
<AdditionalFiles>
|
<AdditionalFiles>
|
||||||
<AdditionalFile target="configs/kernel-i686-config">configs/kernel-i686-config</AdditionalFile>
|
<AdditionalFile target="configs/kernel-i686-config">configs/kernel-i686-config</AdditionalFile>
|
||||||
<AdditionalFile target="configs/kernel-x86_64-config">configs/kernel-x86_64-config</AdditionalFile>
|
<AdditionalFile target="configs/kernel-x86_64-config">configs/kernel-x86_64-config</AdditionalFile>
|
||||||
@@ -29,16 +29,20 @@
|
|||||||
<Dependency>zlib-devel</Dependency>
|
<Dependency>zlib-devel</Dependency>
|
||||||
<Dependency>xz-devel</Dependency>
|
<Dependency>xz-devel</Dependency>
|
||||||
<Dependency>openssl-devel</Dependency>
|
<Dependency>openssl-devel</Dependency>
|
||||||
|
<Dependency>rsync</Dependency>
|
||||||
</BuildDependencies>
|
</BuildDependencies>
|
||||||
<Patches>
|
<Patches>
|
||||||
<!-- Linux patches -->
|
<!-- Linux patches -->
|
||||||
<Patch level="1" compressionType="xz">patches/linux/patch-4.19.56.xz</Patch>
|
<Patch level="1" compressionType="xz">patches/linux/patch-5.4.6.xz</Patch>
|
||||||
<!-- Mageia Linux patches // compatible with http://svnweb.mageia.org/packages/cauldron/kernel/releases/4.14.44/2.mga7/PATCHES/patches/series-->
|
<!-- Mageia Linux patches-->
|
||||||
<!--stable patches-->
|
<Patch level="1">patches/mageia/fs-aufs-5.4.patch</Patch>
|
||||||
<!--CVE-2016-8405-->
|
<Patch level="1">patches/mageia/fs-aufs-5.4-modular.patch</Patch>
|
||||||
<!--other patches-->
|
<Patch level="1">patches/mageia/fs-vboxsf.patch</Patch>
|
||||||
<Patch level="1">patches/mageia_4_19/fs-aufs-4.19.patch</Patch>
|
<Patch level="1">patches/mageia/CVE-2019-12379.patch</Patch>
|
||||||
<Patch level="1">patches/mageia_4_19/fs-aufs-4.19-modular.patch</Patch>
|
<!-- <Patch level="1">patches/mageia/disable-mrproper-in-devel-rpms.patch</Patch> -->
|
||||||
|
|
||||||
|
<!-- Build fix -->
|
||||||
|
<Patch level="1">patches/pisilinux/revert-Makefile.patch</Patch>
|
||||||
</Patches>
|
</Patches>
|
||||||
</Source>
|
</Source>
|
||||||
|
|
||||||
@@ -94,6 +98,17 @@
|
|||||||
</Package>
|
</Package>
|
||||||
|
|
||||||
<History>
|
<History>
|
||||||
|
<Update release="28">
|
||||||
|
<Date>2019-12-27</Date>
|
||||||
|
<Version>5.4.6</Version>
|
||||||
|
<Comment>Version Bump.</Comment>
|
||||||
|
<Type package="kernel">security</Type>
|
||||||
|
<Requires>
|
||||||
|
<Action package="kernel">systemRestart</Action>
|
||||||
|
</Requires>
|
||||||
|
<Name>Idris Kalp</Name>
|
||||||
|
<Email>idriskalp@gmail.com</Email>
|
||||||
|
</Update>
|
||||||
<Update release="27">
|
<Update release="27">
|
||||||
<Date>2019-06-25</Date>
|
<Date>2019-06-25</Date>
|
||||||
<Version>4.19.56</Version>
|
<Version>4.19.56</Version>
|
||||||
|
|||||||
Reference in New Issue
Block a user