guncelleme

This commit is contained in:
milisarge 2017-06-06 00:07:52 +03:00
parent ef53612b53
commit 3412d7213d
36 changed files with 1 additions and 133442 deletions

View File

@ -2,6 +2,7 @@
# lfs dizini oluşturup ortama girdikten sonra bu betiği çalıştırabilirsiniz,bütün ortam içi işlemler yapılacaktır.
masaustu="xfce4"
mps -GG && mps -G
mps kur linux-firmware
mps kur kernel
mps -kuruld /root/talimatname/temel-ek/derleme.sira
mps kur $masaustu

View File

@ -8,7 +8,5 @@ rpcbind
nfs-utils
jfsutils
lsb-release
linux-firmware
kernel-lts
dracut
vim

View File

@ -1,45 +0,0 @@
#
# /boot/grub/grub.cfg - sample grub2 configuration file
#
# This is only a sample, you will need to check/edit the root value
# or UUID used for your configuration.
# See the official grub documentation for more information.
# Set menu colors
set menu_color_normal=white/blue
set menu_color_highlight=light-blue/white
# Set menu display time
set timeout=10
# Set the default boot entry (first is 0)
set default=0
# Set the root variable - grub2 uses this to find files if the
# root device is not specified in the entry itself.
# It can be set explicitly like so:
#set root='(hd0,msdos2)'
# Or it can be set using grub2's builtin search feature like so:
#search --no-floppy --fs-uuid --set root xxxxxxxx-yyyy-zzzz-aaaa-bbbbbbbbbbbb
# The string xxxxxxxx-yyyy-zzzz-aaaa-bbbbbbbbbbbb should be replaced with
# the proper UUID for the root device. It can be found using 'blkid' from
# util-linux.
# Boot entries:
menuentry 'milis-atilla' {
linux /boot/kernel root=/dev/sda1 ro quiet
initrd /boot/initramfs
}
# Windows 7
menuentry "Windows 7" {
set root='(hd0,msdos1)'
chainloader +1
}

View File

@ -1,11 +0,0 @@
--- 00_header.in.orig 2015-01-01 16:27:17.433852566 -0600
+++ 00_header.in 2015-01-01 16:27:28.603852605 -0600
@@ -142,7 +142,7 @@
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT}"` ; then
EOF
else
- for dir in "${pkgdatadir}" "`echo '/@bootdirname@/@grubdirname@' | sed "s,//*,/,g"`" /usr/share/grub ; do
+ for dir in "${pkgdatadir}" "`echo '/@bootdirname@/@grubdirname@' | sed "s,//*,/,g"`" /usr/share/grub /usr/lib/grub/fonts ; do
for basename in unicode unifont ascii; do
path="${dir}/${basename}.pf2"
if is_path_readable_by_grub "${path}" > /dev/null ; then

View File

@ -1,10 +0,0 @@
--- 10_linux.in.orig 2012-09-05 13:34:26.947842426 -0500
+++ 10_linux.in 2012-09-05 13:34:55.967842887 -0500
@@ -193,6 +193,7 @@
initrd=
for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
"initrd-${version}" "initramfs-${version}.img" \
+ "initramfs-${version}.gz" \
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
"initramfs-genkernel-${version}" \

View File

@ -1,30 +0,0 @@
# Description: A Multiboot boot loader
# URL: http://www.gnu.org/software/grub/
# Pcakager: milisarge
# Depends on:
name=grub
version=2.02-beta3
release=1
source=(http://alpha.gnu.org/gnu/grub/grub-2.02~beta3.tar.xz \
grub2-00_header.diff grub2-10_linux.diff grub.cfg.sample)
build() {
export CFLAGS="${CFLAGS} -Wno-error"
cd grub-2.02~beta3
# fix for glibc 'gets' removal
sed -i -e '/gets is a/d' grub-core/gnulib/stdio.in.h
patch -i $SRC/grub2-00_header.diff util/grub.d/00_header.in
patch -i $SRC/grub2-10_linux.diff util/grub.d/10_linux.in
./configure --prefix=/usr \
--sysconfdir=/etc \
--enable-device-mapper \
--disable-efiemu \
--disable-grub-mount
make
make DESTDIR=$PKG install
rm -rf $PKG/usr/share/{info,grub/themes}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,150 +0,0 @@
# Description: The latest stable kernel version with BFQ patch
# URL: http://algo.ing.unimo.it/people/paolo/disk_sched/sources.php
# Packagers: pierre at nutyx dot org, tnut at nutyx dot org, berlius at nutyx dot com
PKGMK_IGNORE_UNPACK="yes"
PKGMK_NO_STRIP="yes"
PKGMK_GROUPS=(devel doc)
name=kernel-bfq
version=4.3
release=1
_version=${version%.*}
source=(https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-$version.tar.xz
https://pf.natalenko.name/mirrors/bfq/4.3.0-v7r8/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r8-4.3.patch
https://pf.natalenko.name/mirrors/bfq/4.3.0-v7r8/0002-block-introduce-the-BFQ-v7r8-I-O-sched-for-4.3.patch
https://pf.natalenko.name/mirrors/bfq/4.3.0-v7r8/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r8-for-4.3.0.patch
$name.config $name.config_64 )
build(){
bsdtar -p -o -C $SRC -xf linux-$version.tar.xz
cd linux-$version
if [ -f $SRC/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r8-4.3.patch ]; then
patch -Np1 -i $SRC/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r8-4.3.patch
fi
if [ -f $SRC/0002-block-introduce-the-BFQ-v7r8-I-O-sched-for-4.3.patch ]; then
patch -Np1 -i $SRC/0002-block-introduce-the-BFQ-v7r8-I-O-sched-for-4.3.patch
fi
if [ -f $SRC/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r8-for-4.3.0.patch ]; then
patch -Np1 -i $SRC/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r8-for-4.3.0.patch
fi
make mrproper
case `uname -m` in
x86_64)
cp -v $SRC/$name.config_64 ./.config;;
i?86)
cp -v $SRC/$name.config ./.config;
esac
#make xconfig
#make nconfig
make menuconfig
make || make -j1
case `uname -m` in
x86_64)
cp .config $SRC/$name.config_64;;
i?86)
cp .config $SRC/$name.config;;
esac
# Install modules
cd $SRC/linux-$version
sed -i "/rm\ -rf\ \$(MODLIB)\/kernel/d" Makefile
make INSTALL_MOD_PATH=$PKG modules_install || make -j1 INSTALL_MOD_PATH=$PKG modules_install
mkdir -p $PKG/boot
case `uname -m` in
x86_64)
cp System.map \
$PKG/boot/System_64.map-$version
cp .config \
$PKG/boot/config_64-$version
cp arch/x86_64/boot/bzImage \
$PKG/boot/$name-$version ;;
i?86)
cp System.map \
$PKG/boot/System.map-$version
cp .config \
$PKG/boot/config-$version
cp arch/i386/boot/bzImage \
$PKG/boot/$name-$version ;;
esac
cd $PKG/lib/modules/${version}*/
mkdir -p $PKG/usr/src
mv $SRC/linux-$version $PKG/usr/src/
rm {build,source}
ln -sv /usr/src/linux-$version build
ln -sv /usr/src/linux-$version source
mkdir $SRC/linux-$version
mv $PKG/usr/src/linux-$version/Documentation \
$SRC/linux-$version
# Firmware are in linux-firmware
rm -rf $PKG/lib/firmware
# post-install autogen
INITRD_VERSION="`basename $PKG/lib/modules/*`"
echo "mkinitramfs $INITRD_VERSION" > $PKGMK_ROOT/$name.post-install
echo "[ -f boot/initrd ] && rm boot/initrd" >> $PKGMK_ROOT/$name.post-install
echo "ln -sf initrd-$INITRD_VERSION boot/initrd" >> $PKGMK_ROOT/$name.post-install
echo "ln -sf $name-$version boot/kernel" >> $PKGMK_ROOT/$name.post-install
#pre-install autogen
cd $SRC
if [ -f aaabasicfs-${AAABASICFS}.tar.xz ]; then
bsdtar -p -o -C $SRC -xf aaabasicfs-${AAABASICFS}.tar.xz
echo ". lib/lsb/init-functions" > $PKGMK_ROOT/$name.pre-install
for FILE in `tar --list --file aaabasicfs-${AAABASICFS}.tar.xz|grep -v /$`
do
echo "log_info_msg \"update $FILE\"" >> $PKGMK_ROOT/$name.pre-install
echo "cat > $FILE << \"END_OF_FILE\"" >> $PKGMK_ROOT/$name.pre-install
cat $SRC/$FILE >> $PKGMK_ROOT/$name.pre-install
echo "END_OF_FILE" >> $PKGMK_ROOT/$name.pre-install
echo "evaluate_retval" >> $PKGMK_ROOT/$name.pre-install
done
fi
}
devel() {
cd $PKG
rm -r usr/src/linux-$version/{tools,ipc,init,drivers,firmware,fs,mm,samples,security,sound,virt}
for i in alpha arc arm arm26 arm64 avr32 blackfin c6x \
cris frv h8300 hexagon ia64 m32r m68k m68knommu metag \
mips microblaze mn10300 openrisc parisc powerpc ppc s390 \
score sh sh64 sparc sparc64 tile unicore32 um v850 xtensa
do rm -rf usr/src/linux-$version/arch/$i
done
bsdtar -cf \
$PKGMK_PACKAGE_DIR/$name.devel#$version-any.mps \
usr/src/linux-$version
rm -r usr
}
doc() {
cd $PKG
mkdir -p usr/share/doc/linux-$version
mv $SRC/linux-version/Documentation \
usr/share/doc/linux-$version
bsdtar -cf \
$PKGMK_PACKAGE_DIR/$name.doc#$version-any.mps \
usr/share/doc/linux-$version
rm -r usr
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,140 +0,0 @@
# Description: The latest stable kernel version with ck.kolivas patch
# URL: http://ck.kolivas.org/patches/4.0/
# Packagers: pierre at nutyx dot org, tnut at nutyx dot org, berlius at nutyx dot com
PKGMK_IGNORE_UNPACK="yes"
PKGMK_NO_STRIP="yes"
PKGMK_GROUPS=(devel doc)
name=kernel-ck
version=4.3
release=1
_version=${version%.*}
source=(https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-$version.tar.xz
http://ck.kolivas.org/patches/4.0/$version/$version-ck1/patch-$version-ck1.xz
$name.config $name.config_64 )
build(){
bsdtar -p -o -C $SRC -xf linux-$version.tar.xz
cd linux-$version
if [ -f $SRC/patch-$version-ck1.xz ]; then
xz -d -c $SRC/patch-$version-ck1.xz | patch -Np1
fi
make mrproper
case `uname -m` in
x86_64)
cp -v $SRC/$name.config_64 ./.config;;
i?86)
cp -v $SRC/$name.config ./.config;
esac
#make xconfig
#make nconfig
make menuconfig
make || make -j1
case `uname -m` in
x86_64)
cp .config $SRC/$name.config_64;;
i?86)
cp .config $SRC/$name.config;;
esac
# Install modules
cd $SRC/linux-$version
sed -i "/rm\ -rf\ \$(MODLIB)\/kernel/d" Makefile
make INSTALL_MOD_PATH=$PKG modules_install || make -j1 INSTALL_MOD_PATH=$PKG modules_install
mkdir -p $PKG/boot
case `uname -m` in
x86_64)
cp System.map \
$PKG/boot/System_64.map-$version
cp .config \
$PKG/boot/config_64-$version
cp arch/x86_64/boot/bzImage \
$PKG/boot/$name-$version ;;
i?86)
cp System.map \
$PKG/boot/System.map-$version
cp .config \
$PKG/boot/config-$version
cp arch/i386/boot/bzImage \
$PKG/boot/$name-$version ;;
esac
cd $PKG/lib/modules/${version}*/
mkdir -p $PKG/usr/src
mv $SRC/linux-$version $PKG/usr/src/
rm {build,source}
ln -sv /usr/src/linux-$version build
ln -sv /usr/src/linux-$version source
mkdir $SRC/linux-$version
mv $PKG/usr/src/linux-$version/Documentation \
$SRC/linux-$version
# Firmware are in linux-firmware
rm -rf $PKG/lib/firmware
# post-install autogen
INITRD_VERSION="`basename $PKG/lib/modules/*`"
echo "mkinitramfs $INITRD_VERSION" > $PKGMK_ROOT/$name.post-install
echo "[ -f boot/initrd ] && rm boot/initrd" >> $PKGMK_ROOT/$name.post-install
echo "ln -sf initrd-$INITRD_VERSION boot/initrd" >> $PKGMK_ROOT/$name.post-install
echo "ln -sf $name-$version boot/kernel" >> $PKGMK_ROOT/$name.post-install
#pre-install autogen
cd $SRC
if [ -f aaabasicfs-${AAABASICFS}.tar.xz ]; then
bsdtar -p -o -C $SRC -xf aaabasicfs-${AAABASICFS}.tar.xz
echo ". lib/lsb/init-functions" > $PKGMK_ROOT/$name.pre-install
for FILE in `tar --list --file aaabasicfs-${AAABASICFS}.tar.xz|grep -v /$`
do
echo "log_info_msg \"update $FILE\"" >> $PKGMK_ROOT/$name.pre-install
echo "cat > $FILE << \"END_OF_FILE\"" >> $PKGMK_ROOT/$name.pre-install
cat $SRC/$FILE >> $PKGMK_ROOT/$name.pre-install
echo "END_OF_FILE" >> $PKGMK_ROOT/$name.pre-install
echo "evaluate_retval" >> $PKGMK_ROOT/$name.pre-install
done
fi
}
devel() {
cd $PKG
rm -r usr/src/linux-$version/{tools,ipc,init,drivers,firmware,fs,mm,samples,security,sound,virt}
for i in alpha arc arm arm26 arm64 avr32 blackfin c6x \
cris frv h8300 hexagon ia64 m32r m68k m68knommu metag \
mips microblaze mn10300 openrisc parisc powerpc ppc s390 \
score sh sh64 sparc sparc64 tile unicore32 um v850 xtensa
do rm -rf usr/src/linux-$version/arch/$i
done
bsdtar -cf \
$PKGMK_PACKAGE_DIR/$name.devel#$version-any.mps \
usr/src/linux-$version
rm -r usr
}
doc() {
cd $PKG
mkdir -p usr/share/doc/linux-$version
mv $SRC/linux-$version/Documentation \
usr/share/doc/linux-$version
bsdtar -cf \
$PKGMK_PACKAGE_DIR/$name.doc#$version-any.mps \
usr/share/doc/linux-$version
rm -r usr
}

