Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #74050 > unrolled thread

Bug#1002711: linux-image-5.14.0-4-amd64: poll syscall does not work on some /proc files

Started byVincent Danjean <vdanjean@debian.org>
First post2021-12-27 23:40 +0100
Last post2021-12-30 19:30 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.debian.kernel


Contents

  Bug#1002711: linux-image-5.14.0-4-amd64: poll syscall does not work on some /proc files Vincent Danjean <vdanjean@debian.org> - 2021-12-27 23:40 +0100
    Bug#1002711: linux-image-5.14.0-4-amd64: poll syscall does not work on some /proc files Bastian Blank <waldi@debian.org> - 2021-12-30 15:10 +0100
      Bug#1002711: linux-image-5.14.0-4-amd64: poll syscall does not work on some /proc files Vincent Danjean <vdanjean@debian.org> - 2021-12-30 19:30 +0100

#74050 — Bug#1002711: linux-image-5.14.0-4-amd64: poll syscall does not work on some /proc files

FromVincent Danjean <vdanjean@debian.org>
Date2021-12-27 23:40 +0100
SubjectBug#1002711: linux-image-5.14.0-4-amd64: poll syscall does not work on some /proc files
Message-ID<Dz6OS-34w-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Package: src:linux
Version: 5.14.16-1
Severity: normal

Hi,

While writing a script with busybox parsing /proc/bus/input/devices,
I discovered that poll syscall seems to not give correct information
on this file. Before reporting, I checked with a small C program
(in attachment).

The main part of the program is:
	ret = poll(fds, 1, -1);
	ret = read(fd, &c, 1);
	ret = poll(fds, 1, -1);

On a plain (with more than two bytes) file, the second poll succeed.
On /proc/bus/input/devices, the second poll hangs.

$ ./poll-test ./poll-test.c 
ret=1, revent=1 (POLLIN=1)
ret=1, revent=1 (POLLIN=1)
$ ./poll-test /proc/bus/input/devices 
ret=1, revent=1 (POLLIN=1)
[hangs until C-c]

I discovered the problem writing a script similar to:
while read l; do
  ... [ modifying global shell variables, so using a pipe is not an option ]
done < /proc/bus/input/devices

I hangs when executed with busybox (not bash that probably uses another way to
get its input)
Using strace give me the idea to look at poll behavior.

Note: this is an old behavior. I initially observe it on an embeded system with
a 4.1 kernel.

  Regards,
    Vincent


-- Package-specific info:
** Version:
Linux version 5.14.0-4-amd64 (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.3.0-12) 10.3.0, GNU ld (GNU Binutils for Debian) 2.37) #1 SMP Debian 5.14.16-1 (2021-11-03)

** Command line:
BOOT_IMAGE=/vmlinuz-5.14.0-4-amd64 root=/dev/mapper/eyak-root ro apparmor=0 security= swapaccount=1 cgroup_enable=memory atkbd.softraw=0 vsyscall=emulate syscall.x32=y quiet

** Tainted: O (4096)
 * externally-built ("out-of-tree") module was loaded

** Kernel log:
[1831798.548063] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831801.552011] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831804.556033] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831807.564376] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831810.559917] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831813.560164] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831816.568135] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831819.572297] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831822.572134] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831825.568408] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831828.572187] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831831.580257] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831834.576209] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831837.576477] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831840.584549] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831843.580438] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831846.580507] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831849.584526] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831852.584449] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831855.588255] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831858.592325] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831861.596533] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831864.596270] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831867.596294] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831870.596267] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831873.600754] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831876.600514] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831879.604364] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831882.608328] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831885.608359] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831888.612459] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831891.612468] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831894.616589] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831897.624509] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831900.624468] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831903.620557] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831906.628565] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831909.628647] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831912.628629] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831915.632643] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831918.636505] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831921.636754] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831924.640733] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831927.644601] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831930.644787] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831933.648764] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831936.652652] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831939.652713] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831942.660682] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831945.656718] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831948.660562] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831951.660604] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831954.664902] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831957.664738] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831960.668620] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831963.672906] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831966.672826] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831969.672952] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831972.676731] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831975.676700] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831978.680724] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831981.684727] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831984.684655] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831987.684760] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831990.688855] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831993.692756] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831996.692990] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1831999.697065] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832002.701260] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832005.700971] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832008.700802] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832011.705050] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832014.704757] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832017.708971] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832020.713166] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832023.713217] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832026.712907] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832029.716949] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832032.716957] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832035.725223] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832038.725163] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832041.724997] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832044.725232] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832047.733120] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832050.729147] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832053.733074] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832056.737201] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832059.737114] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832062.741113] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832065.741141] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832068.745342] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832071.749218] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832074.749402] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832077.753355] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832080.753264] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832083.753231] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832086.757291] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832089.761262] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832092.757235] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7
[1832095.761138] Lockdown: rpc-worker: debugfs access is restricted; see man kernel_lockdown.7

** Model information
sys_vendor: Dell Inc.
product_name: Precision 5520
product_version: 
chassis_vendor: Dell Inc.
chassis_version: 
bios_vendor: Dell Inc.
bios_version: 1.24.0
board_vendor: Dell Inc.
board_name: 0GPNW9
board_version: A00

** Loaded modules:
omfs
jfs
xfs
reiserfs
hfs
nls_utf8
hfsplus
isofs
udf
crc_itu_t
cdrom
sd_mod
sg
uas
usb_storage
essiv
authenc
nfnetlink_queue
nfnetlink_log
ftdi_sio
usbserial
vhost_net
vhost
vhost_iotlb
tap
tun
xt_CHECKSUM
ipt_REJECT
nf_reject_ipv4
thunderbolt
cdc_acm
exfat
nls_iso8859_1
mmc_block
snd_usb_audio
snd_usbmidi_lib
snd_rawmidi
cdc_ether
usbnet
r8152
mii
ctr
ccm
rfcomm
veth
snd_seq_dummy
snd_hrtimer
snd_seq
snd_seq_device
xt_nat
xt_tcpudp
xt_conntrack
nft_chain_nat
xt_MASQUERADE
nf_conntrack_netlink
xfrm_user
xfrm_algo
nft_counter
xt_addrtype
nft_compat
nf_tables
nfnetlink
br_netfilter
bridge
cpufreq_ondemand
cpufreq_userspace
cpufreq_conservative
cpufreq_powersave
8021q
garp
stp
mrp
llc
overlay
openvswitch
nsh
nf_conncount
nf_nat
nf_conntrack
nf_defrag_ipv6
nf_defrag_ipv4
cmac
algif_hash
algif_skcipher
af_alg
bnep
uinput
binfmt_misc
btusb
btrtl
btbcm
btintel
bluetooth
jitterentropy_rng
drbg
ansi_cprng
uvcvideo
videobuf2_vmalloc
videobuf2_memops
videobuf2_v4l2
ecdh_generic
ecc
videobuf2_common
hid_multitouch
iTCO_wdt
intel_pmc_bxt
nls_ascii
iTCO_vendor_support
nls_cp437
vfat
fat
mei_hdcp
mei_wdt
rtsx_pci_sdmmc
watchdog
ee1004
snd_hda_codec_hdmi
mmc_core
intel_rapl_msr
x86_pkg_temp_thermal
intel_powerclamp
snd_ctl_led
kvm_intel
snd_hda_codec_realtek
snd_hda_codec_generic
dell_rbtn
snd_hda_intel
snd_intel_dspcfg
snd_intel_sdw_acpi
dell_laptop
ledtrig_audio
iwlmvm
mac80211
kvm
libarc4
dell_smm_hwmon
irqbypass
crc32_pclmul
snd_hda_codec
iwlwifi
snd_hda_core
snd_hwdep
ghash_clmulni_intel
rapl
intel_cstate
snd_pcm
dell_wmi
intel_uncore
ahci
dell_smbios
dcdbas
snd_timer
libahci
cfg80211
processor_thermal_device_pci_legacy
pcspkr
processor_thermal_device
snd
joydev
processor_thermal_rfim
i2c_i801
efi_pstore
dell_wmi_descriptor
processor_thermal_mbox
intel_wmi_thunderbolt
mei_me
processor_thermal_rapl
soundcore
i2c_smbus
cuse
dm_snapshot
intel_lpss_pci
dm_bufio
intel_rapl_common
i2c_hid_acpi
wmi_bmof
rtsx_pci
rfkill
coretemp
intel_lpss
libata
mei
idma64
intel_soc_dts_iosf
intel_pch_thermal
i2c_hid
battery
int3403_thermal
intel_hid
int3400_thermal
acpi_thermal_rel
intel_pmc_core
sparse_keymap
int340x_thermal_zone
ac
acpi_pad
loop
v4l2loopback(O)
videodev
mc
msr
ecryptfs
drivetemp
scsi_mod
dahdi_transcode(O)
dahdi(O)
sha512_ssse3
nfsd
sha512_generic
parport_pc
auth_rpcgss
fuse
nfs_acl
lockd
grace
ppdev
lp
parport
configfs
sunrpc
ip_tables
x_tables
autofs4
ext4
crc16
mbcache
jbd2
dm_crypt
efivarfs
raid10
raid456
libcrc32c
crc32c_generic
async_raid6_recov
async_memcpy
async_pq
async_xor
xor
async_tx
raid6_pq
raid1
raid0
multipath
linear
md_mod
hid_generic
usbhid
hid
dm_mod
i915
crc32c_intel
i2c_algo_bit
nvme
ttm
nvme_core
t10_pi
drm_kms_helper
crc_t10dif
cec
rc_core
crct10dif_generic
aesni_intel
xhci_pci
crypto_simd
xhci_hcd
evdev
cryptd
psmouse
drm
serio_raw
usbcore
crct10dif_pclmul
crct10dif_common
usb_common
wmi
video
button

