Re: Linux null-pointer deref in 3.16.7-ctk2-1 (was: Bug#776192: upgrade-reports wheezy to jessie boot problem)

2015-04-02 Thread Bill MacAllister



--On Sunday, January 25, 2015 11:25:34 AM +0100 Niels Thykier 
ni...@thykier.net wrote:


I have CC'ed the Debian linux maintainers as I noticed your kernel
reports a null pointer deference in the kernel (see below for the
trace).  I have taken the liberty of reassigning it to the linux package
as well.
  @linux maintainers: if you suspect that the null pointer issue is
unrelated to Bills boot problem, please clone the bug and throw the bug
back to upgrade-reports for further analysis.

Bug link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776192

Thanks,
~Niels


Any news on this problem?  I am still seeing this problem even though
we have moved on to 3.16.7-ckt7-1.

I had the thought to look at the kernel modules that support the
PERC controller on these Dell systems.  Explicitly specifying the
mpt* modules and updating initramfs does not fix the problem.

We have plenty of these 1950s.  I really need to come up with a
work around or a solution to this problem.  Any ideas about what
I should try next?

Bill

--

Bill MacAllister
Systems Programmer, Stanford University


--
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/16ca84a2e7b4c05a31a6c...@keddie.ca-zephyr.org



Re: [PATCH] ext4: fix race between write and fcntl(F_SETFL) ping.

2015-04-02 Thread Ben Hutchings
On Thu, 2015-04-02 at 10:15 -0400, Theodore Ts'o wrote:
 On Wed, Apr 01, 2015 at 10:23:37PM +0300, Dmitry Monakhov wrote:
   Wow I've just got a good present for a fools day.
   It is appeared that stable kernel still has this bug(CVE-2014-8086) 
   unfixed.
   At least my notebook (debian/testing 3.16.5) oopsed like follows:
  
   3.16 is not a stable kernel I maintain, it's long since dead.
  Ohh. I see. So this is just a unstable Debian's crap.
   Is there a specific patch I should be applying to the 3.14 or 3.10
   kernels that solve this problem?
  Yes original commit is a41537e69b4aa43f0fea02498c2595a81267383b
  In fact 3.14 and 3.10 already has fixes.
  3.14 07110343605adc3f
  3.10 30d8c8352812e924
 
 Dmitry, if you open a bug report against the Debian kernel, I'm sure
 they'll take care of applying a backport of the patch --- especially
 since this is a potential security issue (CVE-2014-8086).

The fix was cherry-picked in 3.16.7-ckt1 (commit 01eca100c06d) and the
current packages in testing/unstable are based on 3.16.7-ckt7.

Dmitry, you should install one of the metapackages like
linux-image-amd64 in order to get automatic upgrades when there is an
ABI bump.

Ben.

-- 
Ben Hutchings
Lowery's Law:
 If it jams, force it. If it breaks, it needed replacing anyway.


signature.asc
Description: This is a digitally signed message part


Bug#781778: linux-image-3.16.0-4-amd64: Xorg startup delayed (minutes), errors reported by i915 driver

2015-04-02 Thread Dimitri Chausson
Package: src:linux
Version: 3.16.7-ckt7-1
Severity: normal

Dear Maintainer,

I guess the problem eventually occured after a system update. Until now, I do
not have a solution, I did not find the same description in forums / posts /
bug reports..

Thanks for your time,

Dimitri

-- Package-specific info:
** Version:
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 
4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt7-1 (2015-03-01)

** Command line:
BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-amd64 
root=UUID=5d41cc9b-817f-44a6-82c9-75898ef11f11 ro quiet

** Tainted: W (512)
 * Taint on warning.

** Kernel log:
[   12.898566] EXT4-fs (sdb2): mounting ext3 file system using the ext4 
subsystem
[   12.948220] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: 
(null)
[   12.954355] systemd-journald[181]: Received request to flush runtime journal 
from PID 1
[   13.044101] alx :02:00.0: irq 46 for MSI/MSI-X
[   13.044238] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   13.045006] alx :02:00.0 eth1: NIC Up: 1 Gbps Full
[   13.045217] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   13.807729] cfg80211: Calling CRDA to update world regulatory domain
[   13.899500] cfg80211: World regulatory domain updated:
[   13.899504] cfg80211:  DFS Master region: unset
[   13.899505] cfg80211:   (start_freq - end_freq @ bandwidth), 
(max_antenna_gain, max_eirp), (dfs_cac_time)
[   13.899508] cfg80211:   (2402000 KHz - 2472000 KHz @ 4 KHz), (N/A, 2000 
mBm), (N/A)
[   13.899509] cfg80211:   (2457000 KHz - 2482000 KHz @ 4 KHz), (N/A, 2000 
mBm), (N/A)
[   13.899511] cfg80211:   (2474000 KHz - 2494000 KHz @ 2 KHz), (N/A, 2000 
mBm), (N/A)
[   13.899513] cfg80211:   (517 KHz - 525 KHz @ 8 KHz, 16 KHz 
AUTO), (N/A, 2000 mBm), (N/A)
[   13.899515] cfg80211:   (525 KHz - 533 KHz @ 8 KHz, 16 KHz 
AUTO), (N/A, 2000 mBm), (0 s)
[   13.899516] cfg80211:   (549 KHz - 573 KHz @ 16 KHz), (N/A, 2000 
mBm), (0 s)
[   13.899517] cfg80211:   (5735000 KHz - 5835000 KHz @ 8 KHz), (N/A, 2000 
mBm), (N/A)
[   13.899519] cfg80211:   (5724 KHz - 6372 KHz @ 216 KHz), (N/A, 0 
mBm), (N/A)
[   14.266335] [drm:cpt_set_fifo_underrun_reporting] *ERROR* uncleared pch fifo 
underrun on pch transcoder B
[ 1804.139623] [ cut here ]
[ 1804.139644] WARNING: CPU: 0 PID: 1194 at 
/build/linux-SAvLSw/linux-3.16.7-ckt7/drivers/gpu/drm/i915/intel_display.c:4952 
intel_modeset_check_state+0x775/0x780 [i915]()
[ 1804.139646] wrong connector dpms state
[ 1804.139647] Modules linked in: cfg80211 rfkill binfmt_misc 
x86_pkg_temp_thermal intel_powerclamp intel_rapl coretemp kvm crc32_pclmul 
ghash_clmulni_intel iTCO_wdt iTCO_vendor_support aesni_intel i915 aes_x86_64 
drm_kms_helper drm joydev lrw gf128mul i2c_i801 glue_helper ablk_helper 
i2c_algo_bit loop cryptd evdev snd_hda_codec_hdmi snd_hda_codec_realtek 
snd_hda_codec_generic i2c_core lpc_ich shpchp mei_me mfd_core snd_hda_intel 
pcspkr mei psmouse fuse snd_hda_controller snd_hda_codec snd_hwdep snd_pcm 
tpm_infineon snd_timer parport_pc tpm_tis snd soundcore battery tpm video 
serio_raw processor ppdev button lp parport autofs4 ext4 crc16 mbcache jbd2 sg 
sd_mod crc_t10dif sr_mod crct10dif_generic cdrom hid_generic ata_generic usbhid 
hid crct10dif_pclmul crct10dif_common crc32c_intel ata_piix via_rhine
[ 1804.139693]  ahci mii alx mdio libahci pata_jmicron ehci_pci libata xhci_hcd 
ehci_hcd scsi_mod usbcore usb_common thermal fan thermal_sys
[ 1804.139706] CPU: 0 PID: 1194 Comm: Xorg Not tainted 3.16.0-4-amd64 #1 Debian 
3.16.7-ckt7-1
[ 1804.139707] Hardware name: Gigabyte Technology Co., Ltd. To be filled by 
O.E.M./H77-DS3H, BIOS F8c 11/21/2012
[ 1804.139709]  0009 81509e7c 88021321bcf0 
81067727
[ 1804.139712]  8800d4109400 88021321bd40 880215b06028 
8800d4207800
[ 1804.139715]   8106778c a04feb45 
8818
[ 1804.139718] Call Trace:
[ 1804.139725]  [81509e7c] ? dump_stack+0x41/0x51
[ 1804.139730]  [81067727] ? warn_slowpath_common+0x77/0x90
[ 1804.139733]  [8106778c] ? warn_slowpath_fmt+0x4c/0x50
[ 1804.139744]  [a04c852c] ? intel_hdmi_get_hw_state+0x4c/0xc0 [i915]
[ 1804.139755]  [a04906d0] ? gen6_read32+0x120/0x120 [i915]
[ 1804.139765]  [a04a9405] ? intel_modeset_check_state+0x775/0x780 
[i915]
[ 1804.139773]  [a040efd6] ? 
drm_mode_obj_set_property_ioctl+0x396/0x3b0 [drm]
[ 1804.139779]  [a040f01e] ? 
drm_mode_connector_property_set_ioctl+0x2e/0x40 [drm]
[ 1804.139785]  [a03fe8b7] ? drm_ioctl+0x1c7/0x5b0 [drm]
[ 1804.139790]  [811b9ecf] ? do_vfs_ioctl+0x2cf/0x4b0
[ 1804.139793]  [81079525] ? restore_altstack+0x15/0x30
[ 1804.139797]  [81013066] ? sys_rt_sigreturn+0xa6/0xb0
[ 1804.139800]  [811ba131] ? SyS_ioctl+0x81/0xa0
[ 1804.139804]  [815105c9] ? 

