Bug#1010458: linux/sysctl.h: unknown type name 'size_t'

2022-05-01 Thread Alejandro Colomar
Package: linux-libc-dev
Version: 5.17.3-1
Severity: normal
Tags: upstream
X-Debbugs-Cc: alx.manpa...@gmail.com


I was cleaning up the example programs in the man-pages by using
iwyu(1), when I found that  is using 'size_t'
without including any definition for it.

See the following example program:

$ cat tmp/src/man2/sysctl.2.d/sysctl.c

#define _GNU_SOURCE
#include 
#include 
#include 
#include 
#include 
#include 

int _sysctl(struct __sysctl_args *args );

#define OSNAMESZ 100

int
main(void)
{
struct __sysctl_args args;
char osname[OSNAMESZ];
size_t osnamelth;
int name[] = { CTL_KERN, KERN_OSTYPE };

memset(, 0, sizeof(args));
args.name = name;
args.nlen = sizeof(name)/sizeof(name[0]);
args.oldval = osname;
args.oldlenp = 

osnamelth = sizeof(osname);

if (syscall(SYS__sysctl, ) == -1) {
perror("_sysctl");
exit(EXIT_FAILURE);
}
printf("This machine is running %*s\n", (int) osnamelth, osname);
exit(EXIT_SUCCESS);
}

for which I get the following errors:

$ cc -c -std=gnu17 -Wall -Wextra -Werror -Wno-error=unused-parameter \
 -Wno-error=sign-compare -Wno-error=format \
 -o tmp/src/man2/sysctl.2.d/sysctl.o \
 tmp/src/man2/sysctl.2.d/sysctl.c;
In file included from tmp/src/man2/sysctl.2.d/sysctl.c:3:
/usr/include/linux/sysctl.h:39:9: error: unknown type name 'size_t'
   39 | size_t *oldlenp;
  | ^~
/usr/include/linux/sysctl.h:41:9: error: unknown type name 'size_t'
   41 | size_t newlen;
  | ^~
tmp/src/man2/sysctl.2.d/sysctl.c: In function 'main':
tmp/src/man2/sysctl.2.d/sysctl.c:26:18: error: assignment to 'int *' 
from incompatible pointer type 'size_t *' {aka 'long unsigned int *'} 
[-Werror=incompatible-pointer-types]
   26 | args.oldlenp = 
  |  ^
cc1: all warnings being treated as errors


It seems that it's supposed to know some types, but for some reason
'size_t' is not defined by the included headers:

$ grep include 
#include 


Cheers,

Alex



-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.16.0-5-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information



Bug#974166: 5.9.0-1-amd64 (5.9.11-1) has fixed the issue

2020-11-28 Thread Alejandro Colomar (man-pages)
Hi,

I'm glad to say that just now I upgraded to the unstable kernel:

$ sudo apt-get install linux-image-amd64

and now I can boot normally:

$ uname -a
Linux debian 5.9.0-4-amd64 #1 SMP Debian 5.9.11-1 (2020-11-27) x86_64
GNU/Linux

I'm curious: I'd like to see the changelog and the code
to see what fixed the issue.
Could you point me to it,
or give me some hint so that I can search for it myself?

Thanks,

Alex



Bug#974166: I'd like to help

2020-11-22 Thread Alejandro Colomar (man-pages)
Hi,

I suspect it may have to do with the 5th gen (Broadwell Desktop) only,
as they have a very special (and powerful) iGPU.
And maybe that's why the bug passed inadvertently so much time:
those CPUs didn't sell very well.

Yes, I have that package installed:

||/ NameVersion  Architecture Description
+++-===---===
ii  intel-microcode 3.20201110.1 amd64Processor microcode
firmware for Intel CPUs

When I first upgraded to 5.7, I couldn't boot,
and my first thought was: this seems to be such a big bug,
so they probably have already noticed, and I didn't report it.
It's been more than half a year, kernel 5.9, and the bug is still there,
so I strongly suspect that the only affected CPUs are those with
Intel Iris Pro 6200 (there are only 4 models with that iGPU).

Thanks,

Alex


On 11/22/20 5:53 PM, Georgi Naplatanov wrote:
> Hi,
> 
> I have Intel i5 4th generation and I have no such problem with Linux
> kernel 5.9.6.
> 
> Do you have "intel-microcode" package installed on those computers?
> 
> Kind regards
> Georgi
> 



Bug#974166: I'd like to help

2020-11-22 Thread Alejandro Colomar (man-pages)
Hi,