View File

@ -1,232 +0,0 @@
aufs4.4 base patch
diff --git a/MAINTAINERS b/MAINTAINERS
index 233f834..c250892 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2029,6 +2029,19 @@ F: include/linux/audit.h
F: include/uapi/linux/audit.h
F: kernel/audit*
+AUFS (advanced multi layered unification filesystem) FILESYSTEM
+M: "J. R. Okajima" <hooanon05g@gmail.com>
+L: linux-unionfs@vger.kernel.org
+L: aufs-users@lists.sourceforge.net (members only)
+W: http://aufs.sourceforge.net
+T: git://github.com/sfjro/aufs4-linux.git
+S: Supported
+F: Documentation/filesystems/aufs/
+F: Documentation/ABI/testing/debugfs-aufs
+F: Documentation/ABI/testing/sysfs-aufs
+F: fs/aufs/
+F: include/uapi/linux/aufs_type.h
+
AUXILIARY DISPLAY DRIVERS
M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
W: http://miguelojeda.es/auxdisplay.htm
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 423f4ca..0b816b2 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -706,6 +706,24 @@ static inline int is_loop_device(struct file *file)
return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
}
+/*
+ * for AUFS
+ * no get/put for file.
+ */
+struct file *loop_backing_file(struct super_block *sb)
+{
+ struct file *ret;
+ struct loop_device *l;
+
+ ret = NULL;
+ if (MAJOR(sb->s_dev) == LOOP_MAJOR) {
+ l = sb->s_bdev->bd_disk->private_data;
+ ret = l->lo_backing_file;
+ }
+ return ret;
+}
+EXPORT_SYMBOL_GPL(loop_backing_file);
+
/* loop sysfs attributes */
static ssize_t loop_attr_show(struct device *dev, char *page,
diff --git a/fs/dcache.c b/fs/dcache.c
index 5c33aeb..8aa7f26 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1167,7 +1167,7 @@ enum d_walk_ret {
*
* The @enter() and @finish() callbacks are called with d_lock held.
*/
-static void d_walk(struct dentry *parent, void *data,
+void d_walk(struct dentry *parent, void *data,
enum d_walk_ret (*enter)(void *, struct dentry *),
void (*finish)(void *))
{
diff --git a/fs/fcntl.c b/fs/fcntl.c
index ee85cd4..dacbf71 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -29,7 +29,7 @@
#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
-static int setfl(int fd, struct file * filp, unsigned long arg)
+int setfl(int fd, struct file * filp, unsigned long arg)
{
struct inode * inode = file_inode(filp);
int error = 0;
@@ -59,6 +59,8 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
if (filp->f_op->check_flags)
error = filp->f_op->check_flags(arg);
+ if (!error && filp->f_op->setfl)
+ error = filp->f_op->setfl(filp, arg);
if (error)
return error;
diff --git a/fs/inode.c b/fs/inode.c
index 1be5f90..05c423e 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1584,7 +1584,7 @@ EXPORT_SYMBOL(generic_update_time);
* This does the actual work of updating an inodes time or version. Must have
* had called mnt_want_write() before calling this.
*/
-static int update_time(struct inode *inode, struct timespec *time, int flags)
+int update_time(struct inode *inode, struct timespec *time, int flags)
{
int (*update_time)(struct inode *, struct timespec *, int);
diff --git a/fs/read_write.c b/fs/read_write.c
index 819ef3f..fd0414e 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -494,6 +494,28 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count,
}
EXPORT_SYMBOL(__vfs_write);
+vfs_readf_t vfs_readf(struct file *file)
+{
+ const struct file_operations *fop = file->f_op;
+
+ if (fop->read)
+ return fop->read;
+ if (fop->read_iter)
+ return new_sync_read;
+ return ERR_PTR(-ENOSYS);
+}
+
+vfs_writef_t vfs_writef(struct file *file)
+{
+ const struct file_operations *fop = file->f_op;
+
+ if (fop->write)
+ return fop->write;
+ if (fop->write_iter)
+ return new_sync_write;
+ return ERR_PTR(-ENOSYS);
+}
+
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
{
mm_segment_t old_fs;
diff --git a/fs/splice.c b/fs/splice.c
index 4cf700d..30a091d 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1110,8 +1110,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
-static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
- loff_t *ppos, size_t len, unsigned int flags)
+long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ loff_t *ppos, size_t len, unsigned int flags)
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
@@ -1127,9 +1127,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
/*
* Attempt to initiate a splice from a file to a pipe.
*/
-static long do_splice_to(struct file *in, loff_t *ppos,
- struct pipe_inode_info *pipe, size_t len,
- unsigned int flags)
+long do_splice_to(struct file *in, loff_t *ppos,
+ struct pipe_inode_info *pipe, size_t len,
+ unsigned int flags)
{
ssize_t (*splice_read)(struct file *, loff_t *,
struct pipe_inode_info *, size_t, unsigned int);
diff --git a/include/linux/file.h b/include/linux/file.h
index f87d308..9a290b3 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -19,6 +19,7 @@ struct dentry;
struct path;
extern struct file *alloc_file(struct path *, fmode_t mode,
const struct file_operations *fop);
+extern struct file *get_empty_filp(void);
static inline void fput_light(struct file *file, int fput_needed)
{
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 3aa5142..36a997e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1233,6 +1233,7 @@ extern void fasync_free(struct fasync_struct *);
/* can be called from interrupts */
extern void kill_fasync(struct fasync_struct **, int, int);
+extern int setfl(int fd, struct file * filp, unsigned long arg);
extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
extern void f_setown(struct file *filp, unsigned long arg, int force);
extern void f_delown(struct file *filp);
@@ -1619,6 +1620,7 @@ struct file_operations {
ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
int (*check_flags)(int);
+ int (*setfl)(struct file *, unsigned long);
int (*flock) (struct file *, int, struct file_lock *);
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
@@ -1672,6 +1674,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
struct iovec *fast_pointer,
struct iovec **ret_pointer);
+typedef ssize_t (*vfs_readf_t)(struct file *, char __user *, size_t, loff_t *);
+typedef ssize_t (*vfs_writef_t)(struct file *, const char __user *, size_t,
+ loff_t *);
+vfs_readf_t vfs_readf(struct file *file);
+vfs_writef_t vfs_writef(struct file *file);
+
extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *);
extern ssize_t __vfs_write(struct file *, const char __user *, size_t, loff_t *);
extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
@@ -2021,6 +2029,7 @@ extern int current_umask(void);
extern void ihold(struct inode * inode);
extern void iput(struct inode *);
extern int generic_update_time(struct inode *, struct timespec *, int);
+extern int update_time(struct inode *, struct timespec *, int);
/* /sys/fs */
extern struct kobject *fs_kobj;
diff --git a/include/linux/splice.h b/include/linux/splice.h
index da2751d..2e0fca6 100644
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
@@ -83,4 +83,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
extern void spd_release_page(struct splice_pipe_desc *, unsigned int);
extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
+
+extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ loff_t *ppos, size_t len, unsigned int flags);
+extern long do_splice_to(struct file *in, loff_t *ppos,
+ struct pipe_inode_info *pipe, size_t len,
+ unsigned int flags);
#endif

View File

@ -1,35 +0,0 @@
aufs4.4 kbuild patch
diff --git a/fs/Kconfig b/fs/Kconfig
index 6ce72d8..4aa31ea 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -221,6 +221,7 @@ source "fs/pstore/Kconfig"
source "fs/sysv/Kconfig"
source "fs/ufs/Kconfig"
source "fs/exofs/Kconfig"
+source "fs/aufs/Kconfig"
endif # MISC_FILESYSTEMS
diff --git a/fs/Makefile b/fs/Makefile
index 79f5225..a7c7f16 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -126,3 +126,4 @@ obj-y += exofs/ # Multiple modules
obj-$(CONFIG_CEPH_FS) += ceph/
obj-$(CONFIG_PSTORE) += pstore/
obj-$(CONFIG_EFIVAR_FS) += efivarfs/
+obj-$(CONFIG_AUFS_FS) += aufs/
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index c2e5d6c..d736c11 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -59,6 +59,7 @@ header-y += atmsvc.h
header-y += atm_tcp.h
header-y += atm_zatm.h
header-y += audit.h
+header-y += aufs_type.h
header-y += auto_fs4.h
header-y += auto_fs.h
header-y += auxvec.h

View File

@ -1,274 +0,0 @@
aufs4.4 loopback patch
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 0b816b2..86dd454 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -556,7 +556,7 @@ static int do_req_filebacked(struct loop_device *lo, struct request *rq)
}
struct switch_request {
- struct file *file;
+ struct file *file, *virt_file;
struct completion wait;
};
@@ -582,6 +582,7 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
mapping = file->f_mapping;
mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
lo->lo_backing_file = file;
+ lo->lo_backing_virt_file = p->virt_file;
lo->lo_blocksize = S_ISBLK(mapping->host->i_mode) ?
mapping->host->i_bdev->bd_block_size : PAGE_SIZE;
lo->old_gfp_mask = mapping_gfp_mask(mapping);
@@ -594,11 +595,13 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
* First it needs to flush existing IO, it does this by sending a magic
* BIO down the pipe. The completion of this BIO does the actual switch.
*/
-static int loop_switch(struct loop_device *lo, struct file *file)
+static int loop_switch(struct loop_device *lo, struct file *file,
+ struct file *virt_file)
{
struct switch_request w;
w.file = file;
+ w.virt_file = virt_file;
/* freeze queue and wait for completion of scheduled requests */
blk_mq_freeze_queue(lo->lo_queue);
@@ -617,7 +620,16 @@ static int loop_switch(struct loop_device *lo, struct file *file)
*/
static int loop_flush(struct loop_device *lo)
{
- return loop_switch(lo, NULL);
+ return loop_switch(lo, NULL, NULL);
+}
+
+static struct file *loop_real_file(struct file *file)
+{
+ struct file *f = NULL;
+
+ if (file->f_path.dentry->d_sb->s_op->real_loop)
+ f = file->f_path.dentry->d_sb->s_op->real_loop(file);
+ return f;
}
static void loop_reread_partitions(struct loop_device *lo,
@@ -654,6 +666,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
unsigned int arg)
{
struct file *file, *old_file;
+ struct file *f, *virt_file = NULL, *old_virt_file;
struct inode *inode;
int error;
@@ -670,9 +683,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
file = fget(arg);
if (!file)
goto out;
+ f = loop_real_file(file);
+ if (f) {
+ virt_file = file;
+ file = f;
+ get_file(file);
+ }
inode = file->f_mapping->host;
old_file = lo->lo_backing_file;
+ old_virt_file = lo->lo_backing_virt_file;
error = -EINVAL;
@@ -684,17 +704,21 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
goto out_putf;
/* and ... switch */
- error = loop_switch(lo, file);
+ error = loop_switch(lo, file, virt_file);
if (error)
goto out_putf;
fput(old_file);
+ if (old_virt_file)
+ fput(old_virt_file);
if (lo->lo_flags & LO_FLAGS_PARTSCAN)
loop_reread_partitions(lo, bdev);
return 0;
out_putf:
fput(file);
+ if (virt_file)
+ fput(virt_file);
out:
return error;
}
@@ -881,7 +905,7 @@ static int loop_prepare_queue(struct loop_device *lo)
static int loop_set_fd(struct loop_device *lo, fmode_t mode,
struct block_device *bdev, unsigned int arg)
{
- struct file *file, *f;
+ struct file *file, *f, *virt_file = NULL;
struct inode *inode;
struct address_space *mapping;
unsigned lo_blocksize;
@@ -896,6 +920,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
file = fget(arg);
if (!file)
goto out;
+ f = loop_real_file(file);
+ if (f) {
+ virt_file = file;
+ file = f;
+ get_file(file);
+ }
error = -EBUSY;
if (lo->lo_state != Lo_unbound)
@@ -948,6 +978,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
lo->lo_device = bdev;
lo->lo_flags = lo_flags;
lo->lo_backing_file = file;
+ lo->lo_backing_virt_file = virt_file;
lo->transfer = NULL;
lo->ioctl = NULL;
lo->lo_sizelimit = 0;
@@ -980,6 +1011,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
out_putf:
fput(file);
+ if (virt_file)
+ fput(virt_file);
out:
/* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE);
@@ -1026,6 +1059,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
static int loop_clr_fd(struct loop_device *lo)
{
struct file *filp = lo->lo_backing_file;
+ struct file *virt_filp = lo->lo_backing_virt_file;
gfp_t gfp = lo->old_gfp_mask;
struct block_device *bdev = lo->lo_device;
@@ -1057,6 +1091,7 @@ static int loop_clr_fd(struct loop_device *lo)
spin_lock_irq(&lo->lo_lock);
lo->lo_state = Lo_rundown;
lo->lo_backing_file = NULL;
+ lo->lo_backing_virt_file = NULL;
spin_unlock_irq(&lo->lo_lock);
loop_release_xfer(lo);
@@ -1101,6 +1136,8 @@ static int loop_clr_fd(struct loop_device *lo)
* bd_mutex which is usually taken before lo_ctl_mutex.
*/
fput(filp);
+ if (virt_filp)
+ fput(virt_filp);
return 0;
}
diff --git a/drivers/block/loop.h b/drivers/block/loop.h
index fb2237c..c3888c5 100644
--- a/drivers/block/loop.h
+++ b/drivers/block/loop.h
@@ -46,7 +46,7 @@ struct loop_device {
int (*ioctl)(struct loop_device *, int cmd,
unsigned long arg);
- struct file * lo_backing_file;
+ struct file * lo_backing_file, *lo_backing_virt_file;
struct block_device *lo_device;
unsigned lo_blocksize;
void *key_data;
diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
index a2256c7..6f03771 100644
--- a/fs/aufs/f_op.c
+++ b/fs/aufs/f_op.c
@@ -348,7 +348,7 @@ static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter)
if (IS_ERR(h_file))
goto out;
- if (au_test_loopback_kthread()) {
+ if (0 && au_test_loopback_kthread()) {
au_warn_loopback(h_file->f_path.dentry->d_sb);
if (file->f_mapping != h_file->f_mapping) {
file->f_mapping = h_file->f_mapping;
diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c
index c3ca50f..a3dbdaf 100644
--- a/fs/aufs/loop.c
+++ b/fs/aufs/loop.c
@@ -132,3 +132,19 @@ void au_loopback_fin(void)
symbol_put(loop_backing_file);
au_delayed_kfree(au_warn_loopback_array);
}
+
+/* ---------------------------------------------------------------------- */
+
+/* support the loopback block device insude aufs */
+
+struct file *aufs_real_loop(struct file *file)
+{
+ struct file *f;
+
+ BUG_ON(!au_test_aufs(file->f_path.dentry->d_sb));
+ fi_read_lock(file);
+ f = au_hf_top(file);
+ fi_read_unlock(file);
+ AuDebugOn(!f);
+ return f;
+}
diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h
index 48bf070..66afec7 100644
--- a/fs/aufs/loop.h
+++ b/fs/aufs/loop.h
@@ -25,7 +25,11 @@ void au_warn_loopback(struct super_block *h_sb);
int au_loopback_init(void);
void au_loopback_fin(void);
+
+struct file *aufs_real_loop(struct file *file);
#else
+AuStub(struct file *, loop_backing_file, return NULL)
+
AuStubInt0(au_test_loopback_overlap, struct super_block *sb,
struct dentry *h_adding)
AuStubInt0(au_test_loopback_kthread, void)
@@ -33,6 +37,8 @@ AuStubVoid(au_warn_loopback, struct super_block *h_sb)
AuStubInt0(au_loopback_init, void)
AuStubVoid(au_loopback_fin, void)
+
+AuStub(struct file *, aufs_real_loop, return NULL, struct file *file)
#endif /* BLK_DEV_LOOP */
#endif /* __KERNEL__ */
diff --git a/fs/aufs/super.c b/fs/aufs/super.c
index 6baa5f4..3700427 100644
--- a/fs/aufs/super.c
+++ b/fs/aufs/super.c
@@ -831,7 +831,10 @@ static const struct super_operations aufs_sop = {
.statfs = aufs_statfs,
.put_super = aufs_put_super,
.sync_fs = aufs_sync_fs,
- .remount_fs = aufs_remount_fs
+ .remount_fs = aufs_remount_fs,
+#ifdef CONFIG_AUFS_BDEV_LOOP
+ .real_loop = aufs_real_loop
+#endif
};
/* ---------------------------------------------------------------------- */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 36a997e..b2a9cad 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1721,6 +1721,10 @@ struct super_operations {
struct shrink_control *);
long (*free_cached_objects)(struct super_block *,
struct shrink_control *);
+#if defined(CONFIG_BLK_DEV_LOOP) || defined(CONFIG_BLK_DEV_LOOP_MODULE)
+ /* and aufs */
+ struct file *(*real_loop)(struct file *);
+#endif
};
/*

View File

@ -1,410 +0,0 @@
aufs4.4 mmap patch
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 4bd5d31..aa41f2a 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1921,7 +1921,7 @@ static int proc_map_files_get_link(struct dentry *dentry, struct path *path)
down_read(&mm->mmap_sem);
vma = find_exact_vma(mm, vm_start, vm_end);
if (vma && vma->vm_file) {
- *path = vma->vm_file->f_path;
+ *path = vma_pr_or_file(vma)->f_path;
path_get(path);
rc = 0;
}
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
index f8595e8..cb8eda0 100644
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -45,7 +45,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
file = region->vm_file;
if (file) {
- struct inode *inode = file_inode(region->vm_file);
+ struct inode *inode;
+
+ file = vmr_pr_or_file(region);
+ inode = file_inode(file);
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 187b3b5..e03793e 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -281,7 +281,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
const char *name = NULL;
if (file) {
- struct inode *inode = file_inode(vma->vm_file);
+ struct inode *inode;
+
+ file = vma_pr_or_file(vma);
+ inode = file_inode(file);
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
@@ -1505,7 +1508,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
struct proc_maps_private *proc_priv = &numa_priv->proc_maps;
struct vm_area_struct *vma = v;
struct numa_maps *md = &numa_priv->md;
- struct file *file = vma->vm_file;
+ struct file *file = vma_pr_or_file(vma);
struct mm_struct *mm = vma->vm_mm;
struct mm_walk walk = {
.hugetlb_entry = gather_hugetlb_stats,
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index e0d64c9..7aa92db 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -160,7 +160,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
file = vma->vm_file;
if (file) {
- struct inode *inode = file_inode(vma->vm_file);
+ struct inode *inode;
+
+ file = vma_pr_or_file(vma);
+ inode = file_inode(file);
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 00bad77..cc616b0 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1183,6 +1183,28 @@ static inline int fixup_user_fault(struct task_struct *tsk,
}
#endif
+extern void vma_do_file_update_time(struct vm_area_struct *, const char[], int);
+extern struct file *vma_do_pr_or_file(struct vm_area_struct *, const char[],
+ int);
+extern void vma_do_get_file(struct vm_area_struct *, const char[], int);
+extern void vma_do_fput(struct vm_area_struct *, const char[], int);
+
+#define vma_file_update_time(vma) vma_do_file_update_time(vma, __func__, \
+ __LINE__)
+#define vma_pr_or_file(vma) vma_do_pr_or_file(vma, __func__, \
+ __LINE__)
+#define vma_get_file(vma) vma_do_get_file(vma, __func__, __LINE__)
+#define vma_fput(vma) vma_do_fput(vma, __func__, __LINE__)
+
+#ifndef CONFIG_MMU
+extern struct file *vmr_do_pr_or_file(struct vm_region *, const char[], int);
+extern void vmr_do_fput(struct vm_region *, const char[], int);
+
+#define vmr_pr_or_file(region) vmr_do_pr_or_file(region, __func__, \
+ __LINE__)
+#define vmr_fput(region) vmr_do_fput(region, __func__, __LINE__)
+#endif /* !CONFIG_MMU */
+
extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
void *buf, int len, int write);
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index f8d1492..c3a3760 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -272,6 +272,7 @@ struct vm_region {
unsigned long vm_top; /* region allocated to here */
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
struct file *vm_file; /* the backing file or NULL */
+ struct file *vm_prfile; /* the virtual backing file or NULL */
int vm_usage; /* region usage count (access under nommu_region_sem) */
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
@@ -346,6 +347,7 @@ struct vm_area_struct {
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
units, *not* PAGE_CACHE_SIZE */
struct file * vm_file; /* File we map to (can be NULL). */
+ struct file *vm_prfile; /* shadow of vm_file */
void * vm_private_data; /* was vm_pte (shared mem) */
#ifndef CONFIG_MMU
diff --git a/kernel/fork.c b/kernel/fork.c
index 1155eac..c001ea4 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -465,7 +465,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
struct inode *inode = file_inode(file);
struct address_space *mapping = file->f_mapping;
- get_file(file);
+ vma_get_file(tmp);
if (tmp->vm_flags & VM_DENYWRITE)
atomic_dec(&inode->i_writecount);
i_mmap_lock_write(mapping);
diff --git a/mm/Makefile b/mm/Makefile
index 2ed4319..e3a53f5 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -21,7 +21,7 @@ obj-y := filemap.o mempool.o oom_kill.o \
mm_init.o mmu_context.o percpu.o slab_common.o \
compaction.o vmacache.o \
interval_tree.o list_lru.o workingset.o \
- debug.o $(mmu-y)
+ prfile.o debug.o $(mmu-y)
obj-y += init-mm.o
diff --git a/mm/filemap.c b/mm/filemap.c
index 1bb0076..8eaece8 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2128,7 +2128,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
int ret = VM_FAULT_LOCKED;
sb_start_pagefault(inode->i_sb);
- file_update_time(vma->vm_file);
+ vma_file_update_time(vma);
lock_page(page);
if (page->mapping != inode->i_mapping) {
unlock_page(page);
diff --git a/mm/memory.c b/mm/memory.c
index c387430..d434404 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2035,7 +2035,7 @@ static inline int wp_page_reuse(struct mm_struct *mm,
}
if (!page_mkwrite)
- file_update_time(vma->vm_file);
+ vma_file_update_time(vma);
}
return VM_FAULT_WRITE;
diff --git a/mm/mmap.c b/mm/mmap.c
index 2ce04a6..11bc34d 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -275,7 +275,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file)
- fput(vma->vm_file);
+ vma_fput(vma);
mpol_put(vma_policy(vma));
kmem_cache_free(vm_area_cachep, vma);
return next;
@@ -887,7 +887,7 @@ again: remove_next = 1 + (end > next->vm_end);
if (remove_next) {
if (file) {
uprobe_munmap(next, next->vm_start, next->vm_end);
- fput(file);
+ vma_fput(vma);
}
if (next->anon_vma)
anon_vma_merge(vma, next);
@@ -1681,8 +1681,8 @@ out:
return addr;
unmap_and_free_vma:
+ vma_fput(vma);
vma->vm_file = NULL;
- fput(file);
/* Undo any partial mapping done by a device driver. */
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
@@ -2488,7 +2488,7 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
goto out_free_mpol;
if (new->vm_file)
- get_file(new->vm_file);
+ vma_get_file(new);
if (new->vm_ops && new->vm_ops->open)
new->vm_ops->open(new);
@@ -2507,7 +2507,7 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
if (new->vm_ops && new->vm_ops->close)
new->vm_ops->close(new);
if (new->vm_file)
- fput(new->vm_file);
+ vma_fput(new);
unlink_anon_vmas(new);
out_free_mpol:
mpol_put(vma_policy(new));
@@ -2649,7 +2649,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
struct vm_area_struct *vma;
unsigned long populate = 0;
unsigned long ret = -EINVAL;
- struct file *file;
+ struct file *file, *prfile;
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. "
"See Documentation/vm/remap_file_pages.txt.\n",
@@ -2693,10 +2693,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
munlock_vma_pages_range(vma, start, start + size);
}
- file = get_file(vma->vm_file);
+ vma_get_file(vma);
+ file = vma->vm_file;
+ prfile = vma->vm_prfile;
ret = do_mmap_pgoff(vma->vm_file, start, size,
prot, flags, pgoff, &populate);
+ if (!IS_ERR_VALUE(ret) && file && prfile) {
+ struct vm_area_struct *new_vma;
+
+ new_vma = find_vma(mm, ret);
+ if (!new_vma->vm_prfile)
+ new_vma->vm_prfile = prfile;
+ if (new_vma != vma)
+ get_file(prfile);
+ }
+ /*
+ * two fput()s instead of vma_fput(vma),
+ * coz vma may not be available anymore.
+ */
fput(file);
+ if (prfile)
+ fput(prfile);
out:
up_write(&mm->mmap_sem);
if (populate)
@@ -2966,7 +2983,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
if (anon_vma_clone(new_vma, vma))
goto out_free_mempol;
if (new_vma->vm_file)
- get_file(new_vma->vm_file);
+ vma_get_file(new_vma);
if (new_vma->vm_ops && new_vma->vm_ops->open)
new_vma->vm_ops->open(new_vma);
vma_link(mm, new_vma, prev, rb_link, rb_parent);
diff --git a/mm/nommu.c b/mm/nommu.c
index 92be862..29179f7 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -671,7 +671,7 @@ static void __put_nommu_region(struct vm_region *region)
up_write(&nommu_region_sem);
if (region->vm_file)
- fput(region->vm_file);
+ vmr_fput(region);
/* IO memory and memory shared directly out of the pagecache
* from ramfs/tmpfs mustn't be released here */
@@ -829,7 +829,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file)
- fput(vma->vm_file);
+ vma_fput(vma);
put_nommu_region(vma->vm_region);
kmem_cache_free(vm_area_cachep, vma);
}
@@ -1355,7 +1355,7 @@ unsigned long do_mmap(struct file *file,
goto error_just_free;
}
}
- fput(region->vm_file);
+ vmr_fput(region);
kmem_cache_free(vm_region_jar, region);
region = pregion;
result = start;
@@ -1430,10 +1430,10 @@ error_just_free:
up_write(&nommu_region_sem);
error:
if (region->vm_file)
- fput(region->vm_file);
+ vmr_fput(region);
kmem_cache_free(vm_region_jar, region);
if (vma->vm_file)
- fput(vma->vm_file);
+ vma_fput(vma);
kmem_cache_free(vm_area_cachep, vma);
return ret;
diff --git a/mm/prfile.c b/mm/prfile.c
new file mode 100644
index 0000000..b323b8a
--- /dev/null
+++ b/mm/prfile.c
@@ -0,0 +1,86 @@
+/*
+ * Mainly for aufs which mmap(2) diffrent file and wants to print different path
+ * in /proc/PID/maps.
+ * Call these functions via macros defined in linux/mm.h.
+ *
+ * See Documentation/filesystems/aufs/design/06mmap.txt
+ *
+ * Copyright (c) 2014 Junjro R. Okajima
+ * Copyright (c) 2014 Ian Campbell
+ */
+
+#include <linux/mm.h>
+#include <linux/file.h>
+#include <linux/fs.h>
+
+/* #define PRFILE_TRACE */
+static inline void prfile_trace(struct file *f, struct file *pr,
+ const char func[], int line, const char func2[])
+{
+#ifdef PRFILE_TRACE
+ if (pr)
+ pr_info("%s:%d: %s, %s\n", func, line, func2,
+ f ? (char *)f->f_path.dentry->d_name.name : "(null)");
+#endif
+}
+
+void vma_do_file_update_time(struct vm_area_struct *vma, const char func[],
+ int line)
+{
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
+
+ prfile_trace(f, pr, func, line, __func__);
+ file_update_time(f);
+ if (f && pr)
+ file_update_time(pr);
+}
+
+struct file *vma_do_pr_or_file(struct vm_area_struct *vma, const char func[],
+ int line)
+{
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
+
+ prfile_trace(f, pr, func, line, __func__);
+ return (f && pr) ? pr : f;
+}
+
+void vma_do_get_file(struct vm_area_struct *vma, const char func[], int line)
+{
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
+
+ prfile_trace(f, pr, func, line, __func__);
+ get_file(f);
+ if (f && pr)
+ get_file(pr);
+}
+
+void vma_do_fput(struct vm_area_struct *vma, const char func[], int line)
+{
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
+
+ prfile_trace(f, pr, func, line, __func__);
+ fput(f);
+ if (f && pr)
+ fput(pr);
+}
+
+#ifndef CONFIG_MMU
+struct file *vmr_do_pr_or_file(struct vm_region *region, const char func[],
+ int line)
+{
+ struct file *f = region->vm_file, *pr = region->vm_prfile;
+
+ prfile_trace(f, pr, func, line, __func__);
+ return (f && pr) ? pr : f;
+}
+
+void vmr_do_fput(struct vm_region *region, const char func[], int line)
+{
+ struct file *f = region->vm_file, *pr = region->vm_prfile;
+
+ prfile_trace(f, pr, func, line, __func__);
+ fput(f);
+ if (f && pr)
+ fput(pr);
+}
+#endif /* !CONFIG_MMU */

View File

@ -1,382 +0,0 @@
aufs4.4 standalone patch
diff --git a/fs/dcache.c b/fs/dcache.c
index 8aa7f26..ff9a6f3 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1272,6 +1272,7 @@ rename_retry:
seq = 1;
goto again;
}
+EXPORT_SYMBOL_GPL(d_walk);
/*
* Search for at least 1 mount point in the dentry's subdirs.
diff --git a/fs/exec.c b/fs/exec.c
index b06623a..3526d30 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -103,6 +103,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 --git a/fs/fcntl.c b/fs/fcntl.c
index dacbf71..8abb9f81 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -81,6 +81,7 @@ int setfl(int fd, struct file * filp, unsigned long arg)
out:
return error;
}
+EXPORT_SYMBOL_GPL(setfl);
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
int force)
diff --git a/fs/file_table.c b/fs/file_table.c
index ad17e05..ae9f267 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -147,6 +147,7 @@ over:
}
return ERR_PTR(-ENFILE);
}
+EXPORT_SYMBOL_GPL(get_empty_filp);
/**
* alloc_file - allocate and initialize a 'struct file'
@@ -258,6 +259,7 @@ void flush_delayed_fput(void)
{
delayed_fput(NULL);
}
+EXPORT_SYMBOL_GPL(flush_delayed_fput);
static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput);
@@ -300,6 +302,7 @@ void __fput_sync(struct file *file)
}
EXPORT_SYMBOL(fput);
+EXPORT_SYMBOL_GPL(__fput_sync);
void put_filp(struct file *file)
{
@@ -308,6 +311,7 @@ void put_filp(struct file *file)
file_free(file);
}
}
+EXPORT_SYMBOL_GPL(put_filp);
void __init files_init(void)
{
diff --git a/fs/inode.c b/fs/inode.c
index 05c423e..5d437a9 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1593,6 +1593,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
return update_time(inode, time, flags);
}
+EXPORT_SYMBOL_GPL(update_time);
/**
* touch_atime - update the access time
diff --git a/fs/namespace.c b/fs/namespace.c
index 0570729..fc50028 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -463,6 +463,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
mnt_dec_writers(real_mount(mnt));
preempt_enable();
}
+EXPORT_SYMBOL_GPL(__mnt_drop_write);
/**
* mnt_drop_write - give up write access to a mount
@@ -1803,6 +1804,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
return 0;
}
+EXPORT_SYMBOL_GPL(iterate_mounts);
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
{
diff --git a/fs/notify/group.c b/fs/notify/group.c
index d16b62c..53e45b6 100644
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -22,6 +22,7 @@
#include <linux/srcu.h>
#include <linux/rculist.h>
#include <linux/wait.h>
+#include <linux/module.h>
#include <linux/fsnotify_backend.h>
#include "fsnotify.h"
@@ -72,6 +73,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
{
atomic_inc(&group->refcnt);
}
+EXPORT_SYMBOL_GPL(fsnotify_get_group);
/*
* Drop a reference to a group. Free it if it's through.
@@ -81,6 +83,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
if (atomic_dec_and_test(&group->refcnt))
fsnotify_final_destroy_group(group);
}
+EXPORT_SYMBOL_GPL(fsnotify_put_group);
/*
* Create a new fsnotify_group and hold a reference for the group returned.
@@ -109,6 +112,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
return group;
}
+EXPORT_SYMBOL_GPL(fsnotify_alloc_group);
int fsnotify_fasync(int fd, struct file *file, int on)
{
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index fc0df44..8175f3c 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -109,6 +109,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
mark->free_mark(mark);
}
}
+EXPORT_SYMBOL_GPL(fsnotify_put_mark);
/* Calculate mask of events for a list of marks */
u32 fsnotify_recalc_mask(struct hlist_head *head)
@@ -208,6 +209,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
mutex_unlock(&group->mark_mutex);
fsnotify_free_mark(mark);
}
+EXPORT_SYMBOL_GPL(fsnotify_destroy_mark);
void fsnotify_destroy_marks(struct hlist_head *head, spinlock_t *lock)
{
@@ -392,6 +394,7 @@ err:
return ret;
}
+EXPORT_SYMBOL_GPL(fsnotify_add_mark);
int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group,
struct inode *inode, struct vfsmount *mnt, int allow_dups)
@@ -492,6 +495,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
atomic_set(&mark->refcnt, 1);
mark->free_mark = free_mark;
}
+EXPORT_SYMBOL_GPL(fsnotify_init_mark);
static int fsnotify_mark_destroy(void *ignored)
{
diff --git a/fs/open.c b/fs/open.c
index b6f1e96..e59c51b 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
mutex_unlock(&dentry->d_inode->i_mutex);
return ret;
}
+EXPORT_SYMBOL_GPL(do_truncate);
long vfs_truncate(struct path *path, loff_t length)
{
@@ -678,6 +679,7 @@ int open_check_o_direct(struct file *f)
}
return 0;
}
+EXPORT_SYMBOL_GPL(open_check_o_direct);
static int do_dentry_open(struct file *f,
struct inode *inode,
diff --git a/fs/read_write.c b/fs/read_write.c
index fd0414e..0a28933 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -504,6 +504,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)
{
@@ -515,6 +516,7 @@ vfs_writef_t vfs_writef(struct file *file)
return new_sync_write;
return ERR_PTR(-ENOSYS);
}
+EXPORT_SYMBOL_GPL(vfs_writef);
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
{
diff --git a/fs/splice.c b/fs/splice.c
index 30a091d..b0ade1f 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1123,6 +1123,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
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.
@@ -1149,6 +1150,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
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 --git a/fs/xattr.c b/fs/xattr.c
index 9b932b9..0c317c4 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -207,6 +207,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
*xattr_value = value;
return error;
}
+EXPORT_SYMBOL_GPL(vfs_getxattr_alloc);
/* Compare an extended attribute value with the given value */
int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name,
diff --git a/kernel/task_work.c b/kernel/task_work.c
index 53fa971..bce3211 100644
--- a/kernel/task_work.c
+++ b/kernel/task_work.c
@@ -118,3 +118,4 @@ void task_work_run(void)
} while (work);
}
}
+EXPORT_SYMBOL_GPL(task_work_run);
diff --git a/security/commoncap.c b/security/commoncap.c
index 1832cf7..646e9b2 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -1053,12 +1053,14 @@ int cap_mmap_addr(unsigned long addr)
}
return ret;
}
+EXPORT_SYMBOL_GPL(cap_mmap_addr);
int cap_mmap_file(struct file *file, unsigned long reqprot,
unsigned long prot, unsigned long flags)
{
return 0;
}
+EXPORT_SYMBOL_GPL(cap_mmap_file);
#ifdef CONFIG_SECURITY
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 03c1652..f88c84b 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -7,6 +7,7 @@
#include <linux/device_cgroup.h>
#include <linux/cgroup.h>
#include <linux/ctype.h>
+#include <linux/export.h>
#include <linux/list.h>
#include <linux/uaccess.h>
#include <linux/seq_file.h>
@@ -849,6 +850,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
access);
}
+EXPORT_SYMBOL_GPL(__devcgroup_inode_permission);
int devcgroup_inode_mknod(int mode, dev_t dev)
{
diff --git a/security/security.c b/security/security.c
index 46f405c..bc8514e 100644
--- a/security/security.c
+++ b/security/security.c
@@ -433,6 +433,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
return 0;
return call_int_hook(path_rmdir, 0, dir, dentry);
}
+EXPORT_SYMBOL_GPL(security_path_rmdir);
int security_path_unlink(struct path *dir, struct dentry *dentry)
{
@@ -449,6 +450,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
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, struct path *new_dir,
struct dentry *new_dentry)
@@ -457,6 +459,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
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(struct path *old_dir, struct dentry *old_dentry,
struct path *new_dir, struct dentry *new_dentry,
@@ -484,6 +487,7 @@ int security_path_truncate(struct path *path)
return 0;
return call_int_hook(path_truncate, 0, path);
}
+EXPORT_SYMBOL_GPL(security_path_truncate);
int security_path_chmod(struct path *path, umode_t mode)
{
@@ -491,6 +495,7 @@ int security_path_chmod(struct path *path, umode_t mode)
return 0;
return call_int_hook(path_chmod, 0, path, mode);
}
+EXPORT_SYMBOL_GPL(security_path_chmod);
int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
{
@@ -498,6 +503,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
return 0;
return call_int_hook(path_chown, 0, path, uid, gid);
}
+EXPORT_SYMBOL_GPL(security_path_chown);
int security_path_chroot(struct path *path)
{
@@ -583,6 +589,7 @@ int security_inode_readlink(struct dentry *dentry)
return 0;
return call_int_hook(inode_readlink, 0, dentry);
}
+EXPORT_SYMBOL_GPL(security_inode_readlink);
int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
bool rcu)
@@ -598,6 +605,7 @@ int security_inode_permission(struct inode *inode, int mask)
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)
{
@@ -736,6 +744,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
}
+EXPORT_SYMBOL_GPL(security_file_permission);
int security_file_alloc(struct file *file)
{
@@ -795,6 +804,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
return ret;
return ima_file_mmap(file, prot);
}
+EXPORT_SYMBOL_GPL(security_mmap_file);
int security_mmap_addr(unsigned long addr)
{

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,419 +0,0 @@
/*
* Copyright (C) 2005-2016 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __AUFS_TYPE_H__
#define __AUFS_TYPE_H__
#define AUFS_NAME "aufs"
#ifdef __KERNEL__
/*
* define it before including all other headers.
* sched.h may use pr_* macros before defining "current", so define the
* no-current version first, and re-define later.
*/
#define pr_fmt(fmt) AUFS_NAME " %s:%d: " fmt, __func__, __LINE__
#include <linux/sched.h>
#undef pr_fmt
#define pr_fmt(fmt) \
AUFS_NAME " %s:%d:%.*s[%d]: " fmt, __func__, __LINE__, \
(int)sizeof(current->comm), current->comm, current->pid
#else
#include <stdint.h>
#include <sys/types.h>
#endif /* __KERNEL__ */
#include <linux/limits.h>
#define AUFS_VERSION "4.4-20160912"
/* todo? move this to linux-2.6.19/include/magic.h */
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
/* ---------------------------------------------------------------------- */
#ifdef CONFIG_AUFS_BRANCH_MAX_127
typedef int8_t aufs_bindex_t;
#define AUFS_BRANCH_MAX 127
#else
typedef int16_t aufs_bindex_t;
#ifdef CONFIG_AUFS_BRANCH_MAX_511
#define AUFS_BRANCH_MAX 511
#elif defined(CONFIG_AUFS_BRANCH_MAX_1023)
#define AUFS_BRANCH_MAX 1023
#elif defined(CONFIG_AUFS_BRANCH_MAX_32767)
#define AUFS_BRANCH_MAX 32767
#endif
#endif
#ifdef __KERNEL__
#ifndef AUFS_BRANCH_MAX
#error unknown CONFIG_AUFS_BRANCH_MAX value
#endif
#endif /* __KERNEL__ */
/* ---------------------------------------------------------------------- */
#define AUFS_FSTYPE AUFS_NAME
#define AUFS_ROOT_INO 2
#define AUFS_FIRST_INO 11
#define AUFS_WH_PFX ".wh."
#define AUFS_WH_PFX_LEN ((int)sizeof(AUFS_WH_PFX) - 1)
#define AUFS_WH_TMP_LEN 4
/* a limit for rmdir/rename a dir and copyup */
#define AUFS_MAX_NAMELEN (NAME_MAX \
- AUFS_WH_PFX_LEN * 2 /* doubly whiteouted */\
- 1 /* dot */\
- AUFS_WH_TMP_LEN) /* hex */
#define AUFS_XINO_FNAME "." AUFS_NAME ".xino"
#define AUFS_XINO_DEFPATH "/tmp/" AUFS_XINO_FNAME
#define AUFS_XINO_DEF_SEC 30 /* seconds */
#define AUFS_XINO_DEF_TRUNC 45 /* percentage */
#define AUFS_DIRWH_DEF 3
#define AUFS_RDCACHE_DEF 10 /* seconds */
#define AUFS_RDCACHE_MAX 3600 /* seconds */
#define AUFS_RDBLK_DEF 512 /* bytes */
#define AUFS_RDHASH_DEF 32
#define AUFS_WKQ_NAME AUFS_NAME "d"
#define AUFS_MFS_DEF_SEC 30 /* seconds */
#define AUFS_MFS_MAX_SEC 3600 /* seconds */
#define AUFS_FHSM_CACHE_DEF_SEC 30 /* seconds */
#define AUFS_PLINK_WARN 50 /* number of plinks in a single bucket */
/* pseudo-link maintenace under /proc */
#define AUFS_PLINK_MAINT_NAME "plink_maint"
#define AUFS_PLINK_MAINT_DIR "fs/" AUFS_NAME
#define AUFS_PLINK_MAINT_PATH AUFS_PLINK_MAINT_DIR "/" AUFS_PLINK_MAINT_NAME
#define AUFS_DIROPQ_NAME AUFS_WH_PFX ".opq" /* whiteouted doubly */
#define AUFS_WH_DIROPQ AUFS_WH_PFX AUFS_DIROPQ_NAME
#define AUFS_BASE_NAME AUFS_WH_PFX AUFS_NAME
#define AUFS_PLINKDIR_NAME AUFS_WH_PFX "plnk"
#define AUFS_ORPHDIR_NAME AUFS_WH_PFX "orph"
/* doubly whiteouted */
#define AUFS_WH_BASE AUFS_WH_PFX AUFS_BASE_NAME
#define AUFS_WH_PLINKDIR AUFS_WH_PFX AUFS_PLINKDIR_NAME
#define AUFS_WH_ORPHDIR AUFS_WH_PFX AUFS_ORPHDIR_NAME
/* branch permissions and attributes */
#define AUFS_BRPERM_RW "rw"
#define AUFS_BRPERM_RO "ro"
#define AUFS_BRPERM_RR "rr"
#define AUFS_BRATTR_COO_REG "coo_reg"
#define AUFS_BRATTR_COO_ALL "coo_all"
#define AUFS_BRATTR_FHSM "fhsm"
#define AUFS_BRATTR_UNPIN "unpin"
#define AUFS_BRATTR_ICEX "icex"
#define AUFS_BRATTR_ICEX_SEC "icexsec"
#define AUFS_BRATTR_ICEX_SYS "icexsys"
#define AUFS_BRATTR_ICEX_TR "icextr"
#define AUFS_BRATTR_ICEX_USR "icexusr"
#define AUFS_BRATTR_ICEX_OTH "icexoth"
#define AUFS_BRRATTR_WH "wh"
#define AUFS_BRWATTR_NLWH "nolwh"
#define AUFS_BRWATTR_MOO "moo"
#define AuBrPerm_RW 1 /* writable, hardlinkable wh */
#define AuBrPerm_RO (1 << 1) /* readonly */
#define AuBrPerm_RR (1 << 2) /* natively readonly */
#define AuBrPerm_Mask (AuBrPerm_RW | AuBrPerm_RO | AuBrPerm_RR)
#define AuBrAttr_COO_REG (1 << 3) /* copy-up on open */
#define AuBrAttr_COO_ALL (1 << 4)
#define AuBrAttr_COO_Mask (AuBrAttr_COO_REG | AuBrAttr_COO_ALL)
#define AuBrAttr_FHSM (1 << 5) /* file-based hsm */
#define AuBrAttr_UNPIN (1 << 6) /* rename-able top dir of
branch. meaningless since
linux-3.18-rc1 */
/* ignore error in copying XATTR */
#define AuBrAttr_ICEX_SEC (1 << 7)
#define AuBrAttr_ICEX_SYS (1 << 8)
#define AuBrAttr_ICEX_TR (1 << 9)
#define AuBrAttr_ICEX_USR (1 << 10)
#define AuBrAttr_ICEX_OTH (1 << 11)
#define AuBrAttr_ICEX (AuBrAttr_ICEX_SEC \
| AuBrAttr_ICEX_SYS \
| AuBrAttr_ICEX_TR \
| AuBrAttr_ICEX_USR \
| AuBrAttr_ICEX_OTH)
#define AuBrRAttr_WH (1 << 12) /* whiteout-able */
#define AuBrRAttr_Mask AuBrRAttr_WH
#define AuBrWAttr_NoLinkWH (1 << 13) /* un-hardlinkable whiteouts */
#define AuBrWAttr_MOO (1 << 14) /* move-up on open */
#define AuBrWAttr_Mask (AuBrWAttr_NoLinkWH | AuBrWAttr_MOO)
#define AuBrAttr_CMOO_Mask (AuBrAttr_COO_Mask | AuBrWAttr_MOO)
/* #warning test userspace */
#ifdef __KERNEL__
#ifndef CONFIG_AUFS_FHSM
#undef AuBrAttr_FHSM
#define AuBrAttr_FHSM 0
#endif
#ifndef CONFIG_AUFS_XATTR
#undef AuBrAttr_ICEX
#define AuBrAttr_ICEX 0
#undef AuBrAttr_ICEX_SEC
#define AuBrAttr_ICEX_SEC 0
#undef AuBrAttr_ICEX_SYS
#define AuBrAttr_ICEX_SYS 0
#undef AuBrAttr_ICEX_TR
#define AuBrAttr_ICEX_TR 0
#undef AuBrAttr_ICEX_USR
#define AuBrAttr_ICEX_USR 0
#undef AuBrAttr_ICEX_OTH
#define AuBrAttr_ICEX_OTH 0
#endif
#endif
/* the longest combination */
/* AUFS_BRATTR_ICEX and AUFS_BRATTR_ICEX_TR don't affect here */
#define AuBrPermStrSz sizeof(AUFS_BRPERM_RW \
"+" AUFS_BRATTR_COO_REG \
"+" AUFS_BRATTR_FHSM \
"+" AUFS_BRATTR_UNPIN \
"+" AUFS_BRATTR_ICEX_SEC \
"+" AUFS_BRATTR_ICEX_SYS \
"+" AUFS_BRATTR_ICEX_USR \
"+" AUFS_BRATTR_ICEX_OTH \
"+" AUFS_BRWATTR_NLWH)
typedef struct {
char a[AuBrPermStrSz];
} au_br_perm_str_t;
static inline int au_br_writable(int brperm)
{
return brperm & AuBrPerm_RW;
}
static inline int au_br_whable(int brperm)
{
return brperm & (AuBrPerm_RW | AuBrRAttr_WH);
}
static inline int au_br_wh_linkable(int brperm)
{
return !(brperm & AuBrWAttr_NoLinkWH);
}
static inline int au_br_cmoo(int brperm)
{
return brperm & AuBrAttr_CMOO_Mask;
}
static inline int au_br_fhsm(int brperm)
{
return brperm & AuBrAttr_FHSM;
}
/* ---------------------------------------------------------------------- */
/* ioctl */
enum {
/* readdir in userspace */
AuCtl_RDU,
AuCtl_RDU_INO,
AuCtl_WBR_FD, /* pathconf wrapper */
AuCtl_IBUSY, /* busy inode */
AuCtl_MVDOWN, /* move-down */
AuCtl_BR, /* info about branches */
AuCtl_FHSM_FD /* connection for fhsm */
};
/* borrowed from linux/include/linux/kernel.h */
#ifndef ALIGN
#define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a)-1)
#define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
#endif
/* borrowed from linux/include/linux/compiler-gcc3.h */
#ifndef __aligned
#define __aligned(x) __attribute__((aligned(x)))
#endif
#ifdef __KERNEL__
#ifndef __packed
#define __packed __attribute__((packed))
#endif
#endif
struct au_rdu_cookie {
uint64_t h_pos;
int16_t bindex;
uint8_t flags;
uint8_t pad;
uint32_t generation;
} __aligned(8);
struct au_rdu_ent {
uint64_t ino;
int16_t bindex;
uint8_t type;
uint8_t nlen;
uint8_t wh;
char name[0];
} __aligned(8);
static inline int au_rdu_len(int nlen)
{
/* include the terminating NULL */
return ALIGN(sizeof(struct au_rdu_ent) + nlen + 1,
sizeof(uint64_t));
}
union au_rdu_ent_ul {
struct au_rdu_ent *e;
uint64_t ul;
};
enum {
AufsCtlRduV_SZ,
AufsCtlRduV_End
};
struct aufs_rdu {
/* input */
union {
uint64_t sz; /* AuCtl_RDU */
uint64_t nent; /* AuCtl_RDU_INO */
};
union au_rdu_ent_ul ent;
uint16_t verify[AufsCtlRduV_End];
/* input/output */
uint32_t blk;
/* output */
union au_rdu_ent_ul tail;
/* number of entries which were added in a single call */
uint64_t rent;
uint8_t full;
uint8_t shwh;
struct au_rdu_cookie cookie;
} __aligned(8);
/* ---------------------------------------------------------------------- */
struct aufs_wbr_fd {
uint32_t oflags;
int16_t brid;
} __aligned(8);
/* ---------------------------------------------------------------------- */
struct aufs_ibusy {
uint64_t ino, h_ino;
int16_t bindex;
} __aligned(8);
/* ---------------------------------------------------------------------- */
/* error code for move-down */
/* the actual message strings are implemented in aufs-util.git */
enum {
EAU_MVDOWN_OPAQUE = 1,
EAU_MVDOWN_WHITEOUT,
EAU_MVDOWN_UPPER,
EAU_MVDOWN_BOTTOM,
EAU_MVDOWN_NOUPPER,
EAU_MVDOWN_NOLOWERBR,
EAU_Last
};
/* flags for move-down */
#define AUFS_MVDOWN_DMSG 1
#define AUFS_MVDOWN_OWLOWER (1 << 1) /* overwrite lower */
#define AUFS_MVDOWN_KUPPER (1 << 2) /* keep upper */
#define AUFS_MVDOWN_ROLOWER (1 << 3) /* do even if lower is RO */
#define AUFS_MVDOWN_ROLOWER_R (1 << 4) /* did on lower RO */
#define AUFS_MVDOWN_ROUPPER (1 << 5) /* do even if upper is RO */
#define AUFS_MVDOWN_ROUPPER_R (1 << 6) /* did on upper RO */
#define AUFS_MVDOWN_BRID_UPPER (1 << 7) /* upper brid */
#define AUFS_MVDOWN_BRID_LOWER (1 << 8) /* lower brid */
#define AUFS_MVDOWN_FHSM_LOWER (1 << 9) /* find fhsm attr for lower */
#define AUFS_MVDOWN_STFS (1 << 10) /* req. stfs */
#define AUFS_MVDOWN_STFS_FAILED (1 << 11) /* output: stfs is unusable */
#define AUFS_MVDOWN_BOTTOM (1 << 12) /* output: no more lowers */
/* index for move-down */
enum {
AUFS_MVDOWN_UPPER,
AUFS_MVDOWN_LOWER,
AUFS_MVDOWN_NARRAY
};
/*
* additional info of move-down
* number of free blocks and inodes.
* subset of struct kstatfs, but smaller and always 64bit.
*/
struct aufs_stfs {
uint64_t f_blocks;
uint64_t f_bavail;
uint64_t f_files;
uint64_t f_ffree;
};
struct aufs_stbr {
int16_t brid; /* optional input */
int16_t bindex; /* output */
struct aufs_stfs stfs; /* output when AUFS_MVDOWN_STFS set */
} __aligned(8);
struct aufs_mvdown {
uint32_t flags; /* input/output */
struct aufs_stbr stbr[AUFS_MVDOWN_NARRAY]; /* input/output */
int8_t au_errno; /* output */
} __aligned(8);
/* ---------------------------------------------------------------------- */
union aufs_brinfo {
/* PATH_MAX may differ between kernel-space and user-space */
char _spacer[4096];
struct {
int16_t id;
int perm;
char path[0];
};
} __aligned(8);
/* ---------------------------------------------------------------------- */
#define AuCtlType 'A'
#define AUFS_CTL_RDU _IOWR(AuCtlType, AuCtl_RDU, struct aufs_rdu)
#define AUFS_CTL_RDU_INO _IOWR(AuCtlType, AuCtl_RDU_INO, struct aufs_rdu)
#define AUFS_CTL_WBR_FD _IOW(AuCtlType, AuCtl_WBR_FD, \
struct aufs_wbr_fd)
#define AUFS_CTL_IBUSY _IOWR(AuCtlType, AuCtl_IBUSY, struct aufs_ibusy)
#define AUFS_CTL_MVDOWN _IOWR(AuCtlType, AuCtl_MVDOWN, \
struct aufs_mvdown)
#define AUFS_CTL_BRINFO _IOW(AuCtlType, AuCtl_BR, union aufs_brinfo)
#define AUFS_CTL_FHSM_FD _IOW(AuCtlType, AuCtl_FHSM_FD, int)
#endif /* __AUFS_TYPE_H__ */

