All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alain Michaud <alainm@chromium.org>, linux-bluetooth@vger.kernel.org
Cc: kbuild-all@lists.01.org, Alain Michaud <alainm@chromium.org>
Subject: Re: [PATCH v5] sco:Add support for BT_PKT_STATUS CMSG data
Date: Thu, 11 Jun 2020 23:58:56 +0800	[thread overview]
Message-ID: <202006112335.YkAz9aba%lkp@intel.com> (raw)
In-Reply-To: <20200611132805.139622-1-alainm@chromium.org>

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

Hi Alain,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on next-20200611]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Alain-Michaud/sco-Add-support-for-BT_PKT_STATUS-CMSG-data/20200611-212907
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

net/bluetooth/sco.c: In function 'sco_skb_put_cmsg':
net/bluetooth/sco.c:456:36: error: passing argument 2 of 'test_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
456 |  if (test_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask))
|                                    ^~~~~~~~~~~~~~~~~~~~~~
|                                    |
|                                    __u8 * {aka unsigned char *}
In file included from arch/arm/include/asm/bitops.h:123,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from net/bluetooth/sco.c:27:
include/asm-generic/bitops/non-atomic.h:104:66: note: expected 'const volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
104 | static inline int test_bit(int nr, const volatile unsigned long *addr)
|                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from net/bluetooth/sco.c:27:
net/bluetooth/sco.c: In function 'sco_sock_setsockopt':
>> net/bluetooth/sco.c:868:33: error: passing argument 2 of '_set_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
868 |    set_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
|                                 ^~~~~~~~~~~~~~~~~~~~~~
|                                 |
|                                 __u8 * {aka unsigned char *}
arch/arm/include/asm/bitops.h:183:45: note: in definition of macro 'ATOMIC_BITOP'
183 | #define ATOMIC_BITOP(name,nr,p)  _##name(nr,p)
|                                             ^
>> net/bluetooth/sco.c:868:4: note: in expansion of macro 'set_bit'
868 |    set_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
|    ^~~~~~~
arch/arm/include/asm/bitops.h:153:55: note: expected 'volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
153 | extern void _set_bit(int nr, volatile unsigned long * p);
|                              ~~~~~~~~~~~~~~~~~~~~~~~~~^
>> net/bluetooth/sco.c:870:35: error: passing argument 2 of '_clear_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
870 |    clear_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
|                                   ^~~~~~~~~~~~~~~~~~~~~~
|                                   |
|                                   __u8 * {aka unsigned char *}
arch/arm/include/asm/bitops.h:183:45: note: in definition of macro 'ATOMIC_BITOP'
183 | #define ATOMIC_BITOP(name,nr,p)  _##name(nr,p)
|                                             ^
>> net/bluetooth/sco.c:870:4: note: in expansion of macro 'clear_bit'
870 |    clear_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
|    ^~~~~~~~~
arch/arm/include/asm/bitops.h:154:57: note: expected 'volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
154 | extern void _clear_bit(int nr, volatile unsigned long * p);
|                                ~~~~~~~~~~~~~~~~~~~~~~~~~^
net/bluetooth/sco.c: In function 'sco_sock_getsockopt':
net/bluetooth/sco.c:999:11: error: passing argument 2 of 'test_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
999 |           &(sco_pi(sk)->cmsg_mask));
|           ^~~~~~~~~~~~~~~~~~~~~~~~
|           |
|           __u8 * {aka unsigned char *}
In file included from arch/arm/include/asm/bitops.h:123,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from net/bluetooth/sco.c:27:
include/asm-generic/bitops/non-atomic.h:104:66: note: expected 'const volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
104 | static inline int test_bit(int nr, const volatile unsigned long *addr)
|                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors

vim +/_set_bit +868 net/bluetooth/sco.c

   804	
   805	static int sco_sock_setsockopt(struct socket *sock, int level, int optname,
   806				       char __user *optval, unsigned int optlen)
   807	{
   808		struct sock *sk = sock->sk;
   809		int len, err = 0;
   810		struct bt_voice voice;
   811		u32 opt;
   812	
   813		BT_DBG("sk %p", sk);
   814	
   815		lock_sock(sk);
   816	
   817		switch (optname) {
   818	
   819		case BT_DEFER_SETUP:
   820			if (sk->sk_state != BT_BOUND && sk->sk_state != BT_LISTEN) {
   821				err = -EINVAL;
   822				break;
   823			}
   824	
   825			if (get_user(opt, (u32 __user *) optval)) {
   826				err = -EFAULT;
   827				break;
   828			}
   829	
   830			if (opt)
   831				set_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
   832			else
   833				clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
   834			break;
   835	
   836		case BT_VOICE:
   837			if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND &&
   838			    sk->sk_state != BT_CONNECT2) {
   839				err = -EINVAL;
   840				break;
   841			}
   842	
   843			voice.setting = sco_pi(sk)->setting;
   844	
   845			len = min_t(unsigned int, sizeof(voice), optlen);
   846			if (copy_from_user((char *)&voice, optval, len)) {
   847				err = -EFAULT;
   848				break;
   849			}
   850	
   851			/* Explicitly check for these values */
   852			if (voice.setting != BT_VOICE_TRANSPARENT &&
   853			    voice.setting != BT_VOICE_CVSD_16BIT) {
   854				err = -EINVAL;
   855				break;
   856			}
   857	
   858			sco_pi(sk)->setting = voice.setting;
   859			break;
   860	
   861		case BT_PKT_STATUS:
   862			if (get_user(opt, (u32 __user *)optval)) {
   863				err = -EFAULT;
   864				break;
   865			}
   866	
   867			if (opt)
 > 868				set_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
   869			else
 > 870				clear_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
   871			break;
   872	
   873		default:
   874			err = -ENOPROTOOPT;
   875			break;
   876		}
   877	
   878		release_sock(sk);
   879		return err;
   880	}
   881	

---
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: 51875 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v5] sco:Add support for BT_PKT_STATUS CMSG data
Date: Thu, 11 Jun 2020 23:58:56 +0800	[thread overview]
Message-ID: <202006112335.YkAz9aba%lkp@intel.com> (raw)
In-Reply-To: <20200611132805.139622-1-alainm@chromium.org>

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

Hi Alain,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on next-20200611]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Alain-Michaud/sco-Add-support-for-BT_PKT_STATUS-CMSG-data/20200611-212907
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

net/bluetooth/sco.c: In function 'sco_skb_put_cmsg':
net/bluetooth/sco.c:456:36: error: passing argument 2 of 'test_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
456 |  if (test_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask))
|                                    ^~~~~~~~~~~~~~~~~~~~~~
|                                    |
|                                    __u8 * {aka unsigned char *}
In file included from arch/arm/include/asm/bitops.h:123,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from net/bluetooth/sco.c:27:
include/asm-generic/bitops/non-atomic.h:104:66: note: expected 'const volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
104 | static inline int test_bit(int nr, const volatile unsigned long *addr)
|                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from net/bluetooth/sco.c:27:
net/bluetooth/sco.c: In function 'sco_sock_setsockopt':
>> net/bluetooth/sco.c:868:33: error: passing argument 2 of '_set_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
868 |    set_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
|                                 ^~~~~~~~~~~~~~~~~~~~~~
|                                 |
|                                 __u8 * {aka unsigned char *}
arch/arm/include/asm/bitops.h:183:45: note: in definition of macro 'ATOMIC_BITOP'
183 | #define ATOMIC_BITOP(name,nr,p)  _##name(nr,p)
|                                             ^
>> net/bluetooth/sco.c:868:4: note: in expansion of macro 'set_bit'
868 |    set_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
|    ^~~~~~~
arch/arm/include/asm/bitops.h:153:55: note: expected 'volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
153 | extern void _set_bit(int nr, volatile unsigned long * p);
|                              ~~~~~~~~~~~~~~~~~~~~~~~~~^
>> net/bluetooth/sco.c:870:35: error: passing argument 2 of '_clear_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
870 |    clear_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
|                                   ^~~~~~~~~~~~~~~~~~~~~~
|                                   |
|                                   __u8 * {aka unsigned char *}
arch/arm/include/asm/bitops.h:183:45: note: in definition of macro 'ATOMIC_BITOP'
183 | #define ATOMIC_BITOP(name,nr,p)  _##name(nr,p)
|                                             ^
>> net/bluetooth/sco.c:870:4: note: in expansion of macro 'clear_bit'
870 |    clear_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
|    ^~~~~~~~~
arch/arm/include/asm/bitops.h:154:57: note: expected 'volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
154 | extern void _clear_bit(int nr, volatile unsigned long * p);
|                                ~~~~~~~~~~~~~~~~~~~~~~~~~^
net/bluetooth/sco.c: In function 'sco_sock_getsockopt':
net/bluetooth/sco.c:999:11: error: passing argument 2 of 'test_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
999 |           &(sco_pi(sk)->cmsg_mask));
|           ^~~~~~~~~~~~~~~~~~~~~~~~
|           |
|           __u8 * {aka unsigned char *}
In file included from arch/arm/include/asm/bitops.h:123,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from net/bluetooth/sco.c:27:
include/asm-generic/bitops/non-atomic.h:104:66: note: expected 'const volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
104 | static inline int test_bit(int nr, const volatile unsigned long *addr)
|                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors

vim +/_set_bit +868 net/bluetooth/sco.c

   804	
   805	static int sco_sock_setsockopt(struct socket *sock, int level, int optname,
   806				       char __user *optval, unsigned int optlen)
   807	{
   808		struct sock *sk = sock->sk;
   809		int len, err = 0;
   810		struct bt_voice voice;
   811		u32 opt;
   812	
   813		BT_DBG("sk %p", sk);
   814	
   815		lock_sock(sk);
   816	
   817		switch (optname) {
   818	
   819		case BT_DEFER_SETUP:
   820			if (sk->sk_state != BT_BOUND && sk->sk_state != BT_LISTEN) {
   821				err = -EINVAL;
   822				break;
   823			}
   824	
   825			if (get_user(opt, (u32 __user *) optval)) {
   826				err = -EFAULT;
   827				break;
   828			}
   829	
   830			if (opt)
   831				set_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
   832			else
   833				clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
   834			break;
   835	
   836		case BT_VOICE:
   837			if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND &&
   838			    sk->sk_state != BT_CONNECT2) {
   839				err = -EINVAL;
   840				break;
   841			}
   842	
   843			voice.setting = sco_pi(sk)->setting;
   844	
   845			len = min_t(unsigned int, sizeof(voice), optlen);
   846			if (copy_from_user((char *)&voice, optval, len)) {
   847				err = -EFAULT;
   848				break;
   849			}
   850	
   851			/* Explicitly check for these values */
   852			if (voice.setting != BT_VOICE_TRANSPARENT &&
   853			    voice.setting != BT_VOICE_CVSD_16BIT) {
   854				err = -EINVAL;
   855				break;
   856			}
   857	
   858			sco_pi(sk)->setting = voice.setting;
   859			break;
   860	
   861		case BT_PKT_STATUS:
   862			if (get_user(opt, (u32 __user *)optval)) {
   863				err = -EFAULT;
   864				break;
   865			}
   866	
   867			if (opt)
 > 868				set_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
   869			else
 > 870				clear_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
   871			break;
   872	
   873		default:
   874			err = -ENOPROTOOPT;
   875			break;
   876		}
   877	
   878		release_sock(sk);
   879		return err;
   880	}
   881	

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

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

  parent reply	other threads:[~2020-06-11 16:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 13:28 [PATCH v5] sco:Add support for BT_PKT_STATUS CMSG data Alain Michaud
2020-06-11 15:20 ` kernel test robot
2020-06-11 15:20   ` kernel test robot
2020-06-11 15:58 ` kernel test robot [this message]
2020-06-11 15:58   ` 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=202006112335.YkAz9aba%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alainm@chromium.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /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.