All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mksysmap: Fix the mismatch of '.L' symbols in System.map
@ 2020-05-31 10:28 AliOS system security
  2020-06-01 11:01 ` Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: AliOS system security @ 2020-05-31 10:28 UTC (permalink / raw)
  To: masahiroy, michal.lkml; +Cc: linux-kbuild, AliOS system security

When System.map was generated, the kernel used mksysmap to filter the
kernel symbols, but all the symbols with the second letter 'L' in the
kernel were filtered out, not just the symbols starting with 'dot + L'.

For example:
ashimida@ubuntu:~/linux$ cat System.map |grep ' .L'
ashimida@ubuntu:~/linux$ nm -n vmlinux |grep ' .L'
ffff0000088028e0 t bLength_show
......
ffff0000092e0408 b PLLP_OUTC_lock
ffff0000092e0410 b PLLP_OUTA_lock

I see that in the original patch[1], the original intent should be to
filter all local symbols starting with '.L', so I wonder if the code
here may add a '\' before '.L'?

[1]. mksysmap: Add h8300 local symbol pattern

Signed-off-by: AliOS system security <alios_sys_security@linux.alibaba.com>
---
 scripts/mksysmap | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mksysmap b/scripts/mksysmap
index a35acc0..9aa23d1 100755
--- a/scripts/mksysmap
+++ b/scripts/mksysmap
@@ -41,4 +41,4 @@
 # so we just ignore them to let readprofile continue to work.
 # (At least sparc64 has __crc_ in the middle).
 
-$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( .L\)' > $2
+$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)' > $2
-- 
2.7.4

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

* Re: [PATCH] mksysmap: Fix the mismatch of '.L' symbols in System.map
  2020-05-31 10:28 [PATCH] mksysmap: Fix the mismatch of '.L' symbols in System.map AliOS system security
@ 2020-06-01 11:01 ` Masahiro Yamada
  2020-06-02  6:41   ` AliOS system security
  2020-06-02  1:50 ` Masahiro Yamada
  2020-06-02  7:45 ` [PATCH v2] " ashimida
  2 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2020-06-01 11:01 UTC (permalink / raw)
  To: AliOS system security; +Cc: Michal Marek, Linux Kbuild mailing list

On Sun, May 31, 2020 at 7:28 PM AliOS system security
<alios_sys_security@linux.alibaba.com> wrote:
>
> When System.map was generated, the kernel used mksysmap to filter the
> kernel symbols, but all the symbols with the second letter 'L' in the
> kernel were filtered out, not just the symbols starting with 'dot + L'.
>
> For example:
> ashimida@ubuntu:~/linux$ cat System.map |grep ' .L'
> ashimida@ubuntu:~/linux$ nm -n vmlinux |grep ' .L'
> ffff0000088028e0 t bLength_show
> ......
> ffff0000092e0408 b PLLP_OUTC_lock
> ffff0000092e0410 b PLLP_OUTA_lock
>
> I see that in the original patch[1], the original intent should be to
> filter all local symbols starting with '.L', so I wonder if the code
> here may add a '\' before '.L'?


You are right, but please avoid the interrogatory sentence.

Shall I reword as follows?


The original intent should be to filter out all local symbols
starting with '.L', so the dot should be escaped.





>
> [1]. mksysmap: Add h8300 local symbol pattern
>
> Signed-off-by: AliOS system security <alios_sys_security@linux.alibaba.com>
> ---
>  scripts/mksysmap | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/mksysmap b/scripts/mksysmap
> index a35acc0..9aa23d1 100755
> --- a/scripts/mksysmap
> +++ b/scripts/mksysmap
> @@ -41,4 +41,4 @@
>  # so we just ignore them to let readprofile continue to work.
>  # (At least sparc64 has __crc_ in the middle).
>
> -$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( .L\)' > $2
> +$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)' > $2
> --
> 2.7.4
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] mksysmap: Fix the mismatch of '.L' symbols in System.map
  2020-05-31 10:28 [PATCH] mksysmap: Fix the mismatch of '.L' symbols in System.map AliOS system security
  2020-06-01 11:01 ` Masahiro Yamada
