All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yangbo Lu <yangbo.lu@nxp.com>, netdev@vger.kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Yangbo Lu <yangbo.lu@nxp.com>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	mptcp@lists.linux.dev, Richard Cochran <richardcochran@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Mat Martineau <mathew.j.martineau@linux.intel.com>,
	Matthieu Baerts <matthieu.baerts@tessares.net>
Subject: Re: [net-next, v4, 08/11] net: sock: extend SO_TIMESTAMPING for PHC binding
Date: Fri, 25 Jun 2021 22:19:44 +0800	[thread overview]
Message-ID: <202106252233.cI4loz8T-lkp@intel.com> (raw)
In-Reply-To: <20210625093513.38524-9-yangbo.lu@nxp.com>

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

Hi Yangbo,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 19938bafa7ae8fc0a4a2c1c1430abb1a04668da1]

url:    https://github.com/0day-ci/linux/commits/Yangbo-Lu/ptp-support-virtual-clocks-and-timestamping/20210625-172554
base:   19938bafa7ae8fc0a4a2c1c1430abb1a04668da1
config: x86_64-randconfig-r013-20210625 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9ca0171a9ffdef5fdb1511d197a3fd72490362de)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/e6720a23e3833ed72016804e74875c63c8f2c414
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Yangbo-Lu/ptp-support-virtual-clocks-and-timestamping/20210625-172554
        git checkout e6720a23e3833ed72016804e74875c63c8f2c414
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   net/mptcp/sockopt.c:218:45: error: indirection requires pointer operand ('int' invalid)
                   if (copy_from_sockptr(val, optval, sizeof(*val)))
                                                             ^~~~
>> net/mptcp/sockopt.c:218:25: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'void *' [-Wint-conversion]
                   if (copy_from_sockptr(val, optval, sizeof(*val)))
                                         ^~~
   include/linux/sockptr.h:53:43: note: passing argument to parameter 'dst' here
   static inline int copy_from_sockptr(void *dst, sockptr_t src, size_t size)
                                             ^
   1 warning and 1 error generated.


vim +218 net/mptcp/sockopt.c

   202	
   203	static int mptcp_setsockopt_sol_socket_timestamping(struct mptcp_sock *msk,
   204							    int optname,
   205							    sockptr_t optval,
   206							    unsigned int optlen)
   207	{
   208		struct mptcp_subflow_context *subflow;
   209		struct sock *sk = (struct sock *)msk;
   210		struct so_timestamping timestamping;
   211		int val, ret;
   212	
   213		if (optlen == sizeof(timestamping)) {
   214			if (copy_from_sockptr(&timestamping, optval,
   215					      sizeof(timestamping)))
   216				return -EFAULT;
   217		} else if (optlen == sizeof(int)) {
 > 218			if (copy_from_sockptr(val, optval, sizeof(*val)))
   219				return -EFAULT;
   220	
   221			memset(&timestamping, 0, sizeof(timestamping));
   222			timestamping.flags = val;
   223		} else {
   224			return -EINVAL;
   225		}
   226	
   227		ret = sock_setsockopt(sk->sk_socket, SOL_SOCKET, optname,
   228				      KERNEL_SOCKPTR(&timestamping),
   229				      sizeof(timestamping));
   230		if (ret)
   231			return ret;
   232	
   233		lock_sock(sk);
   234	
   235		mptcp_for_each_subflow(msk, subflow) {
   236			struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
   237			bool slow = lock_sock_fast(ssk);
   238	
   239			sock_set_timestamping(sk, optname, timestamping);
   240			unlock_sock_fast(ssk, slow);
   241		}
   242	
   243		release_sock(sk);
   244	
   245		return 0;
   246	}
   247	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [net-next, v4, 08/11] net: sock: extend SO_TIMESTAMPING for PHC binding
Date: Fri, 25 Jun 2021 22:19:44 +0800	[thread overview]
Message-ID: <202106252233.cI4loz8T-lkp@intel.com> (raw)
In-Reply-To: <20210625093513.38524-9-yangbo.lu@nxp.com>

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

Hi Yangbo,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 19938bafa7ae8fc0a4a2c1c1430abb1a04668da1]

url:    https://github.com/0day-ci/linux/commits/Yangbo-Lu/ptp-support-virtual-clocks-and-timestamping/20210625-172554
base:   19938bafa7ae8fc0a4a2c1c1430abb1a04668da1
config: x86_64-randconfig-r013-20210625 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9ca0171a9ffdef5fdb1511d197a3fd72490362de)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/e6720a23e3833ed72016804e74875c63c8f2c414
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Yangbo-Lu/ptp-support-virtual-clocks-and-timestamping/20210625-172554
        git checkout e6720a23e3833ed72016804e74875c63c8f2c414
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   net/mptcp/sockopt.c:218:45: error: indirection requires pointer operand ('int' invalid)
                   if (copy_from_sockptr(val, optval, sizeof(*val)))
                                                             ^~~~
