Re: [PATCH] gpio: sim: added configfs option for static base

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28.02.25 16:43, Bartosz Golaszewski wrote:
> On Fri, Feb 28, 2025 at 2:54 PM Sebastian Dietz <s.dietz@xxxxxxxxxxxxxxx> wrote:
>>
>> On 28.02.25 14:22, Bartosz Golaszewski wrote:
>>> On Fri, Feb 28, 2025 at 1:46 PM Sebastian Dietz <s.dietz@xxxxxxxxxxxxxxx> wrote:
>>>>
>>>> To replicate gpio mappings of systems it is sometimes needed to have
>>>> the base at static values.
>>>>
>>>
>>> Can you give me more info on why you'd need that? Static base is
>>> largely a legacy and deprecated feature, there's ongoing effort to
>>> remove it from the kernel.
>>>
>>>> base is treated as unsigned as there doesn't happen to be a
>>>> fwnode_property_read_s32().
>>>>
>>>
>>> Ha! That's interesting, I wonder why that is. We do have signed
>>> variants for OF-specific properties.
>>>
>>> Bart
>>
>> We are building digital twins for embedded devices for security research. The
>> firmware of these devices often export static gpio pins which we simulate
>> using gpio-sim. With this patch we are able to satisfy these conditions.
>>
>> While the feature may be deprecated, i would argue that it makes sense and
>> fits the nature of a simulator to be able to configure it manually.
>>
>> BR,
>> Sebastian
> 
> What kind of digital twins? Using qemu? In any case - I really dislike
> the idea of extending the configfs interface of gpio-sim with an
> attribute to support an option that we're actively trying to remove
> from GPIO core. Unless you can give me a really convincing argument, I
> will allow myself to use my maintainers' right to NAK this one.
> 
> Bart

Exactly, we are analysing the firmware and re-host it in a qemu instance with a
newer kernel.

First of all thanks for giving me the oppertunity to pitch the option.

Gpio-sim provides a way to create chips for testing purposes. Some embedded 
device developers still rely on sysfs. While the ABI is certainly obsolete and 
not actively developed, it is still actively maintained - Which means that in 
real-world testing scenarios, it remains relevant. Our experience has shown 
that these firmware images are often build with hardcoded sysfs paths in mind 
and do not use the character device interface. 

This feature wouldn't encourage new use of static bases - it would just make 
testing existing setups less of a headache. 

Given that gpio-sim is meant for testing, shouldn't it provide the flexibility 
to test in this scenarios?

Thanks in advance,
Sebastian





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux