Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>, tiwai@suse.de
Cc: clemens@ladisch.de, alsa-devel@alsa-project.org, kbuild-all@lists.01.org
Subject: Re: [PATCH] ALSA: firewire-motu: fix invalid memory access when operating hwdep character device
Date: Mon, 25 Oct 2021 23:55:46 +0800	[thread overview]
Message-ID: <202110252353.5hIHlWyy-lkp@intel.com> (raw)
In-Reply-To: <20211020042555.40866-1-o-takashi@sakamocchi.jp>

[-- Attachment #1: Type: text/plain, Size: 4042 bytes --]

Hi Takashi,

I love your patch! Yet something to improve:

[auto build test ERROR on tiwai-sound/for-next]
[also build test ERROR on next-20211025]
[cannot apply to v5.15-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Takashi-Sakamoto/ALSA-firewire-motu-fix-invalid-memory-access-when-operating-hwdep-character-device/20211020-122834
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: arc-randconfig-r043-20211020 (attached as .config)
compiler: arc-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/0105a381c2c6677118fca8f30b96778d590e2173
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Takashi-Sakamoto/ALSA-firewire-motu-fix-invalid-memory-access-when-operating-hwdep-character-device/20211020-122834
        git checkout 0105a381c2c6677118fca8f30b96778d590e2173
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash sound/firewire/motu/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/current.h:5,
                    from arch/arc/include/asm/current.h:20,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from sound/firewire/motu/motu.h:11,
                    from sound/firewire/motu/motu-hwdep.c:17:
   In function 'check_copy_size',
       inlined from 'copy_to_user' at include/linux/uaccess.h:199:6,
       inlined from 'copy_dsp_event_to_user' at sound/firewire/motu/motu-hwdep.c:49:7,
       inlined from 'hwdep_read' at sound/firewire/motu/motu-hwdep.c:101:11:
>> include/linux/thread_info.h:211:25: error: call to '__bad_copy_from' declared with attribute error: copy source size is too small
     211 |                         __bad_copy_from();
         |                         ^~~~~~~~~~~~~~~~~


vim +/__bad_copy_from +211 include/linux/thread_info.h

b0377fedb65280 Al Viro   2017-06-29  202  
9dd819a15162f8 Kees Cook 2019-09-25  203  static __always_inline __must_check bool
b0377fedb65280 Al Viro   2017-06-29  204  check_copy_size(const void *addr, size_t bytes, bool is_source)
b0377fedb65280 Al Viro   2017-06-29  205  {
b0377fedb65280 Al Viro   2017-06-29  206  	int sz = __compiletime_object_size(addr);
b0377fedb65280 Al Viro   2017-06-29  207  	if (unlikely(sz >= 0 && sz < bytes)) {
b0377fedb65280 Al Viro   2017-06-29  208  		if (!__builtin_constant_p(bytes))
b0377fedb65280 Al Viro   2017-06-29  209  			copy_overflow(sz, bytes);
b0377fedb65280 Al Viro   2017-06-29  210  		else if (is_source)
b0377fedb65280 Al Viro   2017-06-29 @211  			__bad_copy_from();
b0377fedb65280 Al Viro   2017-06-29  212  		else
b0377fedb65280 Al Viro   2017-06-29  213  			__bad_copy_to();
b0377fedb65280 Al Viro   2017-06-29  214  		return false;
b0377fedb65280 Al Viro   2017-06-29  215  	}
6d13de1489b6bf Kees Cook 2019-12-04  216  	if (WARN_ON_ONCE(bytes > INT_MAX))
6d13de1489b6bf Kees Cook 2019-12-04  217  		return false;
b0377fedb65280 Al Viro   2017-06-29  218  	check_object_size(addr, bytes, is_source);
b0377fedb65280 Al Viro   2017-06-29  219  	return true;
b0377fedb65280 Al Viro   2017-06-29  220  }
b0377fedb65280 Al Viro   2017-06-29  221  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34459 bytes --]

      parent reply	other threads:[~2021-10-25 15:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20  4:25 [PATCH] ALSA: firewire-motu: fix invalid memory access when operating hwdep character device Takashi Sakamoto
2021-10-20  5:40 ` Takashi Iwai
2021-10-21 14:11   ` Takashi Sakamoto
2021-10-25 15:55 ` kernel test robot [this message]

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=202110252353.5hIHlWyy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=kbuild-all@lists.01.org \
    --cc=o-takashi@sakamocchi.jp \
    --cc=tiwai@suse.de \
    /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