lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 18 Mar 2018 16:59:49 +0100 (CET)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Atul Gupta <atul.gupta@...lsio.com>
cc:     davejwatson@...com, davem@...emloft.net,
        herbert@...dor.apana.org.au, sd@...asysnail.net,
        sbrivio@...hat.com, linux-crypto@...r.kernel.org,
        netdev@...r.kernel.org, ganeshgr@...lsio.com, kbuild-all@...org
Subject: Re: [PATCH v11 crypto 12/12] crypto: chtls - Makefile Kconfig
 (fwd)

Please check the indentation on line 1655.

thanks,
julia

---------- Forwarded message ----------
Date: Sun, 18 Mar 2018 18:15:36 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: kbuild@...org
Cc: Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH v11 crypto 12/12] crypto: chtls - Makefile Kconfig

CC: kbuild-all@...org
In-Reply-To: <1521214661-28928-12-git-send-email-atul.gupta@...lsio.com>
References: <1521214661-28928-12-git-send-email-atul.gupta@...lsio.com>
TO: Atul Gupta <atul.gupta@...lsio.com>
CC: davejwatson@...com, davem@...emloft.net, herbert@...dor.apana.org.au
CC: sd@...asysnail.net, sbrivio@...hat.com, linux-crypto@...r.kernel.org, netdev@...r.kernel.org, ganeshgr@...lsio.com

Hi Atul,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.16-rc4]
[cannot apply to next-20180316]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Atul-Gupta/tls-support-for-Inline-tls-record/20180318-162840
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

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

   drivers/crypto/chelsio/chtls/chtls_io.c: In function 'chtls_expansion_size':
>> drivers/crypto/chelsio/chtls/chtls_io.c:457:2: error: expected ',' or ';' before 'int'
     int expnsize, frcn, fraglast, fragsize;
     ^~~
>> drivers/crypto/chelsio/chtls/chtls_io.c:461:3: error: 'fragsize' undeclared (first use in this function); did you mean 'ivs_size'?
      fragsize = hws->mfs;
      ^~~~~~~~
      ivs_size
   drivers/crypto/chelsio/chtls/chtls_io.c:461:3: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/crypto/chelsio/chtls/chtls_io.c:465:4: error: 'frcnt' undeclared (first use in this function); did you mean 'pducnt'?
       frcnt = (data_len / fragsize);
       ^~~~~
       pducnt
>> drivers/crypto/chelsio/chtls/chtls_io.c:468:4: error: 'expnsize' undeclared (first use in this function); did you mean 'fragsize'?
       expnsize =  frcnt * expppdu;
       ^~~~~~~~
       fragsize
>> drivers/crypto/chelsio/chtls/chtls_io.c:480:4: error: 'fraglast' undeclared (first use in this function); did you mean 'rb_last'?
       fraglast = data_len % fragsize;
       ^~~~~~~~
       rb_last
   drivers/crypto/chelsio/chtls/chtls_io.c: In function 'peekmsg':
>> drivers/crypto/chelsio/chtls/chtls_io.c:1653:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
        if (!copied)
        ^~
   drivers/crypto/chelsio/chtls/chtls_io.c:1655:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
         break;
         ^~~~~
   drivers/crypto/chelsio/chtls/chtls_io.c: In function 'chtls_expansion_size':
>> drivers/crypto/chelsio/chtls/chtls_io.c:492:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

coccinelle warnings: (new ones prefixed by >>)

>> drivers/crypto/chelsio/chtls/chtls_io.c:1654:5-22: code aligned with following code on line 1655

# https://github.com/0day-ci/linux/commit/635907fe348f84b525d7ce16ae8f2a9b82c631e3
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 635907fe348f84b525d7ce16ae8f2a9b82c631e3
vim +1654 drivers/crypto/chelsio/chtls/chtls_io.c