Re: [PATCH 2/4] builddeb: install dtbs

2015-04-02 Thread Rtp
riku.voi...@linaro.org writes:

Hi,

 From: Riku Voipio riku.voi...@linaro.org

 When kernel is built with CONFIG_OF, install all built device
 tree files built. The installation location used is same as
 toplevel INSTALL_DTBS_PATH.

Already sent a better patch for that (your patch is not handling
system with CONFIG_OF and without dtbs_install):
http://www.spinics.net/lists/linux-kbuild/msg10794.html
but looks like not yet merged.

Arnaud


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/87k2xu3frr@lebrac.rtp-net.org



Bug#781740: linux-image-3.16.0-4-amd64: WLAN hangs if SD cardreader is used on USB3 port

2015-04-02 Thread Michael Becker
Package: src:linux
Version: 3.16.7-ckt7-1
Severity: normal

if a SD cardreader is used in the USB3 port after some seconds the WLAN 
connection hangs
as soon as the reader is detached the WLAN continues to work

-- Package-specific info:
** Version:
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 
4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt7-1 (2015-03-01)

** Command line:
BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-amd64 
root=UUID=786e6cdc-b4b7-4295-978e-eb5129146c83 ro quiet

** Tainted: O (4096)
 * Out-of-tree module has been loaded.

