stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* backport patches to linux-5.4.y
@ 2021-04-13 12:11 Anders Roxell
  2021-04-15 13:53 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Anders Roxell @ 2021-04-13 12:11 UTC (permalink / raw)
  To: linux-stable; +Cc: Linux Kernel Mailing List, acme, ravi.bangoria

Hi,

Can these patches be backported to linux-5.4.y, I've tried to build
perf on arm and it failed without these patches.
fc8c0a992233 ("perf tools: Use %define api.pure full instead of %pure-parser")
20befbb10803 ("perf tools: Use %zd for size_t printf formats on 32-bit")
77d02bd00cea ("perf map: Tighten snprintf() string precision to pass
gcc check on some 32-bit arches")



Commit fc8c0a992233 ("perf tools: Use %define api.pure full instead of
%pure-parser") fixes:

util/parse-events.y:1.1-12: warning: deprecated directive:
'%pure-parser', use '%define api.pure' [-Wdeprecated]
    1 | %pure-parser
      | ^~~~~~~~~~~~
      | %define api.pure

Commit 20befbb10803 ("perf tools: Use %zd for size_t printf formats on
32-bit") fixes:

In file included from util/session.c:17:
util/session.c: In function 'perf_session__process_compressed_event':
util/session.c:91:11: error: format '%ld' expects argument of type
'long int', but argument 4 has type 'size_t' {aka 'unsigned int'}
[-Werror=format=]
   91 |  pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
util/debug.h:16:21: note: in definition of macro 'pr_fmt'
   16 | #define pr_fmt(fmt) fmt
      |                     ^~~
util/session.c:91:2: note: in expansion of macro 'pr_debug'
   91 |  pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
      |  ^~~~~~~~

Commit 77d02bd00cea ("perf map: Tighten snprintf() string precision to
pass gcc check on some 32-bit arches") fixes:

util/map.c: In function 'map__new':
util/map.c:125:5: error: '%s' directive output may be truncated
writing between 1 and 2147483645 bytes into a region of size 4096
[-Werror=format-truncation=]
  125 |    "%s/platforms/%s/arch-%s/usr/lib/%s",
      |     ^~
In file included from /usr/arm-linux-gnueabihf/include/stdio.h:867,
                 from util/symbol.h:11,
                 from util/map.c:2:
/usr/arm-linux-gnueabihf/include/bits/stdio2.h:67:10: note:
'__builtin___snprintf_chk' output 32 or more bytes (assuming
4294967321) into a destination of size 4096
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Cheers,
Anders

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

* Re: backport patches to linux-5.4.y
  2021-04-13 12:11 backport patches to linux-5.4.y Anders Roxell
@ 2021-04-15 13:53 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-04-15 13:53 UTC (permalink / raw)
  To: Anders Roxell
  Cc: linux-stable, Linux Kernel Mailing List, acme, ravi.bangoria

On Tue, Apr 13, 2021 at 02:11:54PM +0200, Anders Roxell wrote:
> Hi,
> 
> Can these patches be backported to linux-5.4.y, I've tried to build
> perf on arm and it failed without these patches.
> fc8c0a992233 ("perf tools: Use %define api.pure full instead of %pure-parser")
> 20befbb10803 ("perf tools: Use %zd for size_t printf formats on 32-bit")
> 77d02bd00cea ("perf map: Tighten snprintf() string precision to pass
> gcc check on some 32-bit arches")
> 
> 
> 
> Commit fc8c0a992233 ("perf tools: Use %define api.pure full instead of
> %pure-parser") fixes:
> 
> util/parse-events.y:1.1-12: warning: deprecated directive:
> '%pure-parser', use '%define api.pure' [-Wdeprecated]
>     1 | %pure-parser
>       | ^~~~~~~~~~~~
>       | %define api.pure
> 
> Commit 20befbb10803 ("perf tools: Use %zd for size_t printf formats on
> 32-bit") fixes:
> 
> In file included from util/session.c:17:
> util/session.c: In function 'perf_session__process_compressed_event':
> util/session.c:91:11: error: format '%ld' expects argument of type
> 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'}
> [-Werror=format=]
>    91 |  pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
>       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
> util/debug.h:16:21: note: in definition of macro 'pr_fmt'
>    16 | #define pr_fmt(fmt) fmt
>       |                     ^~~
> util/session.c:91:2: note: in expansion of macro 'pr_debug'
>    91 |  pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
>       |  ^~~~~~~~
> 
> Commit 77d02bd00cea ("perf map: Tighten snprintf() string precision to
> pass gcc check on some 32-bit arches") fixes:
> 
> util/map.c: In function 'map__new':
> util/map.c:125:5: error: '%s' directive output may be truncated
> writing between 1 and 2147483645 bytes into a region of size 4096
> [-Werror=format-truncation=]
>   125 |    "%s/platforms/%s/arch-%s/usr/lib/%s",
>       |     ^~
> In file included from /usr/arm-linux-gnueabihf/include/stdio.h:867,
>                  from util/symbol.h:11,
>                  from util/map.c:2:
> /usr/arm-linux-gnueabihf/include/bits/stdio2.h:67:10: note:
> '__builtin___snprintf_chk' output 32 or more bytes (assuming
> 4294967321) into a destination of size 4096
>    67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    68 |        __bos (__s), __fmt, __va_arg_pack ());
>       |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now queued up, thanks.

greg k-h

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

end of thread, other threads:[~2021-04-15 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 12:11 backport patches to linux-5.4.y Anders Roxell
2021-04-15 13:53 ` Greg KH

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).