8ae18d74 Atul Gupta 2018-03-16  1542
8ae18d74 Atul Gupta 2018-03-16  1543  /*
8ae18d74 Atul Gupta 2018-03-16  1544   * Peek at data in a socket's receive buffer.
8ae18d74 Atul Gupta 2018-03-16  1545   */
8ae18d74 Atul Gupta 2018-03-16  1546  static int peekmsg(struct sock *sk, struct msghdr *msg,
8ae18d74 Atul Gupta 2018-03-16  1547  		   size_t len, int nonblock, int flags)
8ae18d74 Atul Gupta 2018-03-16  1548  {
8ae18d74 Atul Gupta 2018-03-16  1549  	struct tcp_sock *tp = tcp_sk(sk);
8ae18d74 Atul Gupta 2018-03-16  1550  	struct sk_buff *skb;
8ae18d74 Atul Gupta 2018-03-16  1551  	u32 peek_seq, offset;
8ae18d74 Atul Gupta 2018-03-16  1552  	int copied = 0;
8ae18d74 Atul Gupta 2018-03-16  1553  	size_t avail;          /* amount of available data in current skb */
8ae18d74 Atul Gupta 2018-03-16  1554  	long timeo;
8ae18d74 Atul Gupta 2018-03-16  1555
8ae18d74 Atul Gupta 2018-03-16  1556  	lock_sock(sk);
8ae18d74 Atul Gupta 2018-03-16  1557  	timeo = sock_rcvtimeo(sk, nonblock);
8ae18d74 Atul Gupta 2018-03-16  1558  	peek_seq = tp->copied_seq;
8ae18d74 Atul Gupta 2018-03-16  1559
8ae18d74 Atul Gupta 2018-03-16  1560  	do {
8ae18d74 Atul Gupta 2018-03-16  1561  		if (unlikely(tp->urg_data && tp->urg_seq == peek_seq)) {
8ae18d74 Atul Gupta 2018-03-16  1562  			if (copied)
8ae18d74 Atul Gupta 2018-03-16  1563  				break;
8ae18d74 Atul Gupta 2018-03-16  1564  			if (signal_pending(current)) {
8ae18d74 Atul Gupta 2018-03-16  1565  				copied = timeo ? sock_intr_errno(timeo) :
8ae18d74 Atul Gupta 2018-03-16  1566  				-EAGAIN;
8ae18d74 Atul Gupta 2018-03-16  1567  				break;
8ae18d74 Atul Gupta 2018-03-16  1568  			}
8ae18d74 Atul Gupta 2018-03-16  1569  		}
8ae18d74 Atul Gupta 2018-03-16  1570
8ae18d74 Atul Gupta 2018-03-16  1571  		skb_queue_walk(&sk->sk_receive_queue, skb) {
8ae18d74 Atul Gupta 2018-03-16  1572  			offset = peek_seq - ULP_SKB_CB(skb)->seq;
8ae18d74 Atul Gupta 2018-03-16  1573  			if (offset < skb->len)
8ae18d74 Atul Gupta 2018-03-16  1574  				goto found_ok_skb;
8ae18d74 Atul Gupta 2018-03-16  1575  		}
8ae18d74 Atul Gupta 2018-03-16  1576
8ae18d74 Atul Gupta 2018-03-16  1577  		/* empty receive queue */
8ae18d74 Atul Gupta 2018-03-16  1578  		if (copied)
8ae18d74 Atul Gupta 2018-03-16  1579  			break;
8ae18d74 Atul Gupta 2018-03-16  1580  		if (sock_flag(sk, SOCK_DONE))
8ae18d74 Atul Gupta 2018-03-16  1581  			break;
8ae18d74 Atul Gupta 2018-03-16  1582  		if (sk->sk_err) {
8ae18d74 Atul Gupta 2018-03-16  1583  			copied = sock_error(sk);
8ae18d74 Atul Gupta 2018-03-16  1584  			break;
8ae18d74 Atul Gupta 2018-03-16  1585  		}
8ae18d74 Atul Gupta 2018-03-16  1586  		if (sk_no_receive(sk))
8ae18d74 Atul Gupta 2018-03-16  1587  			break;
8ae18d74 Atul Gupta 2018-03-16  1588  		if (sk->sk_state == TCP_CLOSE) {
8ae18d74 Atul Gupta 2018-03-16  1589  			copied = -ENOTCONN;
8ae18d74 Atul Gupta 2018-03-16  1590  			break;
8ae18d74 Atul Gupta 2018-03-16  1591  		}
8ae18d74 Atul Gupta 2018-03-16  1592  		if (!timeo) {
8ae18d74 Atul Gupta 2018-03-16  1593  			copied = -EAGAIN;
8ae18d74 Atul Gupta 2018-03-16  1594  			break;
8ae18d74 Atul Gupta 2018-03-16  1595  		}
8ae18d74 Atul Gupta 2018-03-16  1596  		if (signal_pending(current)) {
8ae18d74 Atul Gupta 2018-03-16  1597  			copied = sock_intr_errno(timeo);
8ae18d74 Atul Gupta 2018-03-16  1598  			break;
8ae18d74 Atul Gupta 2018-03-16  1599  		}
8ae18d74 Atul Gupta 2018-03-16  1600
8ae18d74 Atul Gupta 2018-03-16  1601  		if (sk->sk_backlog.tail) {
8ae18d74 Atul Gupta 2018-03-16  1602  			/* Do not sleep, just process backlog. */
8ae18d74 Atul Gupta 2018-03-16  1603  			release_sock(sk);
8ae18d74 Atul Gupta 2018-03-16  1604  			lock_sock(sk);
8ae18d74 Atul Gupta 2018-03-16  1605  		} else {
8ae18d74 Atul Gupta 2018-03-16  1606  			sk_wait_data(sk, &timeo, NULL);
8ae18d74 Atul Gupta 2018-03-16  1607  		}
8ae18d74 Atul Gupta 2018-03-16  1608
8ae18d74 Atul Gupta 2018-03-16  1609  		if (unlikely(peek_seq != tp->copied_seq)) {
8ae18d74 Atul Gupta 2018-03-16  1610  			if (net_ratelimit())
8ae18d74 Atul Gupta 2018-03-16  1611  				pr_info("TCP(%s:%d), race in MSG_PEEK.\n",
8ae18d74 Atul Gupta 2018-03-16  1612  					current->comm, current->pid);
8ae18d74 Atul Gupta 2018-03-16  1613  			peek_seq = tp->copied_seq;
8ae18d74 Atul Gupta 2018-03-16  1614  		}
8ae18d74 Atul Gupta 2018-03-16  1615  		continue;
8ae18d74 Atul Gupta 2018-03-16  1616
8ae18d74 Atul Gupta 2018-03-16  1617  found_ok_skb:
8ae18d74 Atul Gupta 2018-03-16  1618  		avail = skb->len - offset;
8ae18d74 Atul Gupta 2018-03-16  1619  		if (len < avail)
8ae18d74 Atul Gupta 2018-03-16  1620  			avail = len;
8ae18d74 Atul Gupta 2018-03-16  1621  		/*
8ae18d74 Atul Gupta 2018-03-16  1622  		 * Do we have urgent data here?  We need to skip over the
8ae18d74 Atul Gupta 2018-03-16  1623  		 * urgent byte.
8ae18d74 Atul Gupta 2018-03-16  1624  		 */
8ae18d74 Atul Gupta 2018-03-16  1625  		if (unlikely(tp->urg_data)) {
8ae18d74 Atul Gupta 2018-03-16  1626  			u32 urg_offset = tp->urg_seq - peek_seq;
8ae18d74 Atul Gupta 2018-03-16  1627
8ae18d74 Atul Gupta 2018-03-16  1628  			if (urg_offset < avail) {
8ae18d74 Atul Gupta 2018-03-16  1629  				/*
8ae18d74 Atul Gupta 2018-03-16  1630  				 * The amount of data we are preparing to copy
8ae18d74 Atul Gupta 2018-03-16  1631  				 * contains urgent data.
8ae18d74 Atul Gupta 2018-03-16  1632  				 */
8ae18d74 Atul Gupta 2018-03-16  1633  				if (!urg_offset) { /* First byte is urgent */
8ae18d74 Atul Gupta 2018-03-16  1634  					if (!sock_flag(sk, SOCK_URGINLINE)) {
8ae18d74 Atul Gupta 2018-03-16  1635  						peek_seq++;
8ae18d74 Atul Gupta 2018-03-16  1636  						offset++;
8ae18d74 Atul Gupta 2018-03-16  1637  						avail--;
8ae18d74 Atul Gupta 2018-03-16  1638  					}
8ae18d74 Atul Gupta 2018-03-16  1639  					if (!avail)
8ae18d74 Atul Gupta 2018-03-16  1640  						continue;
8ae18d74 Atul Gupta 2018-03-16  1641  				} else {
8ae18d74 Atul Gupta 2018-03-16  1642  					/* stop short of the urgent data */
8ae18d74 Atul Gupta 2018-03-16  1643  					avail = urg_offset;
8ae18d74 Atul Gupta 2018-03-16  1644  				}
8ae18d74 Atul Gupta 2018-03-16  1645  			}
8ae18d74 Atul Gupta 2018-03-16  1646  		}
8ae18d74 Atul Gupta 2018-03-16  1647
8ae18d74 Atul Gupta 2018-03-16  1648  		/*
8ae18d74 Atul Gupta 2018-03-16  1649  		 * If MSG_TRUNC is specified the data is discarded.
8ae18d74 Atul Gupta 2018-03-16  1650  		 */
8ae18d74 Atul Gupta 2018-03-16  1651  		if (likely(!(flags & MSG_TRUNC)))
8ae18d74 Atul Gupta 2018-03-16  1652  			if (skb_copy_datagram_msg(skb, offset, msg, len)) {
8ae18d74 Atul Gupta 2018-03-16 @1653  				if (!copied)
8ae18d74 Atul Gupta 2018-03-16 @1654  					copied = -EFAULT;
8ae18d74 Atul Gupta 2018-03-16 @1655  					break;
8ae18d74 Atul Gupta 2018-03-16  1656  			}
8ae18d74 Atul Gupta 2018-03-16  1657  		peek_seq += avail;
8ae18d74 Atul Gupta 2018-03-16  1658  		copied += avail;
8ae18d74 Atul Gupta 2018-03-16  1659  		len -= avail;
8ae18d74 Atul Gupta 2018-03-16  1660  	} while (len > 0);
8ae18d74 Atul Gupta 2018-03-16  1661
8ae18d74 Atul Gupta 2018-03-16  1662  	release_sock(sk);
8ae18d74 Atul Gupta 2018-03-16  1663  	return copied;
8ae18d74 Atul Gupta 2018-03-16  1664  }
8ae18d74 Atul Gupta 2018-03-16  1665

:::::: The code at line 1654 was first introduced by commit
:::::: 8ae18d74c01914f49f175dd5375457e6e47d5a0d crypto: chtls - Inline TLS record Rx

:::::: TO: Atul Gupta <atul.gupta@...lsio.com>
:::::: CC: 0day robot <fengguang.wu@...el.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (63078 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