** PCI devices:
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5910] (rev 05)
	Subsystem: Dell Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [1028:07bf]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-
	Latency: 0
	IOMMU group: 0
	Capabilities: <access denied>
	Kernel driver in use: skl_uncore

00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 630 [8086:591b] (rev 04) (prog-if 00 [VGA controller])
	DeviceName:  Onboard IGD
	Subsystem: Dell HD Graphics 630 [1028:07bf]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 133
	IOMMU group: 1
	Region 0: Memory at eb000000 (64-bit, non-prefetchable) [size=16M]
	Region 2: Memory at a0000000 (64-bit, prefetchable) [size=256M]
	Region 4: I/O ports at f000 [size=64]
	Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915

00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 05)
	Subsystem: Dell Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [1028:07bf]
	Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 16
	IOMMU group: 2
	Region 0: Memory at ecc20000 (64-bit, non-prefetchable) [size=32K]
	Capabilities: <access denied>
	Kernel driver in use: proc_thermal
	Kernel modules: processor_thermal_device_pci_legacy

00:14.0 USB controller [0c03]: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller [8086:a12f] (rev 31) (prog-if 30 [XHCI])
	Subsystem: Dell 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller [1028:07bf]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 128
	IOMMU group: 3
	Region 0: Memory at ecc10000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci

00:14.2 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem [8086:a131] (rev 31)
	Subsystem: Dell 100 Series/C230 Series Chipset Family Thermal Subsystem [1028:07bf]
	Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin C routed to IRQ 18
	IOMMU group: 3
	Region 0: Memory at ecc39000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: intel_pch_thermal
	Kernel modules: intel_pch_thermal

00:15.0 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #0 [8086:a160] (rev 31)
	Subsystem: Dell 100 Series/C230 Series Chipset Family Serial IO I2C Controller [1028:07bf]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 16
	IOMMU group: 4
	Region 0: Memory at ecc38000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: intel-lpss
	Kernel modules: intel_lpss_pci

00:15.1 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #1 [8086:a161] (rev 31)
	Subsystem: Dell 100 Series/C230 Series Chipset Family Serial IO I2C Controller [1028:07bf]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin B routed to IRQ 17
	IOMMU group: 4
	Region 0: Memory at ecc37000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: intel-lpss
	Kernel modules: intel_lpss_pci

00:16.0 Communication controller [0780]: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 [8086:a13a] (rev 31)
	Subsystem: Dell 100 Series/C230 Series Chipset Family MEI Controller [1028:07bf]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 127
	IOMMU group: 5
	Region 0: Memory at ecc36000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: mei_me
	Kernel modules: mei_me

00:16.3 Serial controller [0700]: Intel Corporation 100 Series/C230 Series Chipset Family KT Redirection [8086:a13d] (rev 31) (prog-if 02 [16550])
	Subsystem: Dell 100 Series/C230 Series Chipset Family KT Redirection [1028:07bf]
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin D routed to IRQ 19
	IOMMU group: 5
	Region 0: I/O ports at f0a0 [size=8]
	Region 1: Memory at ecc35000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: serial

00:17.0 SATA controller [0106]: Intel Corporation Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode] [8086:a102] (rev 31) (prog-if 01 [AHCI 1.0])
	Subsystem: Dell Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode] [1028:07bf]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 136
	IOMMU group: 6
	Region 0: Memory at ecc30000 (32-bit, non-prefetchable) [size=8K]
	Region 1: Memory at ecc34000 (32-bit, non-prefetchable) [size=256]
	Region 2: I/O ports at f090 [size=8]
	Region 3: I/O ports at f080 [size=4]
	Region 4: I/O ports at f060 [size=32]
	Region 5: Memory at ecc33000 (32-bit, non-prefetchable) [size=2K]
	Capabilities: <access denied>
	Kernel driver in use: ahci
	Kernel modules: ahci

