BUG kmalloc-64 (Not tainted): Poison overwritten

2015-08-27 Thread Cong Wang
Hi, Michael

I just got the following kernel bug while working on Dave's net tree
in a KVM guest. It looks like a bug in virtio.

Let me know if you need more information.


[   69.816089] BUG kmalloc-64 (Not tainted): Poison overwritten
[   69.816089] 
-
[   69.816089]
[   69.816089] Disabling lock debugging due to kernel taint
[   69.816089] INFO: 0x8800d480c7c0-0x8800d480c7c0. First byte
0x6a instead of 0x6b
[   69.816089] INFO: Allocated in virtqueue_add+0x6b/0x2a2 age=423 cpu=3 pid=128
[   69.816089]  __slab_alloc+0x44b/0x4d2
[   69.816089]  __kmalloc+0xa3/0x14e
[   69.816089]  virtqueue_add+0x6b/0x2a2
[   69.816089]  virtqueue_add_sgs+0x78/0x87
[   69.816089]  __virtblk_add_req+0x139/0x14b
[   69.816089]  virtio_queue_rq+0x14e/0x1f0
[   69.816089]  __blk_mq_run_hw_queue+0x1ac/0x2b9
[   69.816089]  blk_mq_run_hw_queue+0x59/0xb8
[   69.816089]  blk_mq_insert_requests+0x136/0x1ab
[   69.816089]  blk_mq_flush_plug_list+0xd4/0xe3
[   69.816089]  blk_flush_plug_list+0x9b/0x1b9
[   69.816089]  blk_finish_plug+0x24/0x33
[   69.816089]  generic_writepages+0x4c/0x59
[   69.816089]  do_writepages+0x21/0x2f
[   69.816089]  __writeback_single_inode+0xd6/0x5ca
[   69.816089]  writeback_sb_inodes+0x28c/0x458
[   69.816089] INFO: Freed in detach_buf+0x3d/0x6e age=469 cpu=3 pid=128
[   69.816089]  __slab_free+0x35/0x283
[   69.816089]  kfree+0x153/0x1ac
[   69.816089]  detach_buf+0x3d/0x6e
[   69.816089]  virtqueue_get_buf+0xac/0xdd
[   69.816089]  virtblk_done+0x61/0xcb
[   69.816089]  vring_interrupt+0x2d/0x3c
[   69.816089]  handle_irq_event_percpu+0xbd/0x2c0
[   69.816089]  handle_irq_event+0x4a/0x6e
[   69.816089]  handle_edge_irq+0xc0/0xe3
[   69.816089]  handle_irq+0x11b/0x128
[   69.816089]  do_IRQ+0x4d/0xc1
[   69.816089]  ret_from_intr+0x0/0x1d
[   70.780063]  kmem_cache_free+0xb2/0x248
[   70.780063]  ext4_release_io_end+0x78/0xa9
[   70.780063]  ext4_put_io_end+0x50/0x5f
[   70.780063]  ext4_writepages+0x662/0xb62
[   70.780063] INFO: Slab 0xea0003520300 objects=20 used=20 fp=0x
(null) flags=0x1804080
[   70.780063] INFO: Object 0x8800d480c7a8 @offset=1960
fp=0x8800d480db90
[   70.780063]
[   70.780063] Bytes b4 8800d480c798: 00 00 00 00 00 00 00 00 5a
5a 5a 5a 5a 5a 5a 5a  
[   70.780063] Object 8800d480c7a8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
6b 6b 6b 6b 6b 6b  
[   70.780063] Object 8800d480c7b8: 6b 6b 6b 6b 6b 6b 6b 6b 6a 6b
6b 6b 6b 6b 6b 6b  jkkk
[   70.780063] Object 8800d480c7c8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
6b 6b 6b 6b 6b 6b  
[   70.780063] Object 8800d480c7d8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
6b 6b 6b 6b 6b a5  kkk.
[   70.780063] Redzone 8800d480c7e8: bb bb bb bb bb bb bb bb
   
[   70.780063] Padding 8800d480c928: 5a 5a 5a 5a 5a 5a 5a 5a
   
[   70.780063] CPU: 1 PID: 780 Comm: u32_del.sh Tainted: GB
   4.2.0-rc7+ #1097
[   70.780063] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[   70.780063]  8800d480c7a8 8800d5a47aa8 81a64274