View File

@ -1,10 +0,0 @@
--- a/src/wl/sys/wl_linux.c 2014-06-26 10:42:08.000000000 +0000
+++ b/src/wl/sys/wl_linux.c 2014-07-17 22:44:26.254759666 +0000
@@ -205,6 +205,7 @@
static int nompc = 0;
module_param(nompc, int, 0);
+MODULE_LICENSE("Mixed/Proprietary");
#ifdef quote_str
#undef quote_str

View File

@ -1,5 +0,0 @@
blacklist b43
blacklist ssb
blacklist bcma
blacklist brcmsmac
blacklist brcmfmac

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
#!/bin/bash
cd /boot
if [ -f kernel ];then
rm kernel
fi
yenimodul=`ls -Art /lib/modules/ | tail -n 1`
yenikernel=`ls -Art /boot/kernel* | tail -n 1`
modulno=`basename $yenimodul`
kernelno=`basename $yenikernel`
ln -s $kernelno kernel
if [ -f initramfs ];then
mv initramfs initramfs_eski
fi
dracut -N --force --xz --omit systemd /boot/initramfs $modulno
grub-mkconfig -o /boot/grub/grub.cfg

View File

@ -1,49 +0,0 @@
aufs4.4 lockdep patch
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index c57e424..4153563 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -29,7 +29,7 @@ extern int lock_stat;
*/
#define XXX_LOCK_USAGE_STATES (1+3*4)
-#define MAX_LOCKDEP_SUBCLASSES 8UL
+#define MAX_LOCKDEP_SUBCLASSES (8UL + 4)
/*
* NR_LOCKDEP_CACHING_CLASSES ... Number of classes
@@ -203,7 +203,7 @@ struct lock_chain {
u64 chain_key;
};
-#define MAX_LOCKDEP_KEYS_BITS 13
+#define MAX_LOCKDEP_KEYS_BITS (13 + 3)
/*
* Subtract one because we offset hlock->class_idx by 1 in order
* to make 0 mean no class. This avoids overflowing the class_idx
diff --git a/kernel/locking/lockdep_internals.h b/kernel/locking/lockdep_internals.h
index 51c4b24..fba7557 100644
--- a/kernel/locking/lockdep_internals.h
+++ b/kernel/locking/lockdep_internals.h
@@ -54,9 +54,9 @@ enum {
* table (if it's not there yet), and we check it for lock order
* conflicts and deadlocks.
*/
-#define MAX_LOCKDEP_ENTRIES 32768UL
+#define MAX_LOCKDEP_ENTRIES (32768UL << 5)
-#define MAX_LOCKDEP_CHAINS_BITS 16
+#define MAX_LOCKDEP_CHAINS_BITS (16 + 5)
#define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS)
#define MAX_LOCKDEP_CHAIN_HLOCKS (MAX_LOCKDEP_CHAINS*5)
@@ -65,7 +65,7 @@ enum {
* Stack-trace: tightly packed array of stack backtrace
* addresses. Protected by the hash_lock.
*/
-#define MAX_STACK_TRACE_ENTRIES 524288UL
+#define MAX_STACK_TRACE_ENTRIES (524288UL << 5)
extern struct list_head all_lock_classes;
extern struct lock_chain lock_chains[];

View File

@ -1,250 +0,0 @@
# Description: uzun donem kararli kernel surumu
# URL: http://www.kernel.org
# Packagers: milisarge
name=kernel-lts
version=4.4.27
_srcname=linux-4.4
release=3
_version=${version:0:3}
alias=(linux-lts)
# Virtualbox
vb_version=5.1.8
[ "`uname -m`" == "i686" ] && _VBARCH=x86
[ "`uname -m`" == "x86_64" ] && _VBARCH=amd64
# Broadcom
wl_version=6.30.223.271
_wlarch=_64
source=(\
http://www.kernel.org/pub/linux/kernel/v4.x/linux-${_version}.tar.xz
https://www.kernel.org/pub/linux/kernel/v4.x/patch-$version.xz
https://sourceforge.net/projects/kaosx/files/sources/virtualbox-modules/vbox-kernel-module-src-${vb_version}.tar.xz
http://www.broadcom.com/docs/linux_sta/hybrid-v35${_wlarch}-nodebug-pcoem-${wl_version//./_}.tar.gz
broadcom-wl.modprobe.d broadcom-wl.license.patch wl_linux.c.patch
aufs4-loopback.patch
aufs4-base.patch
aufs4-mmap.patch
aufs4-standalone.patch
aufs4-kbuild.patch
aufs4.4-20160912.patch
lockdep-debug.patch
tmpfs-idr.patch
vfs-ino.patch
aufs_type.h
$name.config_64
virtualbox.conf
virtualbox-modules-depmod.patch
https://github.com/milisarge/aufs/archive/master.tar.gz)
build(){
cd linux-${_version}
cp -r $SRC/aufs-master $SRC/fs/
if [ -f $SRC/patch-$version.xz ]; then
xz -d -c $SRC/patch-$version.xz | patch -Np1
fi
#aufs patches for Live:
patch -p1 -i "${SRC}/aufs4.4-20160912.patch"
patch -p1 -i "${SRC}/aufs4-base.patch"
patch -p1 -i "${SRC}/aufs4-kbuild.patch"
patch -p1 -i "${SRC}/aufs4-loopback.patch"
patch -p1 -i "${SRC}/aufs4-mmap.patch"
patch -p1 -i "${SRC}/aufs4-standalone.patch"
patch -p1 -i "${SRC}/lockdep-debug.patch"
patch -p1 -i "${SRC}/tmpfs-idr.patch"
patch -p1 -i "${SRC}/vfs-ino.patch"
make mrproper
cp $SRC/kernel-lts.config_64 ./.config
make
cp .config $SRC/$name.config_64
## Modules
#
# Kernel modules
cd $SRC/linux-${_version}
make INSTALL_MOD_PATH=$PKG modules_install
KERNEL_VERSION="${version}-milis-lts"
# Module broadcom is broken on 32 bits machine
if [ "$PKGMK_ARCH" == "x86_64" ]; then
cd $SRC
bsdtar xf $DERLEME_KAYNAKDIZIN/hybrid-v35${_wlarch}-nodebug-pcoem-${wl_version//./_}.tar.gz
patch -p1 -i broadcom-wl.license.patch
patch -p1 -i wl_linux.c.patch
sed -e "/BRCM_WLAN_IFNAME/s:eth:wlan:" \
-i src/wl/sys/wl_linux.c
BUILD_NOPEDANTIC=1 make -C $SRC/linux-${_version} M=`pwd`
install -m 0644 -D wl.ko $PKG/lib/modules/${KERNEL_VERSION}/kernel/drivers/zzzz/wl.ko
install -Dm644 broadcom-wl.modprobe.d $PKG/etc/modprobe.d/broadcom-wl.conf
fi
for i in *.ko
do
install -D -m0644 $i $PKG/lib/modules/${KERNEL_VERSION}/kernel/drivers/zzzz/$i
done
# Module virtualbox
cd vbox-kernel-module-src-5.1.8
patch -p0 -i $SRC/virtualbox-modules-depmod.patch
KERNELRELEASE=${version}
KERN_DIR=$SRC/linux-${_version} make
mkdir -p $PKG/etc/sysconfig/modules.d
install -D -m644 $SRC/virtualbox.conf $PKG/etc/sysconfig/modules.d/virtualbox.conf
for i in *.ko
do
install -D -m0644 $i $PKG/lib/modules/${KERNEL_VERSION}/kernel/drivers/zzzz/$i
done
# depmod needed
depmod -b $PKG -a ${KERNEL_VERSION}
install -D -m 644 $SRC/aufs_type.h "${PKG}/usr/include/linux/aufs_type.h"
# Install config and kernel files
cd $SRC/linux-${_version}
mkdir -p $PKG/boot
cp System.map $PKG/boot/System_64.map-$version
cp .config $PKG/boot/config_64-$version
cp arch/x86_64/boot/bzImage $PKG/boot/kernel-$version
#kaynak basliklarin ayarlanmasi
KARCH=x86
cd "${SRC}/${_srcname}"
install -D -m644 Makefile \
"${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/Makefile"
install -D -m644 kernel/Makefile \
"${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/kernel/Makefile"
install -D -m644 .config \
"${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/.config"
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include"
for i in acpi asm-generic config crypto drm generated keys linux math-emu \
media net pcmcia scsi soc sound trace uapi video xen; do
cp -a include/${i} "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include/"
done
# copy arch includes for external modules
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/arch/x86"
cp -a arch/x86/include "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/arch/x86/"
# copy files necessary for later builds, like nvidia and vmware
cp Module.symvers "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build"
cp -a scripts "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build"
# fix permissions on scripts dir
chmod og-w -R "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/scripts"
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/.tmp_versions"
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/arch/${KARCH}/kernel"
cp arch/${KARCH}/Makefile "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/arch/${KARCH}/"
cp arch/${KARCH}/kernel/asm-offsets.s "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/arch/${KARCH}/kernel/"
# add docbook makefile
install -D -m644 Documentation/DocBook/Makefile \
"${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/Documentation/DocBook/Makefile"
# add dm headers
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/md"
cp drivers/md/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/md"
# add inotify.h
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include/linux"
cp include/linux/inotify.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include/linux/"
# add wireless headers
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/net/mac80211/"
cp net/mac80211/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/net/mac80211/"
# add dvb headers for external modules
# in reference to:
# http://bugs.archlinux.org/task/9912
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-core"
cp drivers/media/dvb-core/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-core/"
# and...
# http://bugs.archlinux.org/task/11194
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include/config/dvb/"
cp include/config/dvb/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include/config/dvb/"
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
# in reference to:
# http://bugs.archlinux.org/task/13146
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-frontends/"
cp drivers/media/dvb-frontends/lgdt330x.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-frontends/"
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/i2c/"
cp drivers/media/i2c/msp3400-driver.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/i2c/"
# add dvb headers
# in reference to:
# http://bugs.archlinux.org/task/20402
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/usb/dvb-usb"
cp drivers/media/usb/dvb-usb/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/usb/dvb-usb/"
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-frontends"
cp drivers/media/dvb-frontends/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-frontends/"
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/tuners"
cp drivers/media/tuners/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/tuners/"
# add xfs and shmem for aufs building
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/fs/xfs"
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/mm"
# removed in 3.17 series
# cp fs/xfs/xfs_sb.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/fs/xfs/xfs_sb.h"
# copy in Kconfig files
for i in $(find . -name "Kconfig*"); do
mkdir -p "${PKG}"/usr/lib/modules/${KERNEL_VERSION}/build/`echo ${i} | sed 's|/Kconfig.*||'`
cp ${i} "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/${i}"
done
# add objtool for external module building and enabled VALIDATION_STACK option
if [ -f tools/objtool/objtool ]; then
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/tools/objtool"
cp -a tools/objtool/objtool ${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/tools/objtool/
fi
chown -R root.root "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build"
find "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build" -type d -exec chmod 755 {} \;
# strip scripts directory
find "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
case "$(file -bi "${binary}")" in
*application/x-sharedlib*) # Libraries (.so)
/usr/bin/strip ${STRIP_SHARED} "${binary}";;
*application/x-archive*) # Libraries (.a)
/usr/bin/strip ${STRIP_STATIC} "${binary}";;
*application/x-executable*) # Binaries
/usr/bin/strip ${STRIP_BINARIES} "${binary}";;
esac
done
# remove unneeded architectures
rm -rf "${PKG}"/usr/lib/modules/${KERNEL_VERSION}/build/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa}
# remove a files already in linux-docs package
rm -f "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/Documentation/kbuild/Kconfig.recursion-issue-01"
rm -f "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/Documentation/kbuild/Kconfig.recursion-issue-02"
rm -f "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/Documentation/kbuild/Kconfig.select-break"
# Firmware are in linux-firmware
rm -rf $PKG/lib/firmware
}