@ 2020-06-02  1:50 ` Masahiro Yamada
  2020-06-02  7:45 ` [PATCH v2] " ashimida
  2 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2020-06-02  1:50 UTC (permalink / raw)
  To: AliOS system security; +Cc: Michal Marek, Linux Kbuild mailing list

On Sun, May 31, 2020 at 7:28 PM AliOS system security
<alios_sys_security@linux.alibaba.com> wrote:
>
> When System.map was generated, the kernel used mksysmap to filter the
> kernel symbols, but all the symbols with the second letter 'L' in the
> kernel were filtered out, not just the symbols starting with 'dot + L'.
>
> For example:
> ashimida@ubuntu:~/linux$ cat System.map |grep ' .L'
> ashimida@ubuntu:~/linux$ nm -n vmlinux |grep ' .L'
> ffff0000088028e0 t bLength_show
> ......
> ffff0000092e0408 b PLLP_OUTC_lock
> ffff0000092e0410 b PLLP_OUTA_lock
>
> I see that in the original patch[1], the original intent should be to
> filter all local symbols starting with '.L', so I wonder if the code
> here may add a '\' before '.L'?
>
> [1]. mksysmap: Add h8300 local symbol pattern
>
> Signed-off-by: AliOS system security <alios_sys_security@linux.alibaba.com>


I think you should submit this patch
with your real name instead of
the team name.




-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] mksysmap: Fix the mismatch of '.L' symbols in System.map
  2020-06-01 11:01 ` Masahiro Yamada
@ 2020-06-02  6:41   ` AliOS system security
  0 siblings, 0 replies; 6+ messages in thread
From: AliOS system security @ 2020-06-02  6:41 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Michal Marek, Linux Kbuild mailing list


Thanks for your suggestion, I will use my personal account to post
a new version later, and amend this comment.

On 2020/6/1 19:01, Masahiro Yamada wrote:
 > On Sun, May 31, 2020 at 7:28 PM AliOS system security
 > <alios_sys_security@linux.alibaba.com> wrote:
 >>
 >> When System.map was generated, the kernel used mksysmap to filter the
 >> kernel symbols, but all the symbols with the second letter 'L' in the
 >> kernel were filtered out, not just the symbols starting with 'dot + L'.
 >>
 >> For example:
 >> ashimida@ubuntu:~/linux$ cat System.map |grep ' .L'
 >> ashimida@ubuntu:~/linux$ nm -n vmlinux |grep ' .L'
 >> ffff0000088028e0 t bLength_show
 >> ......
 >> ffff0000092e0408 b PLLP_OUTC_lock
 >> ffff0000092e0410 b PLLP_OUTA_lock
 >>
 >> I see that in the original patch[1], the original intent should be to
 >> filter all local symbols starting with '.L', so I wonder if the code
 >> here may add a '\' before '.L'?
 >
 >
 > You are right, but please avoid the interrogatory sentence.
 >
 > Shall I reword as follows?
 >
 >
 > The original intent should be to filter out all local symbols
 > starting with '.L', so the dot should be escaped.
 >
 >
 >
 >
 >
 >>
 >> [1]. mksysmap: Add h8300 local symbol pattern
 >>
 >> Signed-off-by: AliOS system security 
<alios_sys_security@linux.alibaba.com>
 >> ---
 >>   scripts/mksysmap | 2 +-
 >>   1 file changed, 1 insertion(+), 1 deletion(-)
 >>
 >> diff --git a/scripts/mksysmap b/scripts/mksysmap
 >> index a35acc0..9aa23d1 100755
 >> --- a/scripts/mksysmap
 >> +++ b/scripts/mksysmap
 >> @@ -41,4 +41,4 @@
 >>   # so we just ignore them to let readprofile continue to work.
 >>   # (At least sparc64 has __crc_ in the middle).
 >>
 >> -$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( 
.L\)' > $2
 >> +$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( 
\.L\)' > $2
 >> --
 >> 2.7.4
 >>
 >
 >

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

