linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Suren Baghdasaryan <surenb@google.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	 Andrew Morton <akpm@linux-foundation.org>,
	 Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: drivers/auxdisplay/panel.c:1454:2: error: call to __compiletime_assert_309 declared with 'error' attribute: BUILD_BUG_ON failed: !__builtin_constant_p(_dest_len) || _dest_len == (size_t)-1
Date: Fri, 31 Jan 2025 08:55:07 -0800	[thread overview]
Message-ID: <CAJuCfpGrtTK=reeVPrS+GQngs=WS-cZvy_YU9-JGyRgVFdofAw@mail.gmail.com> (raw)
In-Reply-To: <202501310832.kiAeOt2z-lkp@intel.com>

On Thu, Jan 30, 2025 at 4:06 PM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   b4b0881156fb8209bf5ef6cb63211bb0ad6e1a6b
> commit: 07438779313caafe52ac1a1a6958d735a5938988 alloc_tag: avoid current->alloc_tag manipulations when profiling is disabled
> date:   5 days ago
> config: hexagon-randconfig-r133-20250131 (https://download.01.org/0day-ci/archive/20250131/202501310832.kiAeOt2z-lkp@intel.com/config)
> compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
> reproduce: (https://download.01.org/0day-ci/archive/20250131/202501310832.kiAeOt2z-lkp@intel.com/reproduce)

Just saw this report (was on vacation). Will try to figure out what's going on.

>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202501310832.kiAeOt2z-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> >> drivers/auxdisplay/panel.c:1454:2: error: call to __compiletime_assert_309 declared with 'error' attribute: BUILD_BUG_ON failed: !__builtin_constant_p(_dest_len) || _dest_len == (size_t)-1
>            strtomem_pad(key->u.kbd.release_str, release, '\0');
>            ^
>    include/linux/string.h:417:2: note: expanded from macro 'strtomem_pad'
>            BUILD_BUG_ON(!__builtin_constant_p(_dest_len) ||                \
>            ^
>    include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
>            BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>            ^
>    include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
>    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>                                        ^
>    note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
>    include/linux/compiler_types.h:530:2: note: expanded from macro '_compiletime_assert'
>            __compiletime_assert(condition, msg, prefix, suffix)
>            ^
>    include/linux/compiler_types.h:523:4: note: expanded from macro '__compiletime_assert'
>                            prefix ## suffix();                             \
>                            ^
>    <scratch space>:127:1: note: expanded from here
>    __compiletime_assert_309
>    ^
>    1 error generated.
>
>
> vim +/error +1454 drivers/auxdisplay/panel.c
>
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1426
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1427  /* tries to bind a key to the signal name <name>. The key will send the
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1428   * strings <press>, <repeat>, <release> for these respective events.
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1429   * Returns the pointer to the new key if ok, NULL if the key could not be bound.
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1430   */
> 36d2041a3d57b9 drivers/staging/panel/panel.c Peter Huewe              2013-02-15  1431  static struct logical_input *panel_bind_key(const char *name, const char *press,
> 36d2041a3d57b9 drivers/staging/panel/panel.c Peter Huewe              2013-02-15  1432                                              const char *repeat,
> 36d2041a3d57b9 drivers/staging/panel/panel.c Peter Huewe              2013-02-15  1433                                              const char *release)
> 698b1515f03914 drivers/staging/panel/panel.c Willy Tarreau            2008-11-22  1434  {
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1435          struct logical_input *key;
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1436
> fdf4a4948ca8a1 drivers/staging/panel/panel.c Dominique van den Broeck 2014-05-21  1437          key = kzalloc(sizeof(*key), GFP_KERNEL);
> eb073a9bf2b6ed drivers/staging/panel/panel.c Toshiaki Yamane          2012-07-12  1438          if (!key)
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1439                  return NULL;
> eb073a9bf2b6ed drivers/staging/panel/panel.c Toshiaki Yamane          2012-07-12  1440
> 698b1515f03914 drivers/staging/panel/panel.c Willy Tarreau            2008-11-22  1441          if (!input_name2mask(name, &key->mask, &key->value, &scan_mask_i,
> cb46f472cbb08c drivers/staging/panel/panel.c Kulikov Vasiliy          2010-07-12  1442                               &scan_mask_o)) {
> cb46f472cbb08c drivers/staging/panel/panel.c Kulikov Vasiliy          2010-07-12  1443                  kfree(key);
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1444                  return NULL;
> cb46f472cbb08c drivers/staging/panel/panel.c Kulikov Vasiliy          2010-07-12  1445          }
> 698b1515f03914 drivers/staging/panel/panel.c Willy Tarreau            2008-11-22  1446
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1447          key->type = INPUT_TYPE_KBD;
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1448          key->state = INPUT_ST_LOW;
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1449          key->rise_time = 1;
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1450          key->fall_time = 1;
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1451
> a952abcdaa2211 drivers/auxdisplay/panel.c    Justin Stitt             2023-09-11  1452          strtomem_pad(key->u.kbd.press_str, press, '\0');
> a952abcdaa2211 drivers/auxdisplay/panel.c    Justin Stitt             2023-09-11  1453          strtomem_pad(key->u.kbd.repeat_str, repeat, '\0');
> a952abcdaa2211 drivers/auxdisplay/panel.c    Justin Stitt             2023-09-11 @1454          strtomem_pad(key->u.kbd.release_str, release, '\0');
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1455          list_add(&key->list, &logical_inputs);
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1456          return key;
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1457  }
> 7005b58458e4be drivers/staging/panel/panel.c Willy Tarreau            2008-11-13  1458
>
> :::::: The code at line 1454 was first introduced by commit
> :::::: a952abcdaa22116d940ca9cb9253caad1622ae93 auxdisplay: panel: Replace deprecated strncpy() with strtomem_pad()
>
> :::::: TO: Justin Stitt <justinstitt@google.com>
> :::::: CC: Kees Cook <keescook@chromium.org>
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki


  reply	other threads:[~2025-01-31 16:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31  0:05 kernel test robot
2025-01-31 16:55 ` Suren Baghdasaryan [this message]
2025-01-31 22:51   ` Suren Baghdasaryan
2025-02-01 19:21     ` Suren Baghdasaryan
2025-02-01 20:06       ` Suren Baghdasaryan
2025-02-01 19:27     ` Kent Overstreet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJuCfpGrtTK=reeVPrS+GQngs=WS-cZvy_YU9-JGyRgVFdofAw@mail.gmail.com' \
    --to=surenb@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox