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] [day] [month] [year] [list]
Date:	Mon, 21 Sep 2015 16:11:19 +0300
From:	Pantelis Antoniou <pantelis.antoniou@...sulko.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Rob Herring <robherring2@...il.com>,
	Frank Rowand <frowand.list@...il.com>,
	Matt Porter <mporter@...sulko.com>,
	Koen Kooi <koen@...inion.thruhere.net>,
	Guenter Roeck <linux@...ck-us.net>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] of: changesets: Introduce changeset helper methods

Hi Geert,

> On Sep 21, 2015, at 16:07 , Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> 
> Hi Pantelis,
> 
> On Mon, Sep 21, 2015 at 2:49 PM, Pantelis Antoniou
> <pantelis.antoniou@...sulko.com> wrote:
>>> On Sep 21, 2015, at 15:47 , Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>>> On Mon, Sep 21, 2015 at 2:36 PM, Pantelis Antoniou
>>> <pantelis.antoniou@...sulko.com> wrote:
>>>>> On Sep 21, 2015, at 15:35 , Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>>>>> On Wed, Sep 16, 2015 at 6:11 PM, Pantelis Antoniou
>>>>> <pantelis.antoniou@...sulko.com> wrote:
>>>>>> Changesets are very powerful, but the lack of a helper API
>>>>>> makes using them cumbersome. Introduce a simple copy based
>>>>>> API that makes things considerably easier.
>>>>>> 
>>>>>> To wit, adding a property using the raw API.
>>>>>> 
>>>>>>      struct property *prop;
>>>>>>      prop = kzalloc(sizeof(*prop)), GFP_KERNEL);
>>>>>>      prop->name = kstrdup("compatible");
>>>>>>      prop->value = kstrdup("foo,bar");
>>>>>>      prop->length = strlen(prop->value) + 1;
>>>>>>      of_changeset_add_property(ocs, np, prop);
>>>>>> 
>>>>>> while using the helper API
>>>>>> 
>>>>>>      of_changeset_add_property_string(ocs, np, "compatible",
>>>>>>                      "foo,bar");
>>>>> 
>>>>> What about removing properties?
>>>> 
>>>> Once upon a time there was that capability. It was removed after we didn’t have
>>>> a good use for them yet. Do you have any? I’d be happy to re-add it :)
>>> 
>>> Aliases?
>>> 
>>> If an overlay removes e.g. a serial port, it should remove its alias, too.
>> 
>> Well, that case is handled. Addition of a property results in removal of a property when
>> the overlay is reverted.
> 
> Actually what I meant is the other way around: _adding_ the overlay would
> _remove_ the alias.
> 
> I have a board with an SDHI connector, and an expansion connector.
> SDHI and serial on the expansion connector share the same pins.
> By default, SDHI is enabled in the DTS.
> 
> To add a serial port to the expansion connector, I disable the SDHI device,
> add the alias, and add the serial device.
> (dtsi in http://www.spinics.net/lists/devicetree/msg79438.html)
> 
> Now imagine doing the opposite: having the serial device enabled by default.
> Then the overlay should disable the serial device, remove the alias, and add
> the SDHI device.
> 

Excellent; this is the use-case I was looking for :)

> Gr{oetje,eeting}s,
> 
>                        Geert
> 

Regards

— Pantelis

> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                -- Linus Torvalds

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