From: kernel test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Christophe Leroy <christophe.leroy@csgroup.eu>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-sound@vger.kernel.org,
Herve Codina <herve.codina@bootlin.com>,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] ALSA: pcm: Convert multiple {get/put}_user to user_access_begin/user_access_end()
Date: Sat, 7 Jun 2025 21:57:31 +0800 [thread overview]
Message-ID: <202506072119.6uaFEBw1-lkp@intel.com> (raw)
In-Reply-To: <bf9288392b1d4b9e92fe29212d9cb933c5b3fbae.1749296015.git.christophe.leroy@csgroup.eu>
Hi Christophe,
kernel test robot noticed the following build errors:
[auto build test ERROR on tiwai-sound/for-next]
[also build test ERROR on tiwai-sound/for-linus linus/master v6.15 next-20250606]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Christophe-Leroy/ALSA-pcm-Convert-multiple-get-put-_user-to-user_access_begin-user_access_end/20250607-195119
base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
patch link: https://lore.kernel.org/r/bf9288392b1d4b9e92fe29212d9cb933c5b3fbae.1749296015.git.christophe.leroy%40csgroup.eu
patch subject: [PATCH] ALSA: pcm: Convert multiple {get/put}_user to user_access_begin/user_access_end()
config: x86_64-buildonly-randconfig-003-20250607 (https://download.01.org/0day-ci/archive/20250607/202506072119.6uaFEBw1-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250607/202506072119.6uaFEBw1-lkp@intel.com/reproduce)
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/202506072119.6uaFEBw1-lkp@intel.com/
All errors (new ones prefixed by >>):
>> sound/core/pcm_native.c:3068:2: error: call to undeclared function 'unsafe_copy_from_user'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
3068 | unsafe_copy_from_user(&sync_ptr.c.control, &(_sync_ptr->c.control),
| ^
>> sound/core/pcm_native.c:3069:47: error: use of undeclared identifier 'Efault'
3069 | sizeof(struct snd_pcm_mmap_control), Efault);
| ^
2 errors generated.
vim +/unsafe_copy_from_user +3068 sound/core/pcm_native.c
3053
3054 static int snd_pcm_sync_ptr(struct snd_pcm_substream *substream,
3055 struct snd_pcm_sync_ptr __user *_sync_ptr)
3056 {
3057 struct snd_pcm_runtime *runtime = substream->runtime;
3058 struct snd_pcm_sync_ptr sync_ptr;
3059 volatile struct snd_pcm_mmap_status *status;
3060 volatile struct snd_pcm_mmap_control *control;
3061 int err;
3062
3063 memset(&sync_ptr, 0, sizeof(sync_ptr));
3064
3065 if (!user_read_access_begin(_sync_ptr, sizeof(*_sync_ptr)))
3066 return -EFAULT;
3067 unsafe_get_user(sync_ptr.flags, (unsigned __user *)&(_sync_ptr->flags), Efault);
> 3068 unsafe_copy_from_user(&sync_ptr.c.control, &(_sync_ptr->c.control),
> 3069 sizeof(struct snd_pcm_mmap_control), Efault);
3070 user_read_access_end();
3071
3072 status = runtime->status;
3073 control = runtime->control;
3074 if (sync_ptr.flags & SNDRV_PCM_SYNC_PTR_HWSYNC) {
3075 err = snd_pcm_hwsync(substream);
3076 if (err < 0)
3077 return err;
3078 }
3079 scoped_guard(pcm_stream_lock_irq, substream) {
3080 if (!(sync_ptr.flags & SNDRV_PCM_SYNC_PTR_APPL)) {
3081 err = pcm_lib_apply_appl_ptr(substream,
3082 sync_ptr.c.control.appl_ptr);
3083 if (err < 0)
3084 return err;
3085 } else {
3086 sync_ptr.c.control.appl_ptr = control->appl_ptr;
3087 }
3088 if (!(sync_ptr.flags & SNDRV_PCM_SYNC_PTR_AVAIL_MIN))
3089 control->avail_min = sync_ptr.c.control.avail_min;
3090 else
3091 sync_ptr.c.control.avail_min = control->avail_min;
3092 sync_ptr.s.status.state = status->state;
3093 sync_ptr.s.status.hw_ptr = status->hw_ptr;
3094 sync_ptr.s.status.tstamp = status->tstamp;
3095 sync_ptr.s.status.suspended_state = status->suspended_state;
3096 sync_ptr.s.status.audio_tstamp = status->audio_tstamp;
3097 }
3098 if (!(sync_ptr.flags & SNDRV_PCM_SYNC_PTR_APPL))
3099 snd_pcm_dma_buffer_sync(substream, SNDRV_DMA_SYNC_DEVICE);
3100 if (copy_to_user(_sync_ptr, &sync_ptr, sizeof(sync_ptr)))
3101 return -EFAULT;
3102 return 0;
3103
3104 Efault:
3105 user_read_access_end();
3106
3107 return -EFAULT;
3108 }
3109
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-06-07 13:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-07 11:37 [PATCH] ALSA: pcm: Convert multiple {get/put}_user to user_access_begin/user_access_end() Christophe Leroy
2025-06-07 13:57 ` kernel test robot [this message]
2025-06-10 19:53 ` David Laight
2025-06-11 13:48 ` Christophe Leroy
2025-06-11 21:37 ` David Laight
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=202506072119.6uaFEBw1-lkp@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=herve.codina@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/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.