All of lore.kernel.org
 help / color / mirror / Atom feed
From: Elizabeth Figura <zfigura@codeweavers.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: include/linux/thread_info.h:259:25: error: call to '__bad_copy_to' declared with attribute error: copy destination size is too small
Date: Mon, 10 Feb 2025 14:39:46 -0600	[thread overview]
Message-ID: <2421077.NG923GbCHz@camazotz> (raw)
In-Reply-To: <202502072019.LYoCR9bF-lkp@intel.com>

On Friday, 7 February 2025 06:11:47 CST kernel test robot wrote:
>    In file included from include/linux/spinlock.h:60,
>                     from include/linux/wait.h:9,
>                     from include/linux/wait_bit.h:8,
>                     from include/linux/fs.h:6,
>                     from drivers/misc/ntsync.c:11:
>    In function 'check_copy_size',
>        inlined from 'copy_from_user' at include/linux/uaccess.h:207:7,
>        inlined from 'setup_wait' at drivers/misc/ntsync.c:888:6:
> >> include/linux/thread_info.h:259:25: error: call to '__bad_copy_to' declared with attribute error: copy destination size is too small
>      259 |                         __bad_copy_to();
>          |                         ^~~~~~~~~~~~~~~

This was caught before and mentioned in [1]. The suggestion there of changing "args->count" to "count" doesn't help.

Somehow gcc 12 thinks that the array_size(count, sizeof(*fds)) parameter is constant, although it's finnicky and depends on exactly where __builtin_constant_p() is evaluated.

The bug goes away with gcc 13. Is this worth trying to work around? I don't have any ideas for how to do so.

[1] https://lore.kernel.org/all/21811752-06d3-44cd-b3e6-f8124676df87@app.fastmail.com/



  reply	other threads:[~2025-02-10 20:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 12:11 include/linux/thread_info.h:259:25: error: call to '__bad_copy_to' declared with attribute error: copy destination size is too small kernel test robot
2025-02-10 20:39 ` Elizabeth Figura [this message]
2025-02-14  8:44   ` Philip Li
2025-02-14 11:22     ` Arnd Bergmann
2025-02-18  2:44       ` Oliver Sang
2025-02-18  6:04         ` Arnd Bergmann
2025-02-18  8:08       ` Geert Uytterhoeven
  -- strict thread matches above, loose matches on Subject: below --
2025-02-22 21:49 kernel test robot

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=2421077.NG923GbCHz@camazotz \
    --to=zfigura@codeweavers.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.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 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.