* [PATCH v2] mksysmap: Fix the mismatch of '.L' symbols in System.map
  2020-05-31 10:28 [PATCH] mksysmap: Fix the mismatch of '.L' symbols in System.map AliOS system security
  2020-06-01 11:01 ` Masahiro Yamada
  2020-06-02  1:50 ` Masahiro Yamada
@ 2020-06-02  7:45 ` ashimida
  2020-06-02 14:42   ` Masahiro Yamada
  2 siblings, 1 reply; 6+ messages in thread
From: ashimida @ 2020-06-02  7:45 UTC (permalink / raw)
  To: masahiroy, michal.lkml; +Cc: linux-kbuild, ashimida

When System.map was generated, the kernel used mksysmap to
filter the kernel symbols, but all the symbols with the
second letter 'L' in the kernel were filtered out, not just
the symbols starting with 'dot + L'.

For example:
ashimida@ubuntu:~/linux$ cat System.map |grep ' .L'
ashimida@ubuntu:~/linux$ nm -n vmlinux |grep ' .L'
ffff0000088028e0 t bLength_show
......
ffff0000092e0408 b PLLP_OUTC_lock
ffff0000092e0410 b PLLP_OUTA_lock

In the original patch[1], the original intent should
be to filter out all local symbols starting with '.L',
so the dot should be escaped.

[1]. mksysmap: Add h8300 local symbol pattern

Signed-off-by: ashimida <ashimida@linux.alibaba.com>
---
 scripts/mksysmap | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mksysmap b/scripts/mksysmap
index a35acc0..9aa23d1 100755
--- a/scripts/mksysmap
+++ b/scripts/mksysmap
@@ -41,4 +41,4 @@
 # so we just ignore them to let readprofile continue to work.
 # (At least sparc64 has __crc_ in the middle).
 
-$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( .L\)' > $2
+$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)' > $2
-- 
2.7.4

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

* Re: [PATCH v2] mksysmap: Fix the mismatch of '.L' symbols in System.map
  2020-06-02  7:45 ` [PATCH v2] " ashimida
@ 2020-06-02 14:42   ` Masahiro Yamada
  0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2020-06-02 14:42 UTC (permalink / raw)
  To: ashimida; +Cc: Michal Marek, Linux Kbuild mailing list

On Tue, Jun 2, 2020 at 4:45 PM ashimida <ashimida@linux.alibaba.com> wrote:
>
> When System.map was generated, the kernel used mksysmap to
> filter the kernel symbols, but all the symbols with the
> second letter 'L' in the kernel were filtered out, not just
> the symbols starting with 'dot + L'.
>
> For example:
> ashimida@ubuntu:~/linux$ cat System.map |grep ' .L'
> ashimida@ubuntu:~/linux$ nm -n vmlinux |grep ' .L'
> ffff0000088028e0 t bLength_show
> ......
> ffff0000092e0408 b PLLP_OUTC_lock
> ffff0000092e0410 b PLLP_OUTA_lock
>
> In the original patch[1], the original intent should
> be to filter out all local symbols starting with '.L',
> so the dot should be escaped.
>
> [1]. mksysmap: Add h8300 local symbol pattern
>
> Signed-off-by: ashimida <ashimida@linux.alibaba.com>
> ---

Applied to linux-kbuild. Thanks.






-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2020-06-02 14:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-31 10:28 [PATCH] mksysmap: Fix the mismatch of '.L' symbols in System.map AliOS system security
2020-06-01 11:01 ` Masahiro Yamada
2020-06-02  6:41   ` AliOS system security
2020-06-02  1:50 ` Masahiro Yamada
2020-06-02  7:45 ` [PATCH v2] " ashimida
2020-06-02 14:42   ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.