00:1c.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #1 [8086:a110] (rev f1) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 122
	IOMMU group: 7
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: ecb00000-ecbfffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16+ MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:1c.1 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #2 [8086:a111] (rev f1) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin B routed to IRQ 123
	IOMMU group: 8
	Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
	I/O behind bridge: 0000e000-0000efff [size=4K]
	Memory behind bridge: ec000000-ec9fffff [size=10M]
	Prefetchable memory behind bridge: 00000000d2100000-00000000d2afffff [size=10M]
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16+ MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:1d.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #9 [8086:a118] (rev f1) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 124
	IOMMU group: 9
	Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: eca00000-ecafffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16+ MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:1d.4 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #13 [8086:a11c] (rev f1) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 125
	IOMMU group: 10
	Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: [disabled]
	Prefetchable memory behind bridge: [disabled]
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16+ MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:1d.6 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #15 [8086:a11e] (rev f1) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin C routed to IRQ 126
	IOMMU group: 11
	Bus: primary=00, secondary=05, subordinate=3d, sec-latency=0
	I/O behind bridge: 00002000-00002fff [size=4K]
	Memory behind bridge: d4000000-ea0fffff [size=353M]
	Prefetchable memory behind bridge: 00000000b0000000-00000000d1ffffff [size=544M]
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16+ MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:1f.0 ISA bridge [0601]: Intel Corporation CM238 Chipset LPC/eSPI Controller [8086:a154] (rev 31)
	Subsystem: Dell CM238 Chipset LPC/eSPI Controller [1028:07bf]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	IOMMU group: 12

00:1f.2 Memory controller [0580]: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller [8086:a121] (rev 31)
	Subsystem: Dell 100 Series/C230 Series Chipset Family Power Management Controller [1028:07bf]
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	IOMMU group: 12
	Region 0: Memory at ecc2c000 (32-bit, non-prefetchable) [disabled] [size=16K]

00:1f.3 Audio device [0403]: Intel Corporation CM238 HD Audio Controller [8086:a171] (rev 31) (prog-if 80)
	Subsystem: Dell CM238 HD Audio Controller [1028:07bf]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 32
	Interrupt: pin B routed to IRQ 138
	IOMMU group: 12
	Region 0: Memory at ecc28000 (64-bit, non-prefetchable) [size=16K]
	Region 4: Memory at ecc00000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

00:1f.4 SMBus [0c05]: Intel Corporation 100 Series/C230 Series Chipset Family SMBus [8086:a123] (rev 31)
	Subsystem: Dell 100 Series/C230 Series Chipset Family SMBus [1028:07bf]
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 16
	IOMMU group: 12
	Region 0: Memory at ecc32000 (64-bit, non-prefetchable) [size=256]
	Region 4: I/O ports at f040 [size=32]
	Kernel driver in use: i801_smbus
	Kernel modules: i2c_i801

01:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78)
	Subsystem: Intel Corporation Wireless 8265 / 8275 [8086:0050]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 137
	IOMMU group: 13
	Region 0: Memory at ecb00000 (64-bit, non-prefetchable) [size=8K]
	Capabilities: <access denied>
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi

02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01)
	Subsystem: Dell RTS525A PCI Express Card Reader [1028:07bf]
	Physical Slot: 1
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 134
	IOMMU group: 14
	Region 1: Memory at ec000000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: rtsx_pci
	Kernel modules: rtsx_pci

03:00.0 Non-Volatile memory controller [0108]: Phison Electronics Corporation E12 NVMe Controller [1987:5012] (rev 01) (prog-if 02 [NVM Express])
	Subsystem: Phison Electronics Corporation E12 NVMe Controller [1987:5012]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 16
	NUMA node: 0
	IOMMU group: 15
	Region 0: Memory at eca00000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: nvme
	Kernel modules: nvme


** USB devices:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04f3:24a0 Elan Microelectronics Corp. Touchscreen
Bus 001 Device 002: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 004: ID 0c45:6713 Microdia Integrated_Webcam_HD
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


-- System Information:
Debian Release: bookworm/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'oldstable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armel, mipsel

Kernel: Linux 5.14.0-4-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages linux-image-5.14.0-4-amd64 depends on:
ii  initramfs-tools [linux-initramfs-tool]  0.140
ii  kmod                                    29-1
ii  linux-base                              4.6

Versions of packages linux-image-5.14.0-4-amd64 recommends:
ii  apparmor             3.0.3-5
ii  firmware-linux-free  20200122-1

