public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 2/5] jump label: constify lookup functions
       [not found] ` <1357772960-4436-2-git-send-email-sasha.levin@oracle.com>
@ 2013-01-18 21:25   ` Steven Rostedt
  2013-01-21  6:51     ` Rusty Russell
  2013-01-25  4:15     ` Sasha Levin
  0 siblings, 2 replies; 5+ messages in thread
From: Steven Rostedt @ 2013-01-18 21:25 UTC (permalink / raw)
  To: Sasha Levin
  Cc: tglx, mingo, hpa, fweisbec, rusty, ananth, anil.s.keshavamurthy,
	masami.hiramatsu.pt, jbaron, x86, linux-kernel, MartinSchwidefsky,
	Heiko Carstens, linux-s390

On Wed, 2013-01-09 at 18:09 -0500, Sasha Levin wrote:
> Modify the parameters of all the lookup and the bookkeeping functions which
> should be const to const.
> 
> For example, jump_label_text_reserved() doesn't modify the memory it works on,
> it just checks whether there are any jump labels there.

This is dependent on the module patch, which Rusty is taking. I need to
see that he has it before this can go in. At least see it in linux-next.

Also, you should have Cc'd the linux-arch mailing list. I'll send it
there.

> 
> Note I couldn't test the non-x86 architectures, but the changes are rather
> trivial.

I ran it on 25 archs, and s390 hit:

/work/autotest/nobackup/cross-linux.git/arch/s390/kernel/jump_label.c: In function 'arch_jump_label_transform':
/work/autotest/nobackup/cross-linux.git/arch/s390/kernel/jump_label.c:58:13: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

-- Steve

Here's the patch:

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/s390/kernel/jump_label.c
b/arch/s390/kernel/jump_label.c
index 85fa643..ef047ef 100644
--- a/arch/s390/kernel/jump_label.c
+++ b/arch/s390/kernel/jump_label.c
@@ -18,7 +18,7 @@ struct insn {
 } __packed;
 
 struct insn_args {
-	struct jump_entry *entry;
+	const struct jump_entry *entry;
 	enum jump_label_type type;
 };
 

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