** Kernel log:
[1.834629] usbhid: USB HID core driver
[1.834816] media: Linux media interface: v0.10
[1.836864] input: SYNAPTICS Synaptics Large Touch Screen as 
/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:06CB:0AF8.0002/input/input11
[1.838677] hid-multitouch 0003:06CB:0AF8.0002: input,hiddev0,hidraw1: USB 
HID v1.11 Mouse [SYNAPTICS Synaptics Large Touch Screen] on 
usb-:00:14.0-3/input0
[1.838748] Linux video capture interface: v2.00
[1.845371] uvcvideo: Found UVC 1.00 device Integrated_Webcam_HD (1bcf:28ac)
[1.853666] input: Integrated_Webcam_HD as 
/devices/pci:00/:00:14.0/usb1/1-5/1-5:1.0/input/input13
[1.853756] usbcore: registered new interface driver uvcvideo
[1.853756] USB Video Class driver (1.1.1)
[1.950073] usb 3-1: New USB device found, idVendor=8087, idProduct=8000
[1.950075] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[1.950393] hub 3-1:1.0: USB hub found
[1.950468] hub 3-1:1.0: 8 ports detected
[2.614099] Switched to clocksource tsc
[2.673920] Console: switching to colour frame buffer device 240x67
[2.680794] i915 :00:02.0: fb0: inteldrmfb frame buffer device
[2.680795] i915 :00:02.0: registered panic notifier
[2.680941] systemd-journald[183]: Received request to flush runtime journal 
from PID 1
[2.719188] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[2.719357] input: Video Bus as 
/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input14
[2.719535] [drm] Initialized i915 1.6.0 20080730 for :00:02.0 on minor 0
[2.719981] ACPI Warning: SystemIO range 
0xefa0-0xefbf conflicts with OpRegion 
0xefa0-0xefaf (\_SB_.PCI0.SBUS.SMBI) 
(20140424/utaddress-258)
[2.719987] ACPI: If an ACPI driver is available for this device, you should 
use it instead of the native driver
[2.725920] snd_hda_intel :00:03.0: irq 62 for MSI/MSI-X
[2.736791] input: HDA Intel HDMI HDMI/DP,pcm=3 as 
/devices/pci:00/:00:03.0/sound/card0/input15
[2.736864] input: HDA Intel HDMI HDMI/DP,pcm=7 as 
/devices/pci:00/:00:03.0/sound/card0/input16
[2.736928] input: HDA Intel HDMI HDMI/DP,pcm=8 as 
/devices/pci:00/:00:03.0/sound/card0/input17
[2.810134] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
[2.936230] vboxdrv: Found 4 processor cores.
[2.937002] vboxdrv: fAsync=0 offMin=0x10e offMax=0xc54
[2.937338] vboxdrv: TSC mode is 'synchronous', kernel timer mode is 
'normal'.
[2.937341] vboxdrv: Successfully loaded version 4.3.18_Debian (interface 
0x001a0008).
[2.962230] vboxpci: IOMMU not found (not registered)
[3.026462] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[3.026465] Bluetooth: BNEP filters: protocol multicast
[3.026472] Bluetooth: BNEP socket layer initialized
[3.158552] iwlwifi :02:00.0: L1 Enabled - LTR Enabled
[3.158801] iwlwifi :02:00.0: L1 Enabled - LTR Enabled
[3.173299] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[6.872833] wlan0: authenticate with 00:24:fe:a5:c9:bb
[6.876739] wlan0: send auth to 00:24:fe:a5:c9:bb (try 1/3)
[6.883036] wlan0: authenticated
[6.885339] wlan0: associate with 00:24:fe:a5:c9:bb (try 1/3)
[6.895617] wlan0: RX AssocResp from 00:24:fe:a5:c9:bb (capab=0x431 status=0 
aid=1)
[6.897016] wlan0: associated
[6.897039] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   67.922809] usb 1-2: new high-speed USB device number 5 using xhci_hcd
[   83.231657] usb 2-2: new SuperSpeed USB device number 2 using xhci_hcd
[   83.250083] usb 2-2: New USB device found, idVendor=05e3, idProduct=0743
[   83.250092] usb 2-2: New USB device strings: Mfr=3, Product=4, SerialNumber=5
[   83.250096] usb 2-2: Product: USB Storage
[   83.250099] usb 2-2: Manufacturer: Generic
[   83.250102] usb 2-2: SerialNumber: 0819
[   83.274707] usb-storage 2-2:1.0: USB Mass Storage device detected
[   83.274819] scsi4 : usb-storage 2-2:1.0
[   83.274936] usbcore: registered new interface driver usb-storage
[   84.272768] scsi 4:0:0:0: Direct-Access Generic  STORAGE DEVICE   0819 
PQ: 0 ANSI: 6
[   84.273147] sd 4:0:0:0: Attached scsi generic sg1 type 0
[   84.274020] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[   89.167253] sd 4:0:0:0: [sdb] 62879744 512-byte logical blocks: (32.1 

Re: [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture

2015-04-02 Thread Rtp
riku.voi...@linaro.org writes:

 From: Ben Hutchings b...@decadent.org.uk

 The Debian armhf architecture uses the ARM EABI hard-float variant,
 whereas armel uses the soft-float variant.  If the compiler used
 to compile the kernel uses the __ARM_PCS_VFP ABI, the compiler
 targets armhf architecture.

 v3 by Riku: Use gcc define instead of CONFIG_VFP

 Cc: debian-...@lists.debian.org
 Signed-off-by: Ben Hutchings b...@decadent.org.uk
 Signed-off-by: Riku Voipio riku.voi...@linaro.org
 ---
  scripts/package/builddeb | 11 ++-
  1 file changed, 10 insertions(+), 1 deletion(-)

 diff --git a/scripts/package/builddeb b/scripts/package/builddeb
 index 88dbf23..146b74f 100755
 --- a/scripts/package/builddeb
 +++ b/scripts/package/builddeb
 @@ -45,7 +45,16 @@ create_package() {
   arm64)
   debarch=arm64 ;;
   arm*)
 - debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG  echo el 
 || true) ;;
 + if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
 + if $CC -dM -E -  /dev/null|grep -q __ARM_PCS_VFP; then