Versions of packages linux-image-5.14.0-4-amd64 suggests:
pn  debian-kernel-handbook  <none>
ii  extlinux                3:6.04~git20190206.bf6db5b4+dfsg1-3+b1
ii  grub-efi-amd64          2.04-20
pn  linux-doc-5.14          <none>

Versions of packages linux-image-5.14.0-4-amd64 is related to:
ii  firmware-amd-graphics     20210818-1
pn  firmware-atheros          <none>
pn  firmware-bnx2             <none>
pn  firmware-bnx2x            <none>
pn  firmware-brcm80211        <none>
pn  firmware-cavium           <none>
pn  firmware-intel-sound      <none>
pn  firmware-intelwimax       <none>
pn  firmware-ipw2x00          <none>
pn  firmware-ivtv             <none>
ii  firmware-iwlwifi          20210818-1
pn  firmware-libertas         <none>
ii  firmware-linux-nonfree    20210818-1
ii  firmware-misc-nonfree     20210818-1
pn  firmware-myricom          <none>
pn  firmware-netxen           <none>
pn  firmware-qlogic           <none>
ii  firmware-realtek          20210818-1
pn  firmware-samsung          <none>
pn  firmware-siano            <none>
pn  firmware-ti-connectivity  <none>
pn  xen-hypervisor            <none>

-- no debconf information

[toc] | [next] | [standalone]


#74069

FromBastian Blank <waldi@debian.org>
Date2021-12-30 15:10 +0100
Message-ID<DA4hX-5xZ-1@gated-at.bofh.it>
In reply to#74050
On Mon, Dec 27, 2021 at 11:31:21PM +0100, Vincent Danjean wrote:
> On a plain (with more than two bytes) file, the second poll succeed.
> On /proc/bus/input/devices, the second poll hangs.
> Note: this is an old behavior. I initially observe it on an embeded system with
> a 4.1 kernel.

/proc is no real filesystem.  It simply does not support poll, because
the output is generated while you are reading it, so it does not know
when anything changes.  See also
https://unix.stackexchange.com/questions/74713/how-frequently-is-the-proc-file-system-updated-on-linux?rq=1

If you want to know about hardware changes, use udev or listen to kernel
netlink messages.

Bastian

-- 
Earth -- mother of the most beautiful women in the universe.
		-- Apollo, "Who Mourns for Adonais?" stardate 3468.1

[toc] | [prev] | [next] | [standalone]


#74071

FromVincent Danjean <vdanjean@debian.org>
Date2021-12-30 19:30 +0100
Message-ID<DA8lz-7Wi-1@gated-at.bofh.it>
In reply to#74069
On 30/12/2021 14:52, Bastian Blank wrote:
> On Mon, Dec 27, 2021 at 11:31:21PM +0100, Vincent Danjean wrote:
>> On a plain (with more than two bytes) file, the second poll succeed.
>> On /proc/bus/input/devices, the second poll hangs.
>> Note: this is an old behavior. I initially observe it on an embeded system with
>> a 4.1 kernel.
> 
> /proc is no real filesystem.  It simply does not support poll, because
> the output is generated while you are reading it, so it does not know
> when anything changes.  See also
> https://unix.stackexchange.com/questions/74713/how-frequently-is-the-proc-file-system-updated-on-linux?rq=1
> 
> If you want to know about hardware changes, use udev or listen to kernel
> netlink messages.

I understand that /proc is different. But I'm not monitoring it.
My goal was only to read it totally from a busybox shell with a
"while read" loop to find the eventX associated with the
touchscreen of the e-reader.
And the first read from busybox shell never complete (instead of
returning the first line of the file) due to the fact that
busybox use poll, then read a byte, then use poll again.


   Do you think I should reassign this bug to busybox?

   Or do you think I'm wrong trying to read the /proc file
from a shell script without to copy it elsewhere before?

Stalling:
busybox sh -c 'while read l ; do echo $l ; done  < /proc/bus/input/devices'
Working (but bash is not present on the initial target system):
bash -c 'while read l ; do echo $l ; done  < /proc/bus/input/devices'

   As workaround, I'm currently using a copy of the file
("busybox cp" works). It should probably also be possible
to get the same kind of info from /sys files but this seems
less easy.

   I just saw that other files seems to work:
Ok:
busybox sh -c 'read l < /proc/bus/input/handlers ; echo $l'
Stale:
busybox sh -c 'read l < /proc/bus/input/devices ; echo $l'

   Regards,
     Vincent

> 
> Bastian
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web