View File

@ -1,105 +0,0 @@
# Description: The latest stable kernel version
# URL: http://www.kernel.org
# Packagers: milisarge
name=kernel-lts
version=4.4.6
release=1
_version=${version%.*}
source=(http://www.kernel.org/pub/linux/kernel/v4.x/linux-${_version}.tar.xz
https://www.kernel.org/pub/linux/kernel/v4.x/patch-$version.xz
$name.config $name.config_64 )
build(){
cd linux-${_version}
if [ -f $SRC/patch-$version.xz ]; then
xz -d -c $SRC/patch-$version.xz | patch -Np1
fi
make mrproper
case `uname -m` in
x86_64)
cp $SRC/$name.config_64 ./.config;;
i?86)
cp $SRC/$name.config ./.config;
esac
# make menuconfig
make || make -j1
case `uname -m` in
x86_64)
cp .config $SRC/$name.config_64;;
i?86)
cp .config $SRC/$name.config;;
esac
# Install modules
cd $SRC/linux-${_version}
sed -i "/rm\ -rf\ \$(MODLIB)\/kernel/d" Makefile
make INSTALL_MOD_PATH=$PKG modules_install || make -j1 INSTALL_MOD_PATH=$PKG modules_install
mkdir -p $PKG/boot
case `uname -m` in
x86_64)
cp System.map \
$PKG/boot/System_64.map-$version
cp .config \
$PKG/boot/config_64-$version
cp arch/x86_64/boot/bzImage \
$PKG/boot/$name-$version ;;
i?86)
cp System.map \
$PKG/boot/System.map-$version
cp .config \
$PKG/boot/config-$version
cp arch/i386/boot/bzImage \
$PKG/boot/$name-$version ;;
esac
cd $PKG/lib/modules/${version}*/
mkdir -p $PKG/usr/src
mv $SRC/linux-${_version} $PKG/usr/src/
rm {build,source}
ln -sv /usr/src/linux-${_version} build
ln -sv /usr/src/linux-${_version} source
mkdir $SRC/linux-${_version}
mv $PKG/usr/src/linux-${_version}/Documentation \
$SRC/linux-${_version}
# Firmware are in linux-firmware
rm -rf $PKG/lib/firmware
# post-install autogen
INITRD_VERSION="`basename $PKG/lib/modules/*`"
echo "mkinitramfs $INITRD_VERSION" > $PKGMK_ROOT/$name.post-install
echo "[ -f boot/initrd ] && rm boot/initrd" >> $PKGMK_ROOT/$name.post-install
echo "ln -sf initrd-$INITRD_VERSION boot/initrd" >> $PKGMK_ROOT/$name.post-install
echo "ln -sf $name-$version boot/kernel" >> $PKGMK_ROOT/$name.post-install
#pre-install autogen
cd $SRC
if [ -f aaabasicfs-${AAABASICFS}.tar.xz ]; then
bsdtar -p -o -C $SRC -xf aaabasicfs-${AAABASICFS}.tar.xz
echo ". lib/lsb/init-functions" > $PKGMK_ROOT/$name.pre-install
for FILE in `tar --list --file aaabasicfs-${AAABASICFS}.tar.xz|grep -v /$`
do
echo "log_info_msg \"update $FILE\"" >> $PKGMK_ROOT/$name.pre-install
echo "cat > $FILE << \"END_OF_FILE\"" >> $PKGMK_ROOT/$name.pre-install
cat $SRC/$FILE >> $PKGMK_ROOT/$name.pre-install
echo "END_OF_FILE" >> $PKGMK_ROOT/$name.pre-install
echo "evaluate_retval" >> $PKGMK_ROOT/$name.pre-install
done
fi
}
rm -r $PKG/usr/src/