* Re: [PATCH 2/5] jump label: constify lookup functions
  2013-01-18 21:25   ` [PATCH 2/5] jump label: constify lookup functions Steven Rostedt
@ 2013-01-21  6:51     ` Rusty Russell
  2013-01-25  4:15     ` Sasha Levin
  1 sibling, 0 replies; 5+ messages in thread
From: Rusty Russell @ 2013-01-21  6:51 UTC (permalink / raw)
  To: Steven Rostedt, Sasha Levin
  Cc: tglx, mingo, hpa, fweisbec, ananth, anil.s.keshavamurthy,
	masami.hiramatsu.pt, jbaron, x86, linux-kernel, MartinSchwidefsky,
	Heiko Carstens, linux-s390

Steven Rostedt <rostedt@goodmis.org> writes:
> On Wed, 2013-01-09 at 18:09 -0500, Sasha Levin wrote:
>> Modify the parameters of all the lookup and the bookkeeping functions which
>> should be const to const.
>> 
>> For example, jump_label_text_reserved() doesn't modify the memory it works on,
>> it just checks whether there are any jump labels there.
>
> This is dependent on the module patch, which Rusty is taking. I need to
> see that he has it before this can go in. At least see it in linux-next.
>
> Also, you should have Cc'd the linux-arch mailing list. I'll send it
> there.

I've put it in now.

Thanks,
Rusty.

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

* Re: [PATCH 2/5] jump label: constify lookup functions
  2013-01-18 21:25   ` [PATCH 2/5] jump label: constify lookup functions Steven Rostedt
  2013-01-21  6:51     ` Rusty Russell
@ 2013-01-25  4:15     ` Sasha Levin
  2013-01-25 10:16       ` Borislav Petkov
  1 sibling, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2013-01-25  4:15 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: tglx, mingo, hpa, fweisbec, rusty, ananth, anil.s.keshavamurthy,
	masami.hiramatsu.pt, jbaron, x86, linux-kernel, MartinSchwidefsky,
	Heiko Carstens, linux-s390

On 01/18/2013 04:25 PM, Steven Rostedt wrote:
> On Wed, 2013-01-09 at 18:09 -0500, Sasha Levin wrote:
>> Modify the parameters of all the lookup and the bookkeeping functions which
>> should be const to const.
>>
>> For example, jump_label_text_reserved() doesn't modify the memory it works on,
>> it just checks whether there are any jump labels there.
> 
> This is dependent on the module patch, which Rusty is taking. I need to
> see that he has it before this can go in. At least see it in linux-next.
> 
> Also, you should have Cc'd the linux-arch mailing list. I'll send it
> there.
> 
>>
>> Note I couldn't test the non-x86 architectures, but the changes are rather
>> trivial.
> 
> I ran it on 25 archs, and s390 hit:
> 
> /work/autotest/nobackup/cross-linux.git/arch/s390/kernel/jump_label.c: In function 'arch_jump_label_transform':
> /work/autotest/nobackup/cross-linux.git/arch/s390/kernel/jump_label.c:58:13: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
> 
> -- Steve
> 
> Here's the patch:
> 
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> 
> diff --git a/arch/s390/kernel/jump_label.c
> b/arch/s390/kernel/jump_label.c
> index 85fa643..ef047ef 100644
> --- a/arch/s390/kernel/jump_label.c
> +++ b/arch/s390/kernel/jump_label.c
> @@ -18,7 +18,7 @@ struct insn {
>  } __packed;
>  
>  struct insn_args {
> -	struct jump_entry *entry;
> +	const struct jump_entry *entry;
>  	enum jump_label_type type;
>  };
>  

Sorry about this. I didn't have the ability to build all arches over here :(

Would you like me to resend this patch with your fix?


Thanks,
Sasha

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

* Re: [PATCH 2/5] jump label: constify lookup functions
  2013-01-25  4:15     ` Sasha Levin
@ 2013-01-25 10:16       ` Borislav Petkov
  2013-01-25 13:03         ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Borislav Petkov @ 2013-01-25 10:16 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Steven Rostedt, tglx, mingo, hpa, fweisbec, rusty, ananth,
	anil.s.keshavamurthy, masami.hiramatsu.pt, jbaron, x86,
	linux-kernel, MartinSchwidefsky, Heiko Carstens, linux-s390

On Thu, Jan 24, 2013 at 11:15:10PM -0500, Sasha Levin wrote:
> Sorry about this. I didn't have the ability to build all arches over here :(

Seen this already: https://www.kernel.org/pub/tools/crosstool/

?

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH 2/5] jump label: constify lookup functions
  2013-01-25 10:16       ` Borislav Petkov
@ 2013-01-25 13:03         ` Steven Rostedt
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2013-01-25 13:03 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Sasha Levin, tglx, mingo, hpa, fweisbec, rusty, ananth,
	anil.s.keshavamurthy, masami.hiramatsu.pt, jbaron, x86,
	linux-kernel, MartinSchwidefsky, Heiko Carstens, linux-s390

On Fri, 2013-01-25 at 11:16 +0100, Borislav Petkov wrote:
> On Thu, Jan 24, 2013 at 11:15:10PM -0500, Sasha Levin wrote:
> > Sorry about this. I didn't have the ability to build all arches over here :(
> 
> Seen this already: https://www.kernel.org/pub/tools/crosstool/

And look in the kernel tree:

  tools/testing/ktest/examples/crosstests.conf

-- Steve

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

end of thread, other threads:[~2013-01-25 13:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1357772960-4436-1-git-send-email-sasha.levin@oracle.com>
     [not found] ` <1357772960-4436-2-git-send-email-sasha.levin@oracle.com>
2013-01-18 21:25   ` [PATCH 2/5] jump label: constify lookup functions Steven Rostedt
2013-01-21  6:51     ` Rusty Russell
2013-01-25  4:15     ` Sasha Levin
2013-01-25 10:16       ` Borislav Petkov
2013-01-25 13:03         ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox