usbarmory-kernel: remove package.
This commit is contained in:
parent
ac03413103
commit
f16426c603
4 changed files with 0 additions and 231 deletions
|
@ -1 +0,0 @@
|
|||
usbarmory-kernel
|
|
@ -1,75 +0,0 @@
|
|||
From 7ca88764d45c209791e8813131c1457c2e9e51e7 Mon Sep 17 00:00:00 2001
|
||||
From: Yevgeny Pats <yevgeny@perception-point.io>
|
||||
Date: Mon, 11 Jan 2016 12:05:28 +0000
|
||||
Subject: KEYS: Fix keyring ref leak in join_session_keyring()
|
||||
|
||||
If a thread is asked to join as a session keyring the keyring that's already
|
||||
set as its session, we leak a keyring reference.
|
||||
|
||||
This can be tested with the following program:
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <keyutils.h>
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
int i = 0;
|
||||
key_serial_t serial;
|
||||
|
||||
serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
|
||||
"leaked-keyring");
|
||||
if (serial < 0) {
|
||||
perror("keyctl");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (keyctl(KEYCTL_SETPERM, serial,
|
||||
KEY_POS_ALL | KEY_USR_ALL) < 0) {
|
||||
perror("keyctl");
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < 100; i++) {
|
||||
serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
|
||||
"leaked-keyring");
|
||||
if (serial < 0) {
|
||||
perror("keyctl");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
If, after the program has run, there something like the following line in
|
||||
/proc/keys:
|
||||
|
||||
3f3d898f I--Q--- 100 perm 3f3f0000 0 0 keyring leaked-keyring: empty
|
||||
|
||||
with a usage count of 100 * the number of times the program has been run,
|
||||
then the kernel is malfunctioning. If leaked-keyring has zero usages or
|
||||
has been garbage collected, then the problem is fixed.
|
||||
|
||||
Reported-by: Yevgeny Pats <yevgeny@perception-point.io>
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
---
|
||||
security/keys/process_keys.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git security/keys/process_keys.c security/keys/process_keys.c
|
||||
index a3f85d2..e6d50172 100644
|
||||
--- security/keys/process_keys.c
|
||||
+++ security/keys/process_keys.c
|
||||
@@ -794,6 +794,7 @@ long join_session_keyring(const char *name)
|
||||
ret = PTR_ERR(keyring);
|
||||
goto error2;
|
||||
} else if (keyring == new->session_keyring) {
|
||||
+ key_put(keyring);
|
||||
ret = 0;
|
||||
goto error2;
|
||||
}
|
||||
--
|
||||
2.7.0.rc3
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
# Template file for 'usbarmory-kernel'
|
||||
pkgname=usbarmory-kernel
|
||||
version=4.2.6
|
||||
revision=2
|
||||
_configrev=1952b30fcaa9a4e22f63fe22e033d312f491a11e
|
||||
wrksrc="linux-${version}"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
homepage="http://inversepath.com/usbarmory"
|
||||
license="GPL-2"
|
||||
short_desc="The Linux kernel and modules for the Inversepath USB armory"
|
||||
distfiles="${KERNEL_SITE}/kernel/v4.x/linux-${version}.tar.xz
|
||||
https://github.com/inversepath/usbarmory/archive/$_configrev.tar.gz"
|
||||
checksum="17db6b7dc0061135df39b376e325d01152df4087253e9563e1c7ceb4c736fb5c
|
||||
cddb30b47b3aa0fe5a012167d64d18110869c9055a0c2803ad8268cd297ce2db"
|
||||
|
||||
nodebug=yes
|
||||
nostrip=yes
|
||||
noverifyrdeps=yes
|
||||
noshlibprovides=yes
|
||||
|
||||
archs="armv7l*"
|
||||
hostmakedepends="perl kmod uboot-mkimage libressl bc"
|
||||
makedepends="ncurses-devel"
|
||||
triggers="kernel-hooks"
|
||||
|
||||
_kernver="${version}_${revision}"
|
||||
# These files could be modified when an external module is built.
|
||||
mutable_files="
|
||||
/usr/lib/modules/${_kernver}/modules.builtin.bin
|
||||
/usr/lib/modules/${_kernver}/modules.softdep
|
||||
/usr/lib/modules/${_kernver}/modules.dep
|
||||
/usr/lib/modules/${_kernver}/modules.dep.bin
|
||||
/usr/lib/modules/${_kernver}/modules.symbols
|
||||
/usr/lib/modules/${_kernver}/modules.symbols.bin
|
||||
/usr/lib/modules/${_kernver}/modules.alias
|
||||
/usr/lib/modules/${_kernver}/modules.alias.bin
|
||||
/usr/lib/modules/${_kernver}/modules.devname"
|
||||
|
||||
do_configure() {
|
||||
cp $XBPS_BUILDDIR/usbarmory-$_configrev/software/kernel_conf/usbarmory_linux-${version%.*}.config .config
|
||||
cp $XBPS_BUILDDIR/usbarmory-$_configrev/software/kernel_conf/imx53-usbarmory* arch/arm/boot/dts
|
||||
|
||||
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
|
||||
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
|
||||
}
|
||||
do_build() {
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
_args="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
||||
fi
|
||||
make ${makejobs} ${_args} ARCH=arm prepare
|
||||
make ${makejobs} ${_args} ARCH=arm uImage LOADADDR=0x70008000 modules imx53-usbarmory.dtb
|
||||
}
|
||||
do_install() {
|
||||
local hdrdest
|
||||
|
||||
# Run depmod after compressing modules.
|
||||
sed -i '2iexit 0' scripts/depmod.sh
|
||||
|
||||
# Install kernel, firmware and modules
|
||||
make ${makejobs} ARCH=arm INSTALL_MOD_PATH=${DESTDIR} modules_install
|
||||
|
||||
vmkdir boot
|
||||
mv arch/arm/boot/uImage ${DESTDIR}/boot
|
||||
mv arch/arm/boot/dts/imx53-usbarmory.dtb ${DESTDIR}/boot
|
||||
|
||||
hdrdest=${DESTDIR}/usr/src/${sourcepkg}-headers-${_kernver}
|
||||
|
||||
# Switch to /usr.
|
||||
vmkdir usr
|
||||
mv ${DESTDIR}/lib ${DESTDIR}/usr
|
||||
|
||||
cd ${DESTDIR}/usr/lib/modules/${_kernver}
|
||||
rm -f source build
|
||||
ln -sf ../../../src/${sourcepkg}-headers-${_kernver} build
|
||||
|
||||
cd ${wrksrc}
|
||||
# Install required headers to build external modules
|
||||
install -Dm644 Makefile ${hdrdest}/Makefile
|
||||
install -Dm644 kernel/Makefile ${hdrdest}/kernel/Makefile
|
||||
install -Dm644 .config ${hdrdest}/.config
|
||||
mkdir -p ${hdrdest}/include
|
||||
|
||||
# Remove firmware stuff provided by the "linux-firmware" pkg.
|
||||
rm -rf ${DESTDIR}/usr/lib/firmware
|
||||
|
||||
for i in acpi asm-generic config crypto drm generated linux math-emu \
|
||||
media net pcmcia scsi sound trace uapi video xen; do
|
||||
[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
|
||||
done
|
||||
|
||||
cd ${wrksrc}
|
||||
# Copy files necessary for later builds.
|
||||
cp Module.symvers ${hdrdest}
|
||||
cp -a scripts ${hdrdest}
|
||||
|
||||
# fix permissions on scripts dir
|
||||
chmod og-w -R ${hdrdest}/scripts
|
||||
|
||||
# copy arch includes for external modules
|
||||
mkdir -p ${hdrdest}/arch/arm/mach-imx
|
||||
cp -a arch/arm/include ${hdrdest}/arch/arm
|
||||
|
||||
mkdir -p ${hdrdest}/arch/arm/kernel
|
||||
|
||||
cp arch/arm/Makefile ${hdrdest}/arch/arm
|
||||
cp arch/arm/kernel/asm-offsets.s ${hdrdest}/arch/arm/kernel
|
||||
|
||||
# Add docbook makefile
|
||||
install -Dm644 Documentation/DocBook/Makefile \
|
||||
${hdrdest}/Documentation/DocBook/Makefile
|
||||
|
||||
# Add md headers
|
||||
mkdir -p ${hdrdest}/drivers/md
|
||||
cp drivers/md/*.h ${hdrdest}/drivers/md
|
||||
|
||||
# Add inotify.h
|
||||
mkdir -p ${hdrdest}/include/linux
|
||||
cp include/linux/inotify.h ${hdrdest}/include/linux
|
||||
|
||||
# Add wireless headers
|
||||
mkdir -p ${hdrdest}/net/mac80211/
|
||||
cp net/mac80211/*.h ${hdrdest}/net/mac80211
|
||||
|
||||
# Copy in Kconfig files
|
||||
for i in $(find . -name "Kconfig*"); do
|
||||
mkdir -p ${hdrdest}/$(echo $i | sed 's|/Kconfig.*||')
|
||||
cp $i ${hdrdest}/$i
|
||||
done
|
||||
|
||||
# Remove unneeded architectures
|
||||
for arch in alpha arm26 avr32 blackfin cris frv h8300 \
|
||||
ia64 m* p* s* um v850 x86 xtensa; do
|
||||
rm -rf ${hdrdest}/arch/${arch}
|
||||
done
|
||||
|
||||
# Compress all modules with xz to save a few MBs.
|
||||
msg_normal "$pkgver: compressing kernel modules with gzip, please wait...\n"
|
||||
find ${DESTDIR} -name '*.ko' | xargs -n1 -P0 gzip -9
|
||||
|
||||
# ... and run depmod again.
|
||||
depmod -b ${DESTDIR}/usr -F System.map ${_kernver}
|
||||
}
|
||||
|
||||
usbarmory-kernel-headers_package() {
|
||||
nostrip=yes
|
||||
noverifyrdeps=yes
|
||||
noshlibprovides=yes
|
||||
short_desc="The Linux kernel headers for the Inversepath USB armory"
|
||||
pkg_install() {
|
||||
vmove usr/src
|
||||
vmove usr/lib/modules/${_kernver}/build
|
||||
}
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
site="http://www.kernel.org/pub/linux/kernel/v4.x/"
|
||||
pattern="linux-\K[\d.]+(?=\.tar)"
|
Loading…
Reference in a new issue