Actually, I guess there's nothing preventing you building a armhf kernel
with a compiler not having __ARM_PCS_VFP defined by default, but I'm not sure
we should take care of this case. One can always use KBUILD_DEBARCH=armhf.

Arnaud


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/87fv8i3fiw@lebrac.rtp-net.org



[PATCH 2/4] builddeb: install dtbs

2015-04-02 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org

When kernel is built with CONFIG_OF, install all built device
tree files built. The installation location used is same as
toplevel INSTALL_DTBS_PATH.

Signed-off-by: Riku Voipio riku.voi...@linaro.org
---
 scripts/package/builddeb | 4 
 1 file changed, 4 insertions(+)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 146b74f..147264e 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -174,6 +174,10 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
fi
 fi
 
+if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then
+   $MAKE dtbs_install KBUILD_SRC= 
INSTALL_DTBS_PATH=$tmpdir/boot/dtbs/$version/
+fi
+
 if [ $ARCH != um ]; then
$MAKE headers_check KBUILD_SRC=
$MAKE headers_install KBUILD_SRC= 
INSTALL_HDR_PATH=$libc_headers_dir/usr
-- 
2.1.4


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/f5cc7f6394efe3d5404beb5588b67671dca9fb74.1427968988.git.riku.voi...@linaro.org



Bug#781002: initramfs-tools: no kernel modules are insert into initrd

2015-04-02 Thread maximilian attems
On Wed, Apr 01, 2015 at 06:10:05PM -0700, Marc MERLIN wrote:
 Could I make a few suggestions while we're at it?
 1) I sometimes build an initrd for a kernel I haven't installed yet. Yes,
 it's a mistake, but it happily succeeds and creates an initrd without any
 modules which then creates a non booting system.
 = initramfs should abort if its generated /lib/modules/kernel is empty

I thought this was caught.
 
 2) initramfs creates a temporary directory where it puts everything, and
 then deletes it before you can inspect it for debugging.
 = Add a --debug that leaves that directory behind for inspection.
 Right now I have to unpack the initrd image which is more and more of a
 pain as it becomes a bundled binary of concatenated cpio images and god
 knows what.

-k :P
as usual read the nice man mkinitramfs (;
 
 3) document the binwalk method of unpacking initrd to debug if needed
 (somewhere in the manpage):
 http://unix.stackexchange.com/questions/163346/why-is-it-that-my-initrd-only-has-one-directory-namely-kernel
 .
 Or for the archives:
 legolas [mc]# binwalk initrd.img
 pick up the offset of the 2nd initrd image, and unpack like so:
 legolas [mc]# cd subdir; dd if=../initrd.img bs=21136 skip=1 | gunzip |
 cpio -idv