[   70.780063]  88011a007700 8800d5a47ad8 81187587
8800d480c7c0
[   70.780063]  006b 88011a007700 8800d480c7c0
8800d5a47b38
[   70.780063] Call Trace:
[   70.780063]  [81a64274] dump_stack+0x4c/0x65
[   70.780063]  [81187587] print_trailer+0x12b/0x134
[   70.780063]  [81187636] check_bytes_and_report+0xa6/0xf3
[   70.780063]  [811b8111] ? alloc_fdmem+0x2b/0x34
[   70.780063]  [81187b5a] check_object+0x111/0x1ac
[   70.780063]  [811b8111] ? alloc_fdmem+0x2b/0x34
[   70.780063]  [81a5ef08] alloc_debug_processing+0x67/0x109
[   70.780063]  [81a5f3f5] __slab_alloc+0x44b/0x4d2
[   70.780063]  [811b8111] ? alloc_fdmem+0x2b/0x34
[   70.780063]  [810a34aa] ? __might_sleep+0x78/0x80
[   70.780063]  [81189388] __kmalloc+0xa3/0x14e
[   70.780063]  [811b8111] ? alloc_fdmem+0x2b/0x34
[   70.780063]  [811b8111] alloc_fdmem+0x2b/0x34
[   70.780063]  [811b81ab] alloc_fdtable+0x91/0xc2
[   70.780063]  [811b8aca] dup_fd+0x15d/0x2fc
[   70.780063]  [8107866a] copy_process.part.33+0x704/0x1837
[   70.780063]  [810a43b4] ? sched_clock_cpu+0x9e/0xb7
[   70.780063]  [810a44a7] ? local_clock+0x19/0x22
[   70.780063]  [810e41cb] ? current_kernel_time+0xe/0x32
[   70.780063]  [8107994f] _do_fork+0xd3/0x371
[   70.780063]  [810e41cb] ? current_kernel_time+0xe/0x32
[   70.780063]  [81106d79] ? __audit_syscall_entry+0xbf/0xe1
[   70.780063]  [8100e658] ? do_audit_syscall_entry+0x63/0x65
[   70.780063]  [8100f429] ? syscall_trace_enter_phase1+0x11a/0x125
[   70.780063]  [81079c73] SyS_clone+0x19/0x1b
[   70.780063]  [81a703d7] 

A question about vring operation

2015-08-27 Thread Wang, Wei W
Hi all,

I have a question about the vring_avail:
It only includes an idx (equivalent to the ring tail), which is used by the 
frontend (virtio_net) to fill bufs. The backend (e.g. vhost_net) maintains the 
ring head (last_avail_idx) by itself. The frontend checks if the ring is full 
or empty via a counter (vq-num_free).
My question is why can't we include the ring head in the  vring_avail struct, 
so that the vq-num_free is not needed, and the backend can directly use it 
without maintaining its own copy?

Thanks,
Wei

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: BUG kmalloc-64 (Not tainted): Poison overwritten

2015-08-27 Thread Cong Wang
On Tue, Aug 25, 2015 at 2:11 PM, Cong Wang cw...@twopensource.com wrote:
 Hi, Michael

 I just got the following kernel bug while working on Dave's net tree
 in a KVM guest. It looks like a bug in virtio.


Hmm, the stack trace is misleading, it could be caused by my own networking
code even though it doesn't show in dmesg. Anyway I can't reproduce it on the
clean -net tree.

I will let you know if it is really a bug.

Thanks.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PATCH net-next] virtio-net: avoid unnecessary sg initialzation

2015-08-27 Thread David Miller
From: Jason Wang jasow...@redhat.com
Date: Thu, 27 Aug 2015 14:53:06 +0800

 Usually an skb does not have up to MAX_SKB_FRAGS frags. So no need to
 initialize the unuse part of sg. This patch initialize the sg based on
 the real number it will used:
 
 - during xmit, it could be inferred from nr_frags and can_push.
 - for small receive buffer, it will also be 2.
 
 Cc: Michael S. Tsirkin m...@redhat.com
 Signed-off-by: Jason Wang jasow...@redhat.com

This looks fine, thanks Jason.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PATCH net-next] virtio-net: avoid unnecessary sg initialzation

2015-08-27 Thread Jason Wang
Usually an skb does not have up to MAX_SKB_FRAGS frags. So no need to
initialize the unuse part of sg. This patch initialize the sg based on
the real number it will used:

- during xmit, it could be inferred from nr_frags and can_push.
- for small receive buffer, it will also be 2.

Cc: Michael S. Tsirkin m...@redhat.com
Signed-off-by: Jason Wang jasow...@redhat.com
---
 drivers/net/virtio_net.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 53f5660..c006ae4 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -540,7 +540,7 @@ static int add_recvbuf_small(struct virtnet_info *vi, 
struct receive_queue *rq,
skb_put(skb, GOOD_PACKET_LEN);
 
hdr = skb_vnet_hdr(skb);
-   sg_init_table(rq-sg, MAX_SKB_FRAGS + 2);
+   sg_init_table(rq-sg, 2);
sg_set_buf(rq-sg, hdr, vi-hdr_len);
skb_to_sgvec(skb, rq-sg + 1, 0, skb-len);
 
@@ -893,7 +893,7 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff 
*skb)
if (vi-mergeable_rx_bufs)
hdr-num_buffers = 0;
 