View File

@ -1,232 +0,0 @@
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index 50777b5..f9c6b3d 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -26,10 +26,13 @@ struct shmem_inode_info {
};
struct shmem_sb_info {
+ struct mutex idr_lock;
+ bool idr_nouse;
+ struct idr idr; /* manages inode-number */
unsigned long max_blocks; /* How many blocks are allowed */
struct percpu_counter used_blocks; /* How many are allocated */
- unsigned long max_inodes; /* How many inodes are allowed */
- unsigned long free_inodes; /* How many are left for allocation */
+ int max_inodes; /* How many inodes are allowed */
+ int free_inodes; /* How many are left for allocation */
spinlock_t stat_lock; /* Serialize shmem_sb_info changes */
kuid_t uid; /* Mount uid for root directory */
kgid_t gid; /* Mount gid for root directory */
diff --git a/mm/shmem.c b/mm/shmem.c
index 2afcdbb..4d81c75 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -112,9 +112,13 @@ static unsigned long shmem_default_max_blocks(void)
return totalram_pages / 2;
}
-static unsigned long shmem_default_max_inodes(void)
+static int shmem_default_max_inodes(void)
{
- return min(totalram_pages - totalhigh_pages, totalram_pages / 2);
+ unsigned long ul;
+
+ ul = INT_MAX;
+ ul = min3(ul, totalram_pages - totalhigh_pages, totalram_pages / 2);
+ return ul;
}
#endif
@@ -610,6 +614,7 @@ static int shmem_setattr(struct dentry *dentry, struct iattr *attr)
static void shmem_evict_inode(struct inode *inode)
{
struct shmem_inode_info *info = SHMEM_I(inode);
+ struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);
if (inode->i_mapping->a_ops == &shmem_aops) {
shmem_unacct_size(info->flags, inode->i_size);
@@ -625,6 +630,11 @@ static void shmem_evict_inode(struct inode *inode)
simple_xattrs_free(&info->xattrs);
WARN_ON(inode->i_blocks);
+ if (!sbinfo->idr_nouse && inode->i_ino) {
+ mutex_lock(&sbinfo->idr_lock);
+ idr_remove(&sbinfo->idr, inode->i_ino);
+ mutex_unlock(&sbinfo->idr_lock);
+ }
shmem_free_inode(inode->i_sb);
clear_inode(inode);
}
@@ -1418,13 +1428,13 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
struct inode *inode;
struct shmem_inode_info *info;
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
+ int ino;
if (shmem_reserve_inode(sb))
return NULL;
inode = new_inode(sb);
if (inode) {
- inode->i_ino = get_next_ino();
inode_init_owner(inode, dir, mode);
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
@@ -1465,6 +1475,25 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
mpol_shared_policy_init(&info->policy, NULL);
break;
}
+
+ if (!sbinfo->idr_nouse) {
+ /* inum 0 and 1 are unused */
+ mutex_lock(&sbinfo->idr_lock);
+ ino = idr_alloc(&sbinfo->idr, inode, 2, INT_MAX,
+ GFP_NOFS);
+ if (ino > 0) {
+ inode->i_ino = ino;
+ mutex_unlock(&sbinfo->idr_lock);
+ __insert_inode_hash(inode, inode->i_ino);
+ } else {
+ inode->i_ino = 0;
+ mutex_unlock(&sbinfo->idr_lock);
+ iput(inode);
+ /* shmem_free_inode() will be called */
+ inode = NULL;
+ }
+ } else
+ inode->i_ino = get_next_ino();
} else
shmem_free_inode(sb);
return inode;
@@ -2682,8 +2711,7 @@ static struct dentry *shmem_get_parent(struct dentry *child)
static int shmem_match(struct inode *ino, void *vfh)
{
__u32 *fh = vfh;
- __u64 inum = fh[2];
- inum = (inum << 32) | fh[1];
+ __u64 inum = fh[1];
return ino->i_ino == inum && fh[0] == ino->i_generation;
}
@@ -2694,14 +2722,11 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
struct dentry *dentry = NULL;
u64 inum;
- if (fh_len < 3)
+ if (fh_len < 2)
return NULL;
- inum = fid->raw[2];
- inum = (inum << 32) | fid->raw[1];
-
- inode = ilookup5(sb, (unsigned long)(inum + fid->raw[0]),
- shmem_match, fid->raw);
+ inum = fid->raw[1];
+ inode = ilookup5(sb, inum, shmem_match, fid->raw);
if (inode) {
dentry = d_find_alias(inode);
iput(inode);
@@ -2713,30 +2738,15 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len,
struct inode *parent)
{
- if (*len < 3) {
- *len = 3;
+ if (*len < 2) {
+ *len = 2;
return FILEID_INVALID;
}
- if (inode_unhashed(inode)) {
- /* Unfortunately insert_inode_hash is not idempotent,
- * so as we hash inodes here rather than at creation
- * time, we need a lock to ensure we only try
- * to do it once
- */
- static DEFINE_SPINLOCK(lock);
- spin_lock(&lock);
- if (inode_unhashed(inode))
- __insert_inode_hash(inode,
- inode->i_ino + inode->i_generation);
- spin_unlock(&lock);
- }
-
fh[0] = inode->i_generation;
fh[1] = inode->i_ino;
- fh[2] = ((__u64)inode->i_ino) >> 32;
- *len = 3;
+ *len = 2;
return 1;
}
@@ -2801,7 +2811,7 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo,
goto bad_val;
} else if (!strcmp(this_char,"nr_inodes")) {
sbinfo->max_inodes = memparse(value, &rest);
- if (*rest)
+ if (*rest || sbinfo->max_inodes < 2)
goto bad_val;
} else if (!strcmp(this_char,"mode")) {
if (remount)
@@ -2854,7 +2864,7 @@ static int shmem_remount_fs(struct super_block *sb, int *flags, char *data)
{
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
struct shmem_sb_info config = *sbinfo;
- unsigned long inodes;
+ int inodes;
int error = -EINVAL;
config.mpol = NULL;
@@ -2902,7 +2912,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root)
seq_printf(seq, ",size=%luk",
sbinfo->max_blocks << (PAGE_CACHE_SHIFT - 10));
if (sbinfo->max_inodes != shmem_default_max_inodes())
- seq_printf(seq, ",nr_inodes=%lu", sbinfo->max_inodes);
+ seq_printf(seq, ",nr_inodes=%d", sbinfo->max_inodes);
if (sbinfo->mode != (S_IRWXUGO | S_ISVTX))
seq_printf(seq, ",mode=%03ho", sbinfo->mode);
if (!uid_eq(sbinfo->uid, GLOBAL_ROOT_UID))
@@ -2991,6 +3001,8 @@ static void shmem_put_super(struct super_block *sb)
{
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
+ if (!sbinfo->idr_nouse)
+ idr_destroy(&sbinfo->idr);
percpu_counter_destroy(&sbinfo->used_blocks);
mpol_put(sbinfo->mpol);
kfree(sbinfo);
@@ -3009,6 +3021,8 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
if (!sbinfo)
return -ENOMEM;
+ mutex_init(&sbinfo->idr_lock);
+ idr_init(&sbinfo->idr);
sbinfo->mode = S_IRWXUGO | S_ISVTX;
sbinfo->uid = current_fsuid();
sbinfo->gid = current_fsgid();
@@ -3112,6 +3126,15 @@ static void shmem_destroy_inodecache(void)
kmem_cache_destroy(shmem_inode_cachep);
}
+static __init void shmem_no_idr(struct super_block *sb)
+{
+ struct shmem_sb_info *sbinfo;
+
+ sbinfo = SHMEM_SB(sb);
+ sbinfo->idr_nouse = true;
+ idr_destroy(&sbinfo->idr);
+}
+
static const struct address_space_operations shmem_aops = {
.writepage = shmem_writepage,
.set_page_dirty = __set_page_dirty_no_writeback,
@@ -3248,6 +3271,7 @@ int __init shmem_init(void)
printk(KERN_ERR "Could not kern_mount tmpfs\n");
goto out1;
}
+ shmem_no_idr(shm_mnt->mnt_sb);
return 0;
out1:

View File

@ -1,22 +0,0 @@
diff --git a/fs/inode.c b/fs/inode.c
index 1be5f90..b6678aa 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -844,6 +844,8 @@ unsigned int get_next_ino(void)
unsigned int *p = &get_cpu_var(last_ino);
unsigned int res = *p;
+start:
+
#ifdef CONFIG_SMP
if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) {
static atomic_t shared_last_ino;
@@ -856,7 +858,7 @@ unsigned int get_next_ino(void)
res++;
/* get_next_ino should not provide a 0 inode number */
if (unlikely(!res))
- res++;
+ goto start;
*p = res;
put_cpu_var(last_ino);
return res;

View File

@ -1,42 +0,0 @@
--- vboxdrv/Makefile 2016-03-04 18:47:50.000000000 +0200
+++ vboxdrv.new/Makefile 2016-03-08 13:04:56.287601296 +0200
@@ -300,7 +300,6 @@
install: $(MODULE)
@mkdir -p $(MODULE_DIR); \
install -m 0644 -o root -g root $(MODULE).$(MODULE_EXT) $(MODULE_DIR); \
- PATH="$(PATH):/bin:/sbin" depmod -a; \
rm -f /etc/vbox/module_not_compiled
install_rpm: $(MODULE)
--- vboxnetadp/Makefile 2016-03-04 18:47:50.000000000 +0200
+++ vboxnetadp.new/Makefile 2016-03-08 13:05:15.741103737 +0200
@@ -203,7 +203,6 @@
install: $(MODULE)
@mkdir -p $(MODULE_DIR); \
install -m 0644 -o root -g root $(MODULE).$(MODULE_EXT) $(MODULE_DIR); \
- PATH="$(PATH):/bin:/sbin" depmod -a; \
rm -f /etc/vbox/module_not_compiled
install_rpm: $(MODULE)
--- vboxnetflt/Makefile 2016-03-04 18:47:49.000000000 +0200
+++ vboxnetflt.new/Makefile 2016-03-08 13:05:30.709490190 +0200
@@ -207,7 +207,6 @@
install: $(MODULE)
@mkdir -p $(MODULE_DIR); \
install -m 0644 -o root -g root $(MODULE).$(MODULE_EXT) $(MODULE_DIR); \
- PATH="$(PATH):/bin:/sbin" depmod -a; \
rm -f /etc/vbox/module_not_compiled
install_rpm: $(MODULE)
--- vboxpci/Makefile 2016-03-04 18:47:50.000000000 +0200
+++ vboxpci.new/Makefile 2016-03-08 13:06:08.318460615 +0200
@@ -205,8 +205,7 @@
install: $(MODULE)
@mkdir -p $(MODULE_DIR); \
- install -m 0644 -o root -g root $(MODULE).$(MODULE_EXT) $(MODULE_DIR); \
- PATH="$(PATH):/bin:/sbin" depmod -a;
+ install -m 0644 -o root -g root $(MODULE).$(MODULE_EXT) $(MODULE_DIR);
install_rpm: $(MODULE)
@mkdir -p $(MODULE_DIR); \

View File

@ -1,4 +0,0 @@
vboxnetadp
vboxnetflt
vboxpci
vboxdrv

View File

@ -1,14 +0,0 @@
diff --git a/src/wl/sys/wl_linux.c.orig b/src/wl/sys/wl_linux.c
index eb00717..489c9f5 100644
--- a/src/wl/sys/wl_linux.c.orig
+++ b/src/wl/sys/wl_linux.c
@@ -2166,8 +2166,8 @@ wl_start(struct sk_buff *skb, struct net_device *dev)
wlif = WL_DEV_IF(dev);
wl = WL_INFO(dev);
+ skb->prev = NULL;
if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
- skb->prev = NULL;
TXQ_LOCK(wl);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,140 +0,0 @@
# Description: The latest stable kernel version with pf patch
# URL: https://pf.natalenko.name/
# Packagers: pierre at nutyx dot org, tnut at nutyx dot org, berlius at nutyx dot com
PKGMK_IGNORE_UNPACK="yes"
PKGMK_NO_STRIP="yes"
PKGMK_GROUPS=(devel doc)
name=kernel-pf
version=4.3
release=1
_version=${version%.*}
source=(https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-$version.tar.xz
https://pf.natalenko.name/sources/$version/patch-$version-pf1.xz
$name.config $name.config_64 )
build(){
bsdtar -p -o -C $SRC -xf linux-$version.tar.xz
cd linux-$version
if [ -f $SRC/patch-$version-pf1.xz ]; then
xz -d -c $SRC/patch-$version-pf1.xz | patch -Np1
fi
make mrproper
case `uname -m` in
x86_64)
cp -v $SRC/$name.config_64 ./.config;;
i?86)
cp -v $SRC/$name.config ./.config;
esac
#make xconfig
#make nconfig
make menuconfig
make || make -j1
case `uname -m` in
x86_64)
cp .config $SRC/$name.config_64;;
i?86)
cp .config $SRC/$name.config;;
esac
# Install modules
cd $SRC/linux-$version
sed -i "/rm\ -rf\ \$(MODLIB)\/kernel/d" Makefile
make INSTALL_MOD_PATH=$PKG modules_install || make -j1 INSTALL_MOD_PATH=$PKG modules_install
mkdir -p $PKG/boot
case `uname -m` in
x86_64)
cp System.map \
$PKG/boot/System_64.map-$version
cp .config \
$PKG/boot/config_64-$version
cp arch/x86_64/boot/bzImage \
$PKG/boot/$name-$version ;;
i?86)
cp System.map \
$PKG/boot/System.map-$version
cp .config \
$PKG/boot/config-$version
cp arch/i386/boot/bzImage \
$PKG/boot/$name-$version ;;
esac
cd $PKG/lib/modules/${version}*/
mkdir -p $PKG/usr/src
mv $SRC/linux-$version $PKG/usr/src/
rm {build,source}
ln -sv /usr/src/linux-$version build
ln -sv /usr/src/linux-$version source
mkdir $SRC/linux-$version
mv $PKG/usr/src/linux-$version/Documentation \
$SRC/linux-$version
# Firmware are in linux-firmware
rm -rf $PKG/lib/firmware
# post-install autogen
INITRD_VERSION="`basename $PKG/lib/modules/*`"
echo "mkinitramfs $INITRD_VERSION" > $PKGMK_ROOT/$name.post-install
echo "[ -f boot/initrd ] && rm boot/initrd" >> $PKGMK_ROOT/$name.post-install
echo "ln -sf initrd-$INITRD_VERSION boot/initrd" >> $PKGMK_ROOT/$name.post-install
echo "ln -sf $name-$version boot/kernel" >> $PKGMK_ROOT/$name.post-install
#pre-install autogen
cd $SRC
if [ -f aaabasicfs-${AAABASICFS}.tar.xz ]; then
bsdtar -p -o -C $SRC -xf aaabasicfs-${AAABASICFS}.tar.xz
echo ". lib/lsb/init-functions" > $PKGMK_ROOT/$name.pre-install
for FILE in `tar --list --file aaabasicfs-${AAABASICFS}.tar.xz|grep -v /$`
do
echo "log_info_msg \"update $FILE\"" >> $PKGMK_ROOT/$name.pre-install
echo "cat > $FILE << \"END_OF_FILE\"" >> $PKGMK_ROOT/$name.pre-install
cat $SRC/$FILE >> $PKGMK_ROOT/$name.pre-install
echo "END_OF_FILE" >> $PKGMK_ROOT/$name.pre-install
echo "evaluate_retval" >> $PKGMK_ROOT/$name.pre-install
done
fi
}
devel() {
cd $PKG
rm -r usr/src/linux-$version/{tools,ipc,init,drivers,firmware,fs,mm,samples,security,sound,virt}
for i in alpha arc arm arm26 arm64 avr32 blackfin c6x \
cris frv h8300 hexagon ia64 m32r m68k m68knommu metag \
mips microblaze mn10300 openrisc parisc powerpc ppc s390 \
score sh sh64 sparc sparc64 tile unicore32 um v850 xtensa
do rm -rf usr/src/linux-$version/arch/$i
done
bsdtar -cf \
$PKGMK_PACKAGE_DIR/$name.devel#$version-any.mps \
usr/src/linux-$version
rm -r usr
}
doc() {
cd $PKG
mkdir -p usr/share/doc/linux-$version
mv $SRC/linux-$version/Documentation \
usr/share/doc/linux-$version
bsdtar -cf \
$PKGMK_PACKAGE_DIR/$name.doc#$version-any.mps \
usr/share/doc/linux-$version
rm -r usr
}