lsinitramfs shows you the content.

sunny greetings,

-- 
maks


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150402122928.GA31518@gluino



Re: [PATCH 2/4] builddeb: install dtbs

2015-04-02 Thread Rtp
Arnaud Patard (Rtp) arnaud.pat...@rtp-net.org writes:

(replying to self)

 riku.voi...@linaro.org writes:

 Hi,

 From: Riku Voipio riku.voi...@linaro.org

 When kernel is built with CONFIG_OF, install all built device
 tree files built. The installation location used is same as
 toplevel INSTALL_DTBS_PATH.

 Already sent a better patch for that (your patch is not handling
 system with CONFIG_OF and without dtbs_install):
 http://www.spinics.net/lists/linux-kbuild/msg10794.html

Oops. Wrong version. The right one is v4:
http://www.spinics.net/lists/linux-kbuild/msg10832.html

Arnaud


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/87bnj63es2@lebrac.rtp-net.org



[PATCH 0/4] builddeb improvements

2015-04-02 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org

A collection of patches to improve the make deb-pkg target
first three patches should be quite straight-forward changes,
but the last one is more complicated. 

Ben Hutchings (1):
  deb-pkg: Add automatic support for armhf architecture

Riku Voipio (3):
  builddeb: install dtbs
  builddeb: simplify directory creation
  RFC: builddeb: add linux-tools package with perf

 scripts/package/builddeb | 67 
 1 file changed, 50 insertions(+), 17 deletions(-)

-- 
2.1.4


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/cover.1427968988.git.riku.voi...@linaro.org



[PATCH 3/4] builddeb: simplify directory creation

2015-04-02 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org

Every package needs /usr/share/doc/$package_name and
DEBIAN directory, so create them as part of create_package
function.

Signed-off-by: Riku Voipio riku.voi...@linaro.org
---
 scripts/package/builddeb | 21 ++---
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 147264e..36185d6 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -15,6 +15,8 @@ set -e
 create_package() {
local pname=$1 pdir=$2
 
+   mkdir -m 755 -p $pdir/DEBIAN
+   mkdir -p $pdir/usr/share/doc/$pname
cp debian/copyright $pdir/usr/share/doc/$pname/
cp debian/changelog $pdir/usr/share/doc/$pname/changelog.Debian
gzip -9 $pdir/usr/share/doc/$pname/changelog.Debian
@@ -118,25 +120,13 @@ BUILD_DEBUG=$(grep -s '^CONFIG_DEBUG_INFO=y' 
$KCONFIG_CONFIG || true)
 
 # Setup the directory structure
 rm -rf $tmpdir $fwdir $kernel_headers_dir $libc_headers_dir $dbg_dir
-mkdir -m 755 -p $tmpdir/DEBIAN
-mkdir -p  $tmpdir/lib $tmpdir/boot $tmpdir/usr/share/doc/$packagename
-mkdir -m 755 -p $fwdir/DEBIAN
-mkdir -p $fwdir/lib/firmware/$version/ $fwdir/usr/share/doc/$fwpackagename
-mkdir -m 755 -p $libc_headers_dir/DEBIAN
-mkdir -p $libc_headers_dir/usr/share/doc/$libc_headers_packagename
-mkdir -m 755 -p $kernel_headers_dir/DEBIAN
-mkdir -p $kernel_headers_dir/usr/share/doc/$kernel_headers_packagename
+mkdir -p $tmpdir/lib $tmpdir/boot
+mkdir -p $fwdir/lib/firmware/$version/
 mkdir -p $kernel_headers_dir/lib/modules/$version/
-if [ $ARCH = um ] ; then
-   mkdir -p $tmpdir/usr/lib/uml/modules/$version $tmpdir/usr/bin
-fi
-if [ -n $BUILD_DEBUG ] ; then
-   mkdir -p $dbg_dir/usr/share/doc/$dbg_packagename
-   mkdir -m 755 -p $dbg_dir/DEBIAN
-fi
 
 # Build and install the kernel
 if [ $ARCH = um ] ; then
+   mkdir -p $tmpdir/usr/lib/uml/modules/$version $tmpdir/usr/bin 
$tmpdir/usr/share/doc/$packagename
$MAKE linux
cp System.map $tmpdir/usr/lib/uml/modules/$version/System.map
cp $KCONFIG_CONFIG $tmpdir/usr/share/doc/$packagename/config
@@ -194,6 +184,7 @@ if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then
 else
want_initrd=No
 fi
+mkdir -m 755 -p $tmpdir/DEBIAN
 for script in postinst postrm preinst prerm ; do
mkdir -p $tmpdir$debhookdir/$script.d
cat EOF  $tmpdir/DEBIAN/$script
-- 
2.1.4


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/7afba8dbcecde5693d7ae38e6bd960380696.1427968988.git.riku.voi...@linaro.org



[PATCH 4/4] RFC: builddeb: add linux-tools package with perf

2015-04-02 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org

Perf is shipped in debian in linux-tools-$version package. Extend
the existing to builddeb script to build perf if BUILD_TOOLS=y
is added the make deb-pkg line

Some features of this patch I'm uncomfortable with:

1. Relative paths are resoved to absolute ones
   Especially with separate O= buildd, perf build from tools/perf dir
   fail.

2. Unsetting LDFLAGS
   make - shell (builddeb) - make expands variables. The LDFLAGS as
   set by toplevel makefile are for kernel, so we just unset the flag
   here.

3. Replaces ubuntu/debian packages instead attempting to fit to
   the linux-base/linux-tools-common frameworks. I think people who
   want to run make deb-pkg for their kernels would rather keep this
   simple.

4. More tools than just perf could be built - unfortunately most
   tools fail to have a working install target and/or else have
   build process inconsistent with other tools. A topic for another
   patch series.

Signed-off-by: Riku Voipio riku.voi...@linaro.org
---
 scripts/package/builddeb | 31 ++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 36185d6..2d6d547 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -92,11 +92,13 @@ fwdir=$objtree/debian/fwtmp
 kernel_headers_dir=$objtree/debian/hdrtmp
 libc_headers_dir=$objtree/debian/headertmp
 dbg_dir=$objtree/debian/dbgtmp
+tools_dir=$objtree/debian/toolstmp
 packagename=linux-image-$version
 fwpackagename=linux-firmware-image-$version
 kernel_headers_packagename=linux-headers-$version
 libc_headers_packagename=linux-libc-dev
 dbg_packagename=$packagename-dbg
+tools_packagename=linux-tools-$version
 
 if [ $ARCH = um ] ; then
packagename=user-mode-linux-$version
@@ -119,7 +121,7 @@ esac
 BUILD_DEBUG=$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)
 
 # Setup the directory structure