-   sg_init_table(sq-sg, MAX_SKB_FRAGS + 2);
+   sg_init_table(sq-sg, skb_shinfo(skb)-nr_frags + (can_push ? 1 : 2));
if (can_push) {
__skb_push(skb, hdr_len);
num_sg = skb_to_sgvec(skb, sq-sg, 0, skb-len);
-- 
2.1.4

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Call for Papers - WorldCIST'15: 4td World Conference on Information Systems and Technologies

2015-08-27 Thread Maria Lemos

WorldCIST'16 - 4th World Conference on Information Systems and Technologies 
Recife, PE, Brazil
22th-24th of March 2016
http://www.aisti.eu/worldcist16/
---


SCOPE

The WorldCist'16 - 4th World Conference on Information Systems and 
Technologies, to be held at Recife, PE, Brazil, 22 - 24 March 2016, is a global 
forum for researchers and practitioners to present and discuss the most recent 
innovations, trends, results, experiences and concerns in the several 
perspectives of Information Systems and Technologies.

We are pleased to invite you to submit your papers to WorldCist'16. All 
submissions will be reviewed on the basis of relevance, originality, importance 
and clarity.


THEMES

Submitted papers should be related with one or more of the main themes proposed 
for the Conference:

A) Information and Knowledge Management (IKM);
B) Organizational Models and Information Systems (OMIS);
C) Software and Systems Modeling (SSM);
D) Software Systems, Architectures, Applications and Tools (SSAAT);
E) Multimedia Systems and Applications (MSA);
F) Computer Networks, Mobility and Pervasive Systems (CNMPS);
G) Intelligent and Decision Support Systems (IDSS);
H) Big Data Analytics and Applications (BDAA);
I) Human-Computer Interaction (HCI);
J) Health Informatics (HIS);
K) Information Technologies in Education (ITE);
L) Information Technologies in Radiocommunications (ITR).


TYPES OF SUBMISSIONS AND DECISIONS

Four types of papers can be submitted:

- Full paper: Finished or consolidated RD works, to be included in one of the 
Conference themes. These papers are assigned a 10-page limit.

- Short paper: Ongoing works with relevant preliminary results, open to 
discussion. These papers are assigned a 7-page limit.

-Poster paper: Initial work with relevant ideas, open to discussion. These 
papers are assigned to a 4-page limit.

- Company paper: Companies' papers that show practical experience, R  D, 
tools, etc., focused on some topics of the conference. These papers are 
assigned to a 4-page limit.

Submitted papers must comply with the format of Advances in Intelligent Systems 
and Computing Series (see Instructions for Authors at Springer Website or 
download a DOC example) be written in English, must not have been published 
before, not be under review for any other conference or publication and not 
include any information leading to the authors’ identification. Therefore, the 
authors’ names, affiliations and bibliographic references should not be 
included in the version for evaluation by the Program Committee. This 
information should only be included in the camera-ready version, saved in Word 
or Latex format and also in PDF format. These files must be accompanied by the 
Consent to Publication form filled out, in a ZIP file, and uploaded at the 
conference management system.

All papers will be subjected to a “double-blind review” by at least two members 
of the Program Committee.

Based on Program Committee evaluation, a paper can be rejected or accepted by 
the Conference Chairs. In the later case, it can be accepted as the type 
originally submitted or as another type. Thus, full papers can be accepted as 
short papers or poster papers only. Similarly, short papers can be accepted as 
poster papers only. In these cases, the authors will be allowed to maintain the 
original number of pages in the camera-ready version.

The authors of accepted poster papers must also build and print a poster to be 
exhibited during the Conference. This poster must follow an A1 or A2 vertical 
format. The Conference can includes Work Sessions where these posters are 
presented and orally discussed, with a 5 minute limit per poster.

The authors of accepted full papers will have 15 minutes to present their work 
in a Conference Work Session; approximately 5 minutes of discussion will follow 
each presentation. The authors of accepted short papers and company papers will 
have 11 minutes to present their work in a Conference Work Session; 
approximately 4 minutes of discussion will follow each presentation.


PUBLICATION AND INDEXING

To ensure that a full paper, short paper, poster paper or company paper is 
published in the Proceedings, at least one of the authors must be fully 
registered by the 27th of December 2015, and the paper must comply with the 
suggested layout and page-limit. Additionally, all recommended changes must be 
addressed by the authors before they submit the camera-ready version.

No more than one paper per registration will be published in the Conference 
Proceedings. An extra fee must be paid for publication of additional papers, 
with a maximum of one additional paper per registration.

Full and short papers will be published in Proceedings by Springer, in a book 
of Advances in Intelligent Systems and Computing series. Poster and company 
papers will be published by AISTI.

Published full and short papers will be submitted for indexation by ISI,