lkml.org 
[lkml]   [2021]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/6] driver core: Add common support to skip probe for un-authorized devices
From
Date

>> The "it" that I referred to is the claim that no driver should be
>> touching hardware in their module init call. Andi seems to think
>> such drivers are worth working around with a special remap API.
> Andi is wrong.

While overall it's a small percentage of the total, there are still
quite a few drivers that do touch hardware in init functions. Sometimes
for good reasons -- they need to do some extra probing to discover
something that is not enumerated -- sometimes just because it's very old
legacy code that predates the modern driver model.

The legacy drivers could be fixed, but nobody really wants to touch them
anymore and they're impossible to test.

The drivers that probe something that is not enumerated in a standard
way have no choice, it cannot be implemented in a different way.

So instead we're using a "firewall" the prevents these drivers from
doing bad things by not allowing ioremap access unless opted in, and
also do some filtering on the IO ports The device filter is still the
primary mechanism, the ioremap filtering is just belts and suspenders
for those odd cases.

If you want we can send an exact list, we did some analysis using a
patched smatch tool.

-Andi

\
 
 \ /
  Last update: 2021-09-30 19:17    [W:0.080 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site