-rm -rf $tmpdir $fwdir $kernel_headers_dir $libc_headers_dir $dbg_dir
+rm -rf $tmpdir $fwdir $kernel_headers_dir $libc_headers_dir $dbg_dir 
$tools_dir
 mkdir -p $tmpdir/lib $tmpdir/boot
 mkdir -p $fwdir/lib/firmware/$version/
 mkdir -p $kernel_headers_dir/lib/modules/$version/
@@ -387,4 +389,31 @@ EOF
create_package $dbg_packagename $dbg_dir
 fi
 
+if [ -n $BUILD_TOOLS ]
+then
+   # HACK - change output dir from relative to absolute
+   mkdir -p $tools_dir
+   tools_dest=`readlink -f $tools_dir`
+   if [ -n $O ]
+   then
+   output=`readlink -f $objtree`
+   mkdir -p $output/tools/perf
+   output=O=$output/tools/perf
+   fi
+   $MAKE -C $srctree/tools/perf $output LDFLAGS= srctree=$KBUILD_SRC 
prefix=$tools_dest/usr install
+   cat EOF  debian/control
+
+Package: $tools_packagename
+Architecture: any
+Replaces: linux-base, linux-tools-common
+Depends: \${shlibs:Depends}
+Description: Performance analysis tools for Linux $version
+ This package contains the 'perf' performance analysis tools for Linux
+ kernel version $version .
+EOF
+
+   dpkg-shlibdeps $tools_dest/usr/bin/* 
$tools_dest/usr/lib/traceevent/plugins/*
+   create_package $tools_packagename $tools_dir
+fi
+
 exit 0
-- 
2.1.4


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/51b2a18cb7801c2866233a19506c4eead4727887.1427968988.git.riku.voi...@linaro.org



Re: [PATCH 2/4] builddeb: install dtbs

2015-04-02 Thread Riku Voipio
On 2 April 2015 at 15:17, Arnaud Patard arnaud.pat...@rtp-net.org wrote:
 Arnaud Patard (Rtp) arnaud.pat...@rtp-net.org writes:
 Already sent a better patch for that (your patch is not handling
 system with CONFIG_OF and without dtbs_install):
 http://www.spinics.net/lists/linux-kbuild/msg10794.html

 Oops. Wrong version. The right one is v4:
 http://www.spinics.net/lists/linux-kbuild/msg10832.html

Your version looks good. What needs to happen for it to get merged?

Riku


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/caaqcghnmxf5iyct3rdl32-a6xnqt5k8awpn6-iuuq0a54jw...@mail.gmail.com



[PATCH 1/4] deb-pkg: Add automatic support for armhf architecture

2015-04-02 Thread riku . voipio
From: Ben Hutchings b...@decadent.org.uk

The Debian armhf architecture uses the ARM EABI hard-float variant,
whereas armel uses the soft-float variant.  If the compiler used
to compile the kernel uses the __ARM_PCS_VFP ABI, the compiler
targets armhf architecture.

v3 by Riku: Use gcc define instead of CONFIG_VFP

Cc: debian-...@lists.debian.org
Signed-off-by: Ben Hutchings b...@decadent.org.uk
Signed-off-by: Riku Voipio riku.voi...@linaro.org
---
 scripts/package/builddeb | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 88dbf23..146b74f 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -45,7 +45,16 @@ create_package() {
arm64)
debarch=arm64 ;;
arm*)
-   debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG  echo el 
|| true) ;;
+   if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
+   if $CC -dM -E -  /dev/null|grep -q __ARM_PCS_VFP; then
+   debarch=armhf
+   else
+   debarch=armel
+   fi
+   else
+   debarch=arm
+   fi
+   ;;
*)
echo  2
echo ** ** **  WARNING  ** ** ** 2
-- 
2.1.4


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/834bd55c0de686780eb15f9a06b13f7fb560e9a8.1427968988.git.riku.voi...@linaro.org



Re: [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture

2015-04-02 Thread Riku Voipio
On 2 April 2015 at 15:01, Arnaud Patard arnaud.pat...@rtp-net.org wrote:
 riku.voi...@linaro.org writes:
 --- a/scripts/package/builddeb
 +++ b/scripts/package/builddeb
 @@ -45,7 +45,16 @@ create_package() {
   arm64)
   debarch=arm64 ;;
   arm*)
 - debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG  echo el 
 || true) ;;
 + if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
 + if $CC -dM -E -  /dev/null|grep -q __ARM_PCS_VFP; then

 Actually, I guess there's nothing preventing you building a armhf kernel
 with a compiler not having __ARM_PCS_VFP defined by default, but I'm not sure
 we should take care of this case. One can always use KBUILD_DEBARCH=armhf.

I think the common use cases would be a) native compilers or b)
cross-compiler targeting the same debian architecture as the rootfs.
This patch provides automatic detection for both cases. For corner
cases, one will have to manually specify KBUILD_DEBARCH - which one
already had to do if one was targeting armhf.

Riku


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/CAAqcGH=iT4-R=D+WWCZ2ibKHnc8dGgHPyC+5WyOT2WM=luj...@mail.gmail.com



Re: [PATCH] ext4: fix race between write and fcntl(F_SETFL) ping.

2015-04-02 Thread Theodore Ts'o
On Wed, Apr 01, 2015 at 10:23:37PM +0300, Dmitry Monakhov wrote:
  Wow I've just got a good present for a fools day.
  It is appeared that stable kernel still has this bug(CVE-2014-8086) 
  unfixed.
  At least my notebook (debian/testing 3.16.5) oopsed like follows:
 
  3.16 is not a stable kernel I maintain, it's long since dead.
 Ohh. I see. So this is just a unstable Debian's crap.
  Is there a specific patch I should be applying to the 3.14 or 3.10
  kernels that solve this problem?
 Yes original commit is a41537e69b4aa43f0fea02498c2595a81267383b
 In fact 3.14 and 3.10 already has fixes.
 3.14 07110343605adc3f
 3.10 30d8c8352812e924

Dmitry, if you open a bug report against the Debian kernel, I'm sure
they'll take care of applying a backport of the patch --- especially
since this is a potential security issue (CVE-2014-8086).

Cheers,

- Ted

 So I have to just migrate my note to truly stable kernel :)

Ah, do what I do --- run truly bleeding edge and use the latest kernel
with the ext4 dev branch merged in.  (After I've made sure it passes a
full set of regression tests, of course!)  Nothing like file system
developers eating their own dog food.  :-)

The only downside, speaking as a Debian developer, is that I don't end
up paying that much attention to the Debian kernel.  So if there are
some other ext4 developers who are willing to help push patches into
the Debian kernel, that would be much appreciated.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150402141544.gd6...@thunk.org



Bug#781002: initramfs-tools: no kernel modules are insert into initrd

2015-04-02 Thread Marc MERLIN
On Thu, Apr 02, 2015 at 02:29:28PM +0200, maximilian attems wrote:
 On Wed, Apr 01, 2015 at 06:10:05PM -0700, Marc MERLIN wrote:
  Could I make a few suggestions while we're at it?
  1) I sometimes build an initrd for a kernel I haven't installed yet. Yes,
  it's a mistake, but it happily succeeds and creates an initrd without any
  modules which then creates a non booting system.
  = initramfs should abort if its generated /lib/modules/kernel is empty
 
 I thought this was caught.
  
I have multiple initrd images that show otherwise, including this bug :)

  2) initramfs creates a temporary directory where it puts everything, and
  then deletes it before you can inspect it for debugging.
  = Add a --debug that leaves that directory behind for inspection.
  Right now I have to unpack the initrd image which is more and more of a
  pain as it becomes a bundled binary of concatenated cpio images and god
  knows what.
 
 -k :P
 as usual read the nice man mkinitramfs (;

Argh. I need new eyes... Sorry.

  3) document the binwalk method of unpacking initrd to debug if needed
  (somewhere in the manpage):
  http://unix.stackexchange.com/questions/163346/why-is-it-that-my-initrd-only-has-one-directory-namely-kernel
  .
  Or for the archives:
  legolas [mc]# binwalk initrd.img
  pick up the offset of the 2nd initrd image, and unpack like so:
  legolas [mc]# cd subdir; dd if=../initrd.img bs=21136 skip=1 | gunzip |
  cpio -idv
 
 lsinitramfs shows you the content.

Yes, I found that, that's better, but sometimes you do want to actually
unpack it to physically inspect the inside (like why is my modules.dep file
21 bytes, what's inside?).

Marc
-- 
A mouse is a device used to point at the xterm you want to type in - A.S.R.
Microsoft is to operating systems 
   what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150402150940.ga24...@merlins.org



Re: [PATCH] ext4: fix race between write and fcntl(F_SETFL) ping.

2015-04-02 Thread Dmitry Monakhov
Theodore Ts'o ty...@mit.edu writes:

 On Wed, Apr 01, 2015 at 10:23:37PM +0300, Dmitry Monakhov wrote:
  Wow I've just got a good present for a fools day.
  It is appeared that stable kernel still has this bug(CVE-2014-8086) 
  unfixed.
  At least my notebook (debian/testing 3.16.5) oopsed like follows:
 
  3.16 is not a stable kernel I maintain, it's long since dead.
 Ohh. I see. So this is just a unstable Debian's crap.
  Is there a specific patch I should be applying to the 3.14 or 3.10
  kernels that solve this problem?
 Yes original commit is a41537e69b4aa43f0fea02498c2595a81267383b
 In fact 3.14 and 3.10 already has fixes.
 3.14 07110343605adc3f
 3.10 30d8c8352812e924

 Dmitry, if you open a bug report against the Debian kernel, I'm sure
 they'll take care of applying a backport of the patch --- especially
 since this is a potential security issue (CVE-2014-8086).
That is what I did after I've replayed Greg. But it is appeared that they
have already fixed this issue 30days ago. So this is 100% my OS admin issue.

 Cheers,

   - Ted

 So I have to just migrate my note to truly stable kernel :)

 Ah, do what I do --- run truly bleeding edge and use the latest kernel
 with the ext4 dev branch merged in.  (After I've made sure it passes a
 full set of regression tests, of course!)  Nothing like file system
 developers eating their own dog food.  :-)
Yes this is the way I live for every long time, but forget to update
kernel after migrating to new notebook.

 The only downside, speaking as a Debian developer, is that I don't end
 up paying that much attention to the Debian kernel.  So if there are
 some other ext4 developers who are willing to help push patches into
 the Debian kernel, that would be much appreciated.


signature.asc
Description: PGP signature


Re: [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture

2015-04-02 Thread Michal Marek
On 2015-04-02 15:14, Riku Voipio wrote:
 On 2 April 2015 at 15:01, Arnaud Patard arnaud.pat...@rtp-net.org wrote:
 riku.voi...@linaro.org writes:
 --- a/scripts/package/builddeb
 +++ b/scripts/package/builddeb
 @@ -45,7 +45,16 @@ create_package() {
   arm64)
   debarch=arm64 ;;
   arm*)
 - debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG  echo 
 el || true) ;;
 + if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
 + if $CC -dM -E -  /dev/null|grep -q __ARM_PCS_VFP; 
 then

 Actually, I guess there's nothing preventing you building a armhf kernel
 with a compiler not having __ARM_PCS_VFP defined by default, but I'm not sure
 we should take care of this case. One can always use KBUILD_DEBARCH=armhf.
 
 I think the common use cases would be a) native compilers or b)
 cross-compiler targeting the same debian architecture as the rootfs.
 This patch provides automatic detection for both cases.

$CC should be used together with $KBUILD_CFLAGS to behave the same as
when building the kernel.

Michal


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/551d4fbc.5010...@suse.cz



Re: [PATCH 2/4] builddeb: install dtbs

2015-04-02 Thread Rtp
Riku Voipio riku.voi...@linaro.org writes:

 On 2 April 2015 at 15:17, Arnaud Patard arnaud.pat...@rtp-net.org wrote:
 Arnaud Patard (Rtp) arnaud.pat...@rtp-net.org writes:
 Already sent a better patch for that (your patch is not handling
 system with CONFIG_OF and without dtbs_install):
 http://www.spinics.net/lists/linux-kbuild/msg10794.html

 Oops. Wrong version. The right one is v4:
 http://www.spinics.net/lists/linux-kbuild/msg10832.html

 Your version looks good. What needs to happen for it to get merged?

No idea. I was hoping that someone would take it.

Arnaud


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/874moy2zks@lebrac.rtp-net.org