>> net/mptcp/sockopt.c:218:25: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'void *' [-Wint-conversion]
                   if (copy_from_sockptr(val, optval, sizeof(*val)))
                                         ^~~
   include/linux/sockptr.h:53:43: note: passing argument to parameter 'dst' here
   static inline int copy_from_sockptr(void *dst, sockptr_t src, size_t size)
                                             ^
   1 warning and 1 error generated.


vim +218 net/mptcp/sockopt.c

   202	
   203	static int mptcp_setsockopt_sol_socket_timestamping(struct mptcp_sock *msk,
   204							    int optname,
   205							    sockptr_t optval,
   206							    unsigned int optlen)
   207	{
   208		struct mptcp_subflow_context *subflow;
   209		struct sock *sk = (struct sock *)msk;
   210		struct so_timestamping timestamping;
   211		int val, ret;
   212	
   213		if (optlen == sizeof(timestamping)) {
   214			if (copy_from_sockptr(&timestamping, optval,
   215					      sizeof(timestamping)))
   216				return -EFAULT;
   217		} else if (optlen == sizeof(int)) {
 > 218			if (copy_from_sockptr(val, optval, sizeof(*val)))
   219				return -EFAULT;
   220	
   221			memset(&timestamping, 0, sizeof(timestamping));
   222			timestamping.flags = val;
   223		} else {
   224			return -EINVAL;
   225		}
   226	
   227		ret = sock_setsockopt(sk->sk_socket, SOL_SOCKET, optname,
   228				      KERNEL_SOCKPTR(&timestamping),
   229				      sizeof(timestamping));
   230		if (ret)
   231			return ret;
   232	
   233		lock_sock(sk);
   234	
   235		mptcp_for_each_subflow(msk, subflow) {
   236			struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
   237			bool slow = lock_sock_fast(ssk);
   238	
   239			sock_set_timestamping(sk, optname, timestamping);
   240			unlock_sock_fast(ssk, slow);
   241		}
   242	
   243		release_sock(sk);
   244	
   245		return 0;
   246	}
   247	

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

  reply	other threads:[~2021-06-25 14:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25  9:35 [net-next, v4, 00/11] ptp: support virtual clocks and timestamping Yangbo Lu
2021-06-25  9:35 ` [net-next, v4, 01/11] ptp: add ptp virtual clock driver framework Yangbo Lu
2021-06-25  9:35 ` [net-next, v4, 02/11] ptp: support ptp physical/virtual clocks conversion Yangbo Lu
2021-06-27  9:50   ` [ptp] d7b8e363d0: BUG:kernel_NULL_pointer_dereference,address kernel test robot
2021-06-27  9:50     ` kernel test robot
2021-06-25  9:35 ` [net-next, v4, 03/11] ptp: track available ptp vclocks information Yangbo Lu
2021-06-25  9:35 ` [net-next, v4, 04/11] ptp: add kernel API ptp_get_vclocks_index() Yangbo Lu
2021-06-25  9:35 ` [net-next, v4, 05/11] ethtool: add a new command for getting PHC virtual clocks Yangbo Lu
2021-08-29 17:04   ` Michal Kubecek
2021-06-25  9:35 ` [net-next, v4, 06/11] ptp: add kernel API ptp_convert_timestamp() Yangbo Lu
2021-06-25  9:35 ` [net-next, v4, 07/11] mptcp: setsockopt: convert to mptcp_setsockopt_sol_socket_timestamping() Yangbo Lu
2021-06-25  9:35 ` [net-next, v4, 08/11] net: sock: extend SO_TIMESTAMPING for PHC binding Yangbo Lu
2021-06-25 14:19   ` kernel test robot [this message]
2021-06-25 14:19     ` kernel test robot
2021-06-26  0:59   ` Mat Martineau
2021-06-30  8:29     ` Y.b. Lu
2021-06-25  9:35 ` [net-next, v4, 09/11] net: socket: support hardware timestamp conversion to PHC bound Yangbo Lu
2021-06-25  9:35 ` [net-next, v4, 10/11] selftests/net: timestamping: support binding PHC Yangbo Lu
2021-06-26  0:26   ` kernel test robot
2021-06-26  0:26     ` kernel test robot
2021-06-25  9:35 ` [net-next, v4, 11/11] MAINTAINERS: add entry for PTP virtual clock driver Yangbo Lu

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=202106252233.cI4loz8T-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=yangbo.lu@nxp.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.