linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using
@ 2014-03-08 21:35 Chen Gang
  2014-03-08 21:47 ` Chen Gang
  0 siblings, 1 reply; 8+ messages in thread
From: Chen Gang @ 2014-03-08 21:35 UTC (permalink / raw)
  To: Håvard Skinnemoen, Hans-Christian Egtvedt
  Cc: linux-kernel@vger.kernel.org

Need export symbol flush_icache_range() to modules, just like another
platforms have done, or can not pass compiling.

The related error (with allmodconfig under avr32):

  ERROR: "flush_icache_range" [drivers/misc/lkdtm.ko] undefined!
  make[1]: *** [__modpost] Error 1
  make: *** [modules] Error 2


Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 arch/avr32/mm/cache.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/avr32/mm/cache.c b/arch/avr32/mm/cache.c
index 6a46ecd..85d635c 100644
--- a/arch/avr32/mm/cache.c
+++ b/arch/avr32/mm/cache.c
@@ -111,6 +111,7 @@ void flush_icache_range(unsigned long start, unsigned long end)
 	__flush_icache_range(start & ~(linesz - 1),
 			     (end + linesz - 1) & ~(linesz - 1));
 }
+EXPORT_SYMBOL(flush_icache_range);
 
 /*
  * This one is called from __do_fault() and do_swap_page().
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using
  2014-03-08 21:35 [PATCH] arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using Chen Gang
@ 2014-03-08 21:47 ` Chen Gang
  2014-03-08 22:17   ` Hans-Christian Egtvedt
  0 siblings, 1 reply; 8+ messages in thread
From: Chen Gang @ 2014-03-08 21:47 UTC (permalink / raw)
  To: Håvard Skinnemoen, Hans-Christian Egtvedt
  Cc: linux-kernel@vger.kernel.org


After this patch, our linux kernel can pass "avr32-linux-" allmodconfig
(it contents quite a few of warnings, but after check, I guess they are
not kernel's issue).

:-)

Thanks.


On 03/09/2014 05:35 AM, Chen Gang wrote:
> Need export symbol flush_icache_range() to modules, just like another
> platforms have done, or can not pass compiling.
> 
> The related error (with allmodconfig under avr32):
> 
>   ERROR: "flush_icache_range" [drivers/misc/lkdtm.ko] undefined!
>   make[1]: *** [__modpost] Error 1
>   make: *** [modules] Error 2
> 
> 
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  arch/avr32/mm/cache.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/avr32/mm/cache.c b/arch/avr32/mm/cache.c
> index 6a46ecd..85d635c 100644
> --- a/arch/avr32/mm/cache.c
> +++ b/arch/avr32/mm/cache.c
> @@ -111,6 +111,7 @@ void flush_icache_range(unsigned long start, unsigned long end)
>  	__flush_icache_range(start & ~(linesz - 1),
>  			     (end + linesz - 1) & ~(linesz - 1));
>  }
> +EXPORT_SYMBOL(flush_icache_range);
>  
>  /*
>   * This one is called from __do_fault() and do_swap_page().
> 


-- 
Chen Gang

Open, share and attitude like air, water and life which God blessed

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using
  2014-03-08 21:47 ` Chen Gang
@ 2014-03-08 22:17   ` Hans-Christian Egtvedt
  2014-03-09 15:19     ` Chen Gang
  0 siblings, 1 reply; 8+ messages in thread
From: Hans-Christian Egtvedt @ 2014-03-08 22:17 UTC (permalink / raw)
  To: Chen Gang; +Cc: Håvard Skinnemoen, linux-kernel@vger.kernel.org