I received no answer at all, so I guess you are very busy.

I know the bug was introduced somewhere between 5.6 and 5.7.

If you have an idea of what the source of the bug could be,
I'd like to help by testing on my computers,
or providing code.

I have two computers with similar CPUs (i5-5675C & i7-5775C),
and both have the same problem.

Basically I'm limited to kernel <= 5.6, right now.
I can't boot from a more recent kernel.

Thanks,

Alex



Bug#974166: Boot logs

2020-11-14 Thread Alejandro Colomar (man-pages)
I tried booting in recovery mode,
and it also didn't work.

However, I could see the some info.
The 3 last lines of the boot log were:

{
[4.817936] hub 4-0:1.0: 2 ports detected
[4.819372] i915 :00:02.0: [drm] Found 128MB of eDRAM
[4.819882] fb0: switching to inteldrmfb from EFI VGA
}

And then freeze.
These messages are not logged into /var/log/kern.log,
as the system doesn't even boot.
I had to copy them by hand.

Here's what I see when booting with kernel 5.4
at (more or less) the same part of the boot process:

{
[4.140383] snd_hda_intel :00:1b.0: enabling device ( -> 0002)
[4.172077] i915 :00:02.0: Found 128MB of eDRAM
[4.172105] checking generic (e000 30) vs hw (e000 1000)
[4.172106] fb0: switching to inteldrmfb from EFI VGA
[4.172311] Console: switching to colour dummy device 80x25
[4.172347] i915 :00:02.0: vgaarb: deactivate vga console
[4.179379] iwlwifi :05:00.0: Detected Intel(R) Dual Band
Wireless AC 7260, REV=0x144
[4.180399] snd_hda_codec_realtek hdaudioC1D0: autoconfig for
ALC887-VD: line_outs=4 (0x14/0x15/0x16/0x17/0x0) type:line
[4.180400] snd_hda_codec_realtek hdaudioC1D0:speaker_outs=0
(0x0/0x0/0x0/0x0/0x0)
[4.180401] snd_hda_codec_realtek hdaudioC1D0:hp_outs=1
(0x1b/0x0/0x0/0x0/0x0)
[4.180402] snd_hda_codec_realtek hdaudioC1D0:mono: mono_out=0x0
[4.180402] snd_hda_codec_realtek hdaudioC1D0:dig-out=0x11/0x0
[4.180403] snd_hda_codec_realtek hdaudioC1D0:inputs:
[4.180404] snd_hda_codec_realtek hdaudioC1D0:  Front Mic=0x19
[4.180405] snd_hda_codec_realtek hdaudioC1D0:  Rear Mic=0x18
[4.180405] snd_hda_codec_realtek hdaudioC1D0:  Line=0x1a
[4.180736] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[4.180737] [drm] Driver supports precise vblank timestamp query.
[4.180977] i915 :00:02.0: vgaarb: changed VGA decodes:
olddecodes=io+mem,decodes=io+mem:owns=io+mem
[4.188068] [drm] Initialized i915 1.6.0 20190822 for :00:02.0 on
minor 0
[4.189872] ACPI: Video Device [GFX0] (multi-head: yes  rom: no
post: no)
[4.189993] input: Video Bus as
/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input4
[4.190545] snd_hda_intel :00:03.0: bound :00:02.0 (ops
i915_audio_component_bind_ops [i915])
[4.196712] iwlwifi :05:00.0: base HW address: 7c:5c:f8:a4:bb:27
[4.204867] input: HDA Intel PCH Front Mic as
/devices/pci:00/:00:1b.0/sound/card1/input5
[4.204901] input: HDA Intel PCH Rear Mic as
/devices/pci:00/:00:1b.0/sound/card1/input6
[4.204933] input: HDA Intel PCH Line as
/devices/pci:00/:00:1b.0/sound/card1/input7
[4.204962] input: HDA Intel PCH Line Out Front as
/devices/pci:00/:00:1b.0/sound/card1/input8
[4.204996] input: HDA Intel PCH Line Out Surround as
/devices/pci:00/:00:1b.0/sound/card1/input9
[4.205028] input: HDA Intel PCH Line Out CLFE as
/devices/pci:00/:00:1b.0/sound/card1/input10
[4.205059] input: HDA Intel PCH Line Out Side as
/devices/pci:00/:00:1b.0/sound/card1/input11
[4.205088] input: HDA Intel PCH Front Headphone as
/devices/pci:00/:00:1b.0/sound/card1/input12
[4.230276] fbcon: i915drmfb (fb0) is primary device
[4.232087] input: HDA Intel HDMI HDMI/DP,pcm=3 as
/devices/pci:00/:00:03.0/sound/card0/input13
[4.232120] input: HDA Intel HDMI HDMI/DP,pcm=7 as
/devices/pci:00/:00:03.0/sound/card0/input14
[4.232149] input: HDA Intel HDMI HDMI/DP,pcm=8 as
/devices/pci:00/:00:03.0/sound/card0/input15
[4.261519] usb 2-14: New USB device found, idVendor=04b4,
idProduct=4009, bcdDevice= 1.00
[4.261520] usb 2-14: New USB device strings: Mfr=0, Product=0,
SerialNumber=0
[4.271503] Console: switching to colour frame buffer device 240x67
[4.291128] i915 :00:02.0: fb0: i915drmfb frame buffer device
}



