lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFjuqNiToDC9BSJVdahdkPz8Ejb-rM3VRkyoBNUTJr8go=7zrg@mail.gmail.com>
Date:   Fri, 25 Oct 2019 13:38:46 +1100
From:   "Michael ." <keltoiboy@...il.com>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     Dominik Brodowski <linux@...inikbrodowski.net>,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        Trevor Jacobs <trevor_jacobs@....com>,
        Kris Cleveland <tridentperfusion@...oo.com>,
        Jeff <bluerocksaddles@...litsonline.com>,
        Morgan Klym <moklym@...il.com>
Subject: Re: PCI device function not being enumerated [Was: PCMCIA not working
 on Panasonic Toughbook CF-29]

Here's the resulting output of the failed compilation of 5.4rc1 with
the patch applied to quirks.c:
 CC      drivers/pci/quirks.o
drivers/pci/quirks.c:3039:1: error: expected identifier or ‘(’ before ‘-’ token
 3039 | -static void ricoh_mmc_fixup_rl5c476(struct pci_dev *dev)
      | ^
drivers/pci/quirks.c:3068:1: error: expected identifier or ‘(’ before ‘-’ token
 3068 | -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH,
PCI_DEVICE_ID_RICOH_RL5C476, ricoh_mmc_fixup_rl5c476);
      | ^
drivers/pci/quirks.c:3069:1: error: expected identifier or ‘(’ before ‘-’ token
 3069 | -DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH,
PCI_DEVICE_ID_RICOH_RL5C476, ricoh_mmc_fixup_rl5c476);
      | ^
drivers/pci/quirks.c:3070:1: error: expected identifier or ‘(’ before ‘-’ token
 3070 | -
      | ^
In file included from ./include/linux/export.h:44,
                 from ./include/linux/linkage.h:7,
                 from ./include/linux/kernel.h:8,
                 from drivers/pci/quirks.c:16:
drivers/pci/quirks.c:3120:74: error: ‘ricoh_mmc_fixup_r5c832’
undeclared here (not in a function)
 3120 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH,
PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
      |
          ^~~~~~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:302:53: note: in definition of macro ‘__ADDRESSABLE’
  302 |   __PASTE(__addressable_##sym, __LINE__) = (void *)&sym;
      |                                                     ^~~
./include/linux/pci.h:1911:2: note: in expansion of macro
‘__DECLARE_PCI_FIXUP_SECTION’
 1911 |  __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/pci.h:1956:2: note: in expansion of macro
‘DECLARE_PCI_FIXUP_SECTION’
 1956 |  DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early,   \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pci/quirks.c:3120:1: note: in expansion of macro
‘DECLARE_PCI_FIXUP_EARLY’
 3120 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH,
PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
      | ^~~~~~~~~~~~~~~~~~~~~~~
make[5]: *** [scripts/Makefile.build:266: drivers/pci/quirks.o] Error 1
make[4]: *** [scripts/Makefile.build:509: drivers/pci] Error 2
make[3]: *** [Makefile:1649: drivers] Error 2
make[2]: *** [debian/rules:6: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:77: deb-pkg] Error 2
make: *** [Makefile:1427: deb-pkg] Error 2
root@...hael-desktop:/home/michael/Debian/linux-5.4-rc4#

Please also find attached the patched quirks.c file
Cheers.
Michael

On 25/10/2019, Michael . <keltoiboy@...il.com> wrote:
> I just tried to do a kernel compile on Debian Sid running kernel 5.2.
> Downloaded 4.19.80 modded the quirks file, please find modded file
> attached, and started the compile.
> About an hour into it it fails with:
>   CC      drivers/pci/quirks.o
> drivers/pci/quirks.c:2945:1: error: expected identifier or ‘(’ before ‘-’
> token
>  2945 | -static void ricoh_mmc_fixup_rl5c476(struct pci_dev *dev)
>       | ^
> drivers/pci/quirks.c:2974:1: error: expected identifier or ‘(’ before ‘-’
> token
>  2974 | -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH,
> PCI_DEVICE_ID_RICOH_RL5C476, ricoh_mmc_fixup_rl5c476);
>       | ^
> drivers/pci/quirks.c:2975:1: error: expected identifier or ‘(’ before ‘-’
> token
>  2975 | -DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH,
> PCI_DEVICE_ID_RICOH_RL5C476, ricoh_mmc_fixup_rl5c476);
>       | ^
> drivers/pci/quirks.c:2976:1: error: expected identifier or ‘(’ before ‘-’
> token
>  2976 | -
>       | ^
> In file included from ./include/linux/export.h:45,
>                  from ./include/linux/linkage.h:7,
>                  from ./include/linux/kernel.h:7,
>                  from drivers/pci/quirks.c:16:
> drivers/pci/quirks.c:3026:74: error: ‘ricoh_mmc_fixup_r5c832’
> undeclared here (not in a function)
>  3026 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH,
> PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
>       |
>           ^~~~~~~~~~~~~~~~~~~~~~
> ./include/linux/compiler.h:296:53: note: in definition of macro
> ‘__ADDRESSABLE’
>   296 |   __PASTE(__addressable_##sym, __LINE__) = (void *)&sym;
>       |                                                     ^~~
> ./include/linux/pci.h:1847:2: note: in expansion of macro
> ‘__DECLARE_PCI_FIXUP_SECTION’
>  1847 |  __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
>       |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> ./include/linux/pci.h:1892:2: note: in expansion of macro
> ‘DECLARE_PCI_FIXUP_SECTION’
>  1892 |  DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early,   \
>       |  ^~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/pci/quirks.c:3026:1: note: in expansion of macro
> ‘DECLARE_PCI_FIXUP_EARLY’
>  3026 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH,
> PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
>       | ^~~~~~~~~~~~~~~~~~~~~~~
> make[5]: *** [scripts/Makefile.build:304: drivers/pci/quirks.o] Error 1
> make[4]: *** [scripts/Makefile.build:544: drivers/pci] Error 2
> make[3]: *** [Makefile:1046: drivers] Error 2
> make[2]: *** [debian/rules:4: build] Error 2
> dpkg-buildpackage: error: debian/rules build subprocess returned exit status
> 2
> make[1]: *** [scripts/package/Makefile:75: deb-pkg] Error 2
> make: *** [Makefile:1359: deb-pkg] Error 2
> root@...hael-desktop:/home/michael/Debian/linux-4.19.80#
>
> I will try later with the latest 5.4-rc to see if the diff is
> incompatible with 4.19.
> Cheers.
> Michael
>
> On 22/10/2019, Michael . <keltoiboy@...il.com> wrote:
>> Thanks Domunik I'll get onto this and report back the results.
>>
>> On 22/10/2019, Dominik Brodowski <linux@...inikbrodowski.net> wrote:
>>> On Tue, Oct 22, 2019 at 05:17:12AM +1100, Michael . wrote:
>>>> Thank you Dominik for looking at this for us and passing it on.
>>>>
>>>> Good morning Bjorn, thank you also for looking into this for us and
>>>> thank you for CCing us into this as non of us are on the mailing list.
>>>> One question how do we apply this patch or is this for Dominik to try?
>>>
>>> That's for you and/or other users of this hardware; I cannot test this
>>> myself, sorry. As to how to apply the patch: you'd need to apply the
>>> patch
>>> for the linux kernel sources, and then build a custom kernel. Some hints
>>> on
>>> that (details depend on the distribtion):
>>>
>>> 	https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
>>> 	https://wiki.ubuntu.com/KernelTeam/GitKernelBuild
>>> 	https://wiki.archlinux.org/index.php/Kernels/Arch_Build_System
>>> 	https://kernelnewbies.org/KernelBuild
>>>
>>> Best,
>>> 	Dominik
>>>
>>
>

View attachment "quirks.c" of type "text/x-csrc" (193892 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