[rtc-linux] Re: [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops

2017-01-04 Thread Kees Cook
On Wed, Jan 4, 2017 at 5:06 AM, Russell King - ARM Linux wrote: > On Wed, Jan 04, 2017 at 01:23:41PM +0100, Julia Lawall wrote: >> Basically, the strategy of the patch is that one may consider it >> preferable to duplicate the structure for the different alternatives, >>

[rtc-linux] Re: [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops

2017-01-04 Thread Julia Lawall
On Wed, 4 Jan 2017, Russell King - ARM Linux wrote: > On Wed, Jan 04, 2017 at 01:23:41PM +0100, Julia Lawall wrote: > > Basically, the strategy of the patch is that one may consider it > > preferable to duplicate the structure for the different alternatives, > > rather than use __ro_after_init.

[rtc-linux] Re: [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops

2017-01-04 Thread Russell King - ARM Linux
On Wed, Jan 04, 2017 at 01:23:41PM +0100, Julia Lawall wrote: > Basically, the strategy of the patch is that one may consider it > preferable to duplicate the structure for the different alternatives, > rather than use __ro_after_init. Perhaps if the structure were larger, > then __ro_after_init

[rtc-linux] Re: [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops

2017-01-04 Thread Julia Lawall
On Wed, 4 Jan 2017, Russell King - ARM Linux wrote: > On Wed, Jan 04, 2017 at 12:43:32PM +0100, Julia Lawall wrote: > > > The question was whether the point to the rtc_class_ops could be made > > > __ro_after_init. And Russell is right, it is pointed to by the ops > > > pointer in a struct

[rtc-linux] Re: [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops

2017-01-04 Thread Julia Lawall
> The question was whether the point to the rtc_class_ops could be made > __ro_after_init. And Russell is right, it is pointed to by the ops > pointer in a struct rtc_device and that struct is dynamically allocated > in rtc_device_register(). OK, I think it's a terminology issue. You mean the

[rtc-linux] Re: [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops

2017-01-04 Thread Alexandre Belloni
On 04/01/2017 at 11:57:00 +0100, Julia Lawall wrote : > > > On Tue, 3 Jan 2017, Russell King - ARM Linux wrote: > > > On Tue, Jan 03, 2017 at 09:31:18PM +, Russell King - ARM Linux wrote: > > > On Tue, Jan 03, 2017 at 01:18:29PM -0800, Kees Cook wrote: > > > > On Mon, Jan 2, 2017 at 6:06

[rtc-linux] Re: [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops

2017-01-04 Thread Julia Lawall
On Tue, 3 Jan 2017, Russell King - ARM Linux wrote: > On Tue, Jan 03, 2017 at 09:31:18PM +, Russell King - ARM Linux wrote: > > On Tue, Jan 03, 2017 at 01:18:29PM -0800, Kees Cook wrote: > > > On Mon, Jan 2, 2017 at 6:06 AM, Russell King - ARM Linux > > > wrote: > >

[rtc-linux] Re: [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops

2017-01-03 Thread Russell King - ARM Linux
On Tue, Jan 03, 2017 at 01:18:29PM -0800, Kees Cook wrote: > On Mon, Jan 2, 2017 at 6:06 AM, Russell King - ARM Linux > wrote: > > On Mon, Dec 26, 2016 at 05:01:02PM +0530, Bhumika Goyal wrote: > >> The object armada38x_rtc_ops of type rtc_class_ops structure is not > >>

[rtc-linux] Re: [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops

2017-01-03 Thread Kees Cook
On Mon, Jan 2, 2017 at 6:06 AM, Russell King - ARM Linux wrote: > On Mon, Dec 26, 2016 at 05:01:02PM +0530, Bhumika Goyal wrote: >> The object armada38x_rtc_ops of type rtc_class_ops structure is not >> modified after getting initialized by armada38x_rtc_probe. Apart from

[rtc-linux] Re: [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops

2017-01-02 Thread Russell King - ARM Linux
On Mon, Dec 26, 2016 at 05:01:02PM +0530, Bhumika Goyal wrote: > The object armada38x_rtc_ops of type rtc_class_ops structure is not > modified after getting initialized by armada38x_rtc_probe. Apart from > getting referenced in init it is also passed as an argument to the function >