Bug#974166: linux/5.9.6-1 (unstable) has the same bug

2020-11-14 Thread Alejandro Colomar (man-pages)
I tried installing the new kernel from unstable,
but I still can't boot with it.
Same problems.



Bug#974166: linux-image-5.9.0-1-amd64: The system goes black when trying to boot graphical mode

2020-11-10 Thread Alejandro Colomar
Package: src:linux
Version: 5.9.1-1
Severity: important
X-Debbugs-Cc: alx.manpa...@gmail.com

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

When I upgreeaded from kernel 5.6 to 5.7 a long time ago, my system 
broke.
I first saw some firmware errors when booting.
But when I fixed those firmware errors by adding non-free and contrib 
repos,
and installing firmware-linux,
those errors disapeared.
Now it simply goes black at some point during the boot.
If I boot with linux 5.6, however, everything runs fine.


   * What exactly did you do (or not do) that was effective (or
 ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

Ineffective: Upgrading the kernel to 5.8, or 5.9.
None of the kernels >= 5.7 work.

Worked: Run with kernel 5.6 (or older).

Ineffective: Clean install from DI-alpha2.
This provides two kernels: 5.4 (works) and 5.9 (doesn't work).

I also tried installing firmware directly from kernel.org:

git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
sudo make install
but it didn't fix it.

*** End of the template - remove these template lines ***


-- Package-specific info:
** Kernel log: boot messages should be attached
I don't know how to get the boot messages from a system that doesn't 
boot.

** Model information
sys_vendor: ASUS
product_name: All Series
product_version: System Version
chassis_vendor: To Be Filled By O.E.M.
chassis_version: To Be Filled By O.E.M.
bios_vendor: American Megatrends Inc.
bios_version: 2902
board_vendor: ASUSTeK COMPUTER INC.
board_name: Z97M-PLUS
board_version: Rev X.0x

** Network interface configuration:
*** /etc/network/interfaces:

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

** PCI devices:
00:00.0 Host bridge [0600]: Intel Corporation Broadwell-U Host Bridge - DMI 
[8086:1610] (rev 0a)
Subsystem: ASUSTeK Computer Inc. Broadwell-U Host Bridge - DMI 
[1043:8534]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- 

00:01.0 PCI bridge [0604]: Intel Corporation Broadwell-U PCI Express x16 
Controller [8086:1601] (rev 0a) (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- SERR- TAbort- Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities: 
Kernel driver in use: pcieport

00:02.0 VGA compatible controller [0300]: Intel Corporation Iris Pro Graphics 
6200 [8086:1622] (rev 0a) (prog-if 00 [VGA controller])
DeviceName:  Onboard IGD
Subsystem: ASUSTeK Computer Inc. Iris Pro Graphics 6200 [1043:8534]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- 
Kernel driver in use: i915
Kernel modules: i915

00:03.0 Audio device [0403]: Intel Corporation Broadwell-U Audio Controller 
[8086:160c] (rev 0a)
Subsystem: ASUSTeK Computer Inc. Broadwell-U Audio Controller 
[1043:8534]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- 
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel

00:14.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB 
xHCI Controller [8086:8cb1] (prog-if 30 [XHCI])
Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family USB xHCI 
Controller [1043:8534]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
SERR- 
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci

00:16.0 Communication controller [0780]: Intel Corporation 9 Series Chipset 
Family ME Interface #1 [8086:8cba]
Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family ME Interface 
[1043:8534]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- 
Kernel driver in use: mei_me
Kernel modules: mei_me

00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) 
I218-V [8086:15a1]
DeviceName:  Onboard LAN
Subsystem: ASUSTeK Computer Inc. Ethernet Connection (2) I218-V 
[1043:85c4]