Around Sun 09 Mar 2014 05:47:04 +0800 or thereabout, Chen Gang wrote:
> 
> After this patch, our linux kernel can pass "avr32-linux-" allmodconfig
> (it contents quite a few of warnings, but after check, I guess they are
> not kernel's issue).

That sounds great, I am a bit surprised however that the lkdtm module need
flush_icache_range. Would have been interesting to look into what causes this
dependency.

I will pull this into my for-linus branch, and push during the next merge
window.

> On 03/09/2014 05:35 AM, Chen Gang wrote:
>> Need export symbol flush_icache_range() to modules, just like another
>> platforms have done, or can not pass compiling.
>> 
>> The related error (with allmodconfig under avr32):
>> 
>>   ERROR: "flush_icache_range" [drivers/misc/lkdtm.ko] undefined!
>>   make[1]: *** [__modpost] Error 1
>>   make: *** [modules] Error 2
>> 
>> 
>> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>

Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>

>> ---
>>  arch/avr32/mm/cache.c | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/arch/avr32/mm/cache.c b/arch/avr32/mm/cache.c
>> index 6a46ecd..85d635c 100644
>> --- a/arch/avr32/mm/cache.c
>> +++ b/arch/avr32/mm/cache.c
>> @@ -111,6 +111,7 @@ void flush_icache_range(unsigned long start, unsigned long end)
>>  	__flush_icache_range(start & ~(linesz - 1),
>>  			     (end + linesz - 1) & ~(linesz - 1));
>>  }
>> +EXPORT_SYMBOL(flush_icache_range);
>>  
>>  /*
>>   * This one is called from __do_fault() and do_swap_page().
-- 
mvh
Hans-Christian Egtvedt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using
  2014-03-08 22:17   ` Hans-Christian Egtvedt
@ 2014-03-09 15:19     ` Chen Gang
  2014-03-15 21:18       ` Chen Gang
  0 siblings, 1 reply; 8+ messages in thread
From: Chen Gang @ 2014-03-09 15:19 UTC (permalink / raw)
  To: Hans-Christian Egtvedt
  Cc: Håvard Skinnemoen, linux-kernel@vger.kernel.org

On 03/09/2014 06:17 AM, Hans-Christian Egtvedt wrote:
> Around Sun 09 Mar 2014 05:47:04 +0800 or thereabout, Chen Gang wrote:
>>
>> After this patch, our linux kernel can pass "avr32-linux-" allmodconfig
>> (it contents quite a few of warnings, but after check, I guess they are
>> not kernel's issue).
> 
> That sounds great, I am a bit surprised however that the lkdtm module need
> flush_icache_range. Would have been interesting to look into what causes this
> dependency.
> 

"driver/misc/lkdtm.c" will use this flush_icache_range().

And some architectures export it to modules.

  [root@gchen arch]# grep -rn flush_icache_range * | grep EXPORT
  arm64/mm/flush.c:105:EXPORT_SYMBOL(flush_icache_range);
  avr32/mm/cache.c:114:EXPORT_SYMBOL(flush_icache_range);
  m68k/mm/cache.c:106:EXPORT_SYMBOL(flush_icache_range);
  mn10300/mm/cache-inv-icache.c:129:EXPORT_SYMBOL(flush_icache_range);
  mn10300/mm/cache-flush-icache.c:155:EXPORT_SYMBOL(flush_icache_range);
  sparc/mm/init_64.c:435:EXPORT_SYMBOL(flush_icache_range);


Welcome any more details information by any other members, thanks.


> I will pull this into my for-linus branch, and push during the next merge
> window.
> 

OK, thanks

>> On 03/09/2014 05:35 AM, Chen Gang wrote:
>>> Need export symbol flush_icache_range() to modules, just like another
>>> platforms have done, or can not pass compiling.
>>>
>>> The related error (with allmodconfig under avr32):
>>>
>>>   ERROR: "flush_icache_range" [drivers/misc/lkdtm.ko] undefined!
>>>   make[1]: *** [__modpost] Error 1
>>>   make: *** [modules] Error 2
>>>
>>>
>>> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> 
> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
> 

OK, thanks.

>>> ---
>>>  arch/avr32/mm/cache.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/avr32/mm/cache.c b/arch/avr32/mm/cache.c
>>> index 6a46ecd..85d635c 100644
>>> --- a/arch/avr32/mm/cache.c
>>> +++ b/arch/avr32/mm/cache.c
>>> @@ -111,6 +111,7 @@ void flush_icache_range(unsigned long start, unsigned long end)
>>>  	__flush_icache_range(start & ~(linesz - 1),
>>>  			     (end + linesz - 1) & ~(linesz - 1));
>>>  }
>>> +EXPORT_SYMBOL(flush_icache_range);
>>>  
>>>  /*
>>>   * This one is called from __do_fault() and do_swap_page().


-- 
Chen Gang

Open, share and attitude like air, water and life which God blessed

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using
  2014-03-09 15:19     ` Chen Gang
@ 2014-03-15 21:18       ` Chen Gang
  2014-03-22 23:12         ` Chen Gang
  0 siblings, 1 reply; 8+ messages in thread
From: Chen Gang @ 2014-03-15 21:18 UTC (permalink / raw)
  To: Hans-Christian Egtvedt
  Cc: Håvard Skinnemoen, linux-kernel@vger.kernel.org

On 03/09/2014 11:19 PM, Chen Gang wrote:
> On 03/09/2014 06:17 AM, Hans-Christian Egtvedt wrote:
>> Around Sun 09 Mar 2014 05:47:04 +0800 or thereabout, Chen Gang wrote:
>>>
>>> After this patch, our linux kernel can pass "avr32-linux-" allmodconfig
>>> (it contents quite a few of warnings, but after check, I guess they are
>>> not kernel's issue).
>>
>> That sounds great, I am a bit surprised however that the lkdtm module need
>> flush_icache_range. Would have been interesting to look into what causes this
>> dependency.
>>

After read a little more details for lkdtm, I guess "after overwrite an
executable area by do_nothing(), it needs flush_icache_range() to be
sure the new instructions/data must have effect with all cpu".

Welcome any additional information for it.

Thanks.

> 
> "driver/misc/lkdtm.c" will use this flush_icache_range().
> 
> And some architectures export it to modules.
> 
>   [root@gchen arch]# grep -rn flush_icache_range * | grep EXPORT
>   arm64/mm/flush.c:105:EXPORT_SYMBOL(flush_icache_range);
>   avr32/mm/cache.c:114:EXPORT_SYMBOL(flush_icache_range);
>   m68k/mm/cache.c:106:EXPORT_SYMBOL(flush_icache_range);
>   mn10300/mm/cache-inv-icache.c:129:EXPORT_SYMBOL(flush_icache_range);
>   mn10300/mm/cache-flush-icache.c:155:EXPORT_SYMBOL(flush_icache_range);
>   sparc/mm/init_64.c:435:EXPORT_SYMBOL(flush_icache_range);
> 
> 
> Welcome any more details information by any other members, thanks.
> 
> 

Thanks.
-- 
Chen Gang

Open, share and attitude like air, water and life which God blessed

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using
  2014-03-15 21:18       ` Chen Gang
@ 2014-03-22 23:12         ` Chen Gang
  2014-03-25  8:48           ` Hans-Christian Egtvedt
  0 siblings, 1 reply; 8+ messages in thread
From: Chen Gang @ 2014-03-22 23:12 UTC (permalink / raw)
  To: Hans-Christian Egtvedt
  Cc: Håvard Skinnemoen, linux-kernel@vger.kernel.org


Is this patch OK?

If it is necessary to continue analysing more details, please let me
know, and I will/should continue.

Thanks.

On 03/16/2014 05:18 AM, Chen Gang wrote:
> On 03/09/2014 11:19 PM, Chen Gang wrote:
>> On 03/09/2014 06:17 AM, Hans-Christian Egtvedt wrote:
>>> Around Sun 09 Mar 2014 05:47:04 +0800 or thereabout, Chen Gang wrote:
>>>>
>>>> After this patch, our linux kernel can pass "avr32-linux-" allmodconfig
>>>> (it contents quite a few of warnings, but after check, I guess they are
>>>> not kernel's issue).
>>>
>>> That sounds great, I am a bit surprised however that the lkdtm module need
>>> flush_icache_range. Would have been interesting to look into what causes this
>>> dependency.
>>>
> 
> After read a little more details for lkdtm, I guess "after overwrite an
> executable area by do_nothing(), it needs flush_icache_range() to be
> sure the new instructions/data must have effect with all cpu".
> 
> Welcome any additional information for it.
> 
> Thanks.
> 
>>
>> "driver/misc/lkdtm.c" will use this flush_icache_range().
>>
>> And some architectures export it to modules.
>>
>>   [root@gchen arch]# grep -rn flush_icache_range * | grep EXPORT
>>   arm64/mm/flush.c:105:EXPORT_SYMBOL(flush_icache_range);
>>   avr32/mm/cache.c:114:EXPORT_SYMBOL(flush_icache_range);
>>   m68k/mm/cache.c:106:EXPORT_SYMBOL(flush_icache_range);
>>   mn10300/mm/cache-inv-icache.c:129:EXPORT_SYMBOL(flush_icache_range);
>>   mn10300/mm/cache-flush-icache.c:155:EXPORT_SYMBOL(flush_icache_range);
>>   sparc/mm/init_64.c:435:EXPORT_SYMBOL(flush_icache_range);
>>
>>
>> Welcome any more details information by any other members, thanks.
>>
>>
> 
> Thanks.
> 


-- 
Chen Gang

Open, share and attitude like air, water and life which God blessed

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using
  2014-03-22 23:12         ` Chen Gang
@ 2014-03-25  8:48           ` Hans-Christian Egtvedt
  2014-03-25  8:51             ` Chen Gang
  0 siblings, 1 reply; 8+ messages in thread
From: Hans-Christian Egtvedt @ 2014-03-25  8:48 UTC (permalink / raw)
  To: Chen Gang; +Cc: Håvard Skinnemoen, linux-kernel@vger.kernel.org

Around Sun 23 Mar 2014 07:12:46 +0800 or thereabout, Chen Gang wrote:
> Is this patch OK?
> 

I reread everything you said, and it looks sane.

> If it is necessary to continue analysing more details, please let me
> know, and I will/should continue.

No, I will append it to my for-linus branch, and submit it early in the next
cycle. It should be just around the corner, Linus just released rc8 (-:

> On 03/16/2014 05:18 AM, Chen Gang wrote:
>> On 03/09/2014 11:19 PM, Chen Gang wrote:
>>> On 03/09/2014 06:17 AM, Hans-Christian Egtvedt wrote:
>>>> Around Sun 09 Mar 2014 05:47:04 +0800 or thereabout, Chen Gang wrote:
>>>>>
>>>>> After this patch, our linux kernel can pass "avr32-linux-" allmodconfig
>>>>> (it contents quite a few of warnings, but after check, I guess they are
>>>>> not kernel's issue).
>>>>
>>>> That sounds great, I am a bit surprised however that the lkdtm module need
>>>> flush_icache_range. Would have been interesting to look into what causes this
>>>> dependency.
>>>>
>> 
>> After read a little more details for lkdtm, I guess "after overwrite an
>> executable area by do_nothing(), it needs flush_icache_range() to be
>> sure the new instructions/data must have effect with all cpu".
>> 
>> Welcome any additional information for it.
>> 
>> Thanks.
>> 
>>>
>>> "driver/misc/lkdtm.c" will use this flush_icache_range().
>>>
>>> And some architectures export it to modules.
>>>
>>>   [root@gchen arch]# grep -rn flush_icache_range * | grep EXPORT
>>>   arm64/mm/flush.c:105:EXPORT_SYMBOL(flush_icache_range);
>>>   avr32/mm/cache.c:114:EXPORT_SYMBOL(flush_icache_range);
>>>   m68k/mm/cache.c:106:EXPORT_SYMBOL(flush_icache_range);
>>>   mn10300/mm/cache-inv-icache.c:129:EXPORT_SYMBOL(flush_icache_range);
>>>   mn10300/mm/cache-flush-icache.c:155:EXPORT_SYMBOL(flush_icache_range);
>>>   sparc/mm/init_64.c:435:EXPORT_SYMBOL(flush_icache_range);
>>>
>>> Welcome any more details information by any other members, thanks.
>> 
>> Thanks.
-- 
mvh
Hans-Christian Egtvedt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using
  2014-03-25  8:48           ` Hans-Christian Egtvedt
@ 2014-03-25  8:51             ` Chen Gang
  0 siblings, 0 replies; 8+ messages in thread
From: Chen Gang @ 2014-03-25  8:51 UTC (permalink / raw)
  To: Hans-Christian Egtvedt
  Cc: Håvard Skinnemoen, linux-kernel@vger.kernel.org

On 03/25/2014 04:48 PM, Hans-Christian Egtvedt wrote:
> Around Sun 23 Mar 2014 07:12:46 +0800 or thereabout, Chen Gang wrote:
>> Is this patch OK?
>>
> 
> I reread everything you said, and it looks sane.
> 
>> If it is necessary to continue analysing more details, please let me
>> know, and I will/should continue.
> 
> No, I will append it to my for-linus branch, and submit it early in the next
> cycle. It should be just around the corner, Linus just released rc8 (-:
> 

Thank you very much.


-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-25  8:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-08 21:35 [PATCH] arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using Chen Gang
2014-03-08 21:47 ` Chen Gang
2014-03-08 22:17   ` Hans-Christian Egtvedt
2014-03-09 15:19     ` Chen Gang
2014-03-15 21:18       ` Chen Gang
2014-03-22 23:12         ` Chen Gang
2014-03-25  8:48           ` Hans-Christian Egtvedt
2014-03-25  8:51             ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).