From owner-freebsd-net@freebsd.org Wed Jul 12 05:19:37 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2E53DB315E for ; Wed, 12 Jul 2017 05:19:37 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86AF679753; Wed, 12 Jul 2017 05:19:37 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-wr0-x22b.google.com with SMTP id r103so17275847wrb.0; Tue, 11 Jul 2017 22:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=s27EWy7Qx0gy4l8TOzckZHfGWjGTgucq7Pu2tnME/s4=; b=YI4NAY3cIJCIRX3KaiUoBkK7lb+w3ClokSGY4pYkNAMVsamT+zzC9fJWT7kqV+Qc7+ AwuvV52xQXSM5jRuovXvPbTAhEJDFLHHlvd7xV3dYTAyBD88xwQQQ7vzlNm4Ps6d7ZNB oXX5EMMLjC5k5T4CXbIkc+4RZadWe4hq6mWyoLPVnXudU6cFz3ckXRNw0UYfJuiLMplX 046cK0U9lg1x8Jnz0m80ghXA7agoaw90L/TC8qS8+v4XzgvaOumBORZLnK0xk6nCoh6v 6SNUEZE5NPpF5LXDB3FQe/0IJI6y1yXwwI4AC4XU/BtDen1JJN5SytbXfFDjrm6KuKIR YNiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=s27EWy7Qx0gy4l8TOzckZHfGWjGTgucq7Pu2tnME/s4=; b=CyGNJ205J9Elscty15GNor5XQyay8RNNl01A9BDSIjflkJ/kCOwYaXQX2T+BflHuDG Y0NCkKHH9fjpgKyzOFZb4Thy6c4Qw77QZBtuOlQaSvq5PpBWXbUblI/g22ChdNMOHo8L XdycwmQJ2bb4SjiPcoTSohl0oX/8HFyWXCTf+6ZP9x3Fl5VJAtJQvGq7+O39bhvXvEnP KjORahmcr6q6s/3kisNxWYY7bBPzvJk53xHiu731nU9jN4/LISfQyA8gbQo3utOCWehB LKhuzAun4cTQCjxRD74ma8ElXSS6eBegDASDq4ohTUbfVr6XKMte8v1hOBMf7W/fAGYE tkRw== X-Gm-Message-State: AIVw110oHjpXl0ly+IFFF8AjGZJdi4uq5f7KYh8EWIITXuWMTrAzGi+r zT9ex9Dy7frt1J+ecBtWxJhBSdMNLg== X-Received: by 10.28.154.17 with SMTP id c17mr1064612wme.35.1499836775382; Tue, 11 Jul 2017 22:19:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.99.66 with HTTP; Tue, 11 Jul 2017 22:19:34 -0700 (PDT) In-Reply-To: <20170711200510.GB60651@alchemy.franken.de> References: <20170705110512.GA28058@alchemy.franken.de> <20170711200510.GB60651@alchemy.franken.de> From: Vincenzo Maffione Date: Wed, 12 Jul 2017 07:19:34 +0200 Message-ID: Subject: Re: NULL pointer dereference bug triggered by netmap To: Marius Strobl Cc: FreeBSD Net , "Eggert, Lars" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jul 2017 05:19:38 -0000 Yes. Actually, we would also need one beteween the following two options: 1) Implementing a dummy if_start() for if_loop.c 2) Prevent netmap from using if_loop. Cheers, Vincenzo 2017-07-11 22:05 GMT+02:00 Marius Strobl : > On Thu, Jul 06, 2017 at 02:19:42PM -0700, Vincenzo Maffione wrote: > > Sure, can anyone commit this? > > The addition of KASSERTs like the below one to if_handoff() and > if_start()? Sure. > > Marius > > > > > Il 5 lug 2017 4:05 AM, "Marius Strobl" ha scritto: > > > > > On Mon, Jul 03, 2017 at 05:08:09PM +0200, Vincenzo Maffione wrote: > > > > Details here: > > > > > > > > https://github.com/luigirizzo/netmap/issues/322 > > > > > > > > Is it acceptable to commit the proposed patch? > > > > > > As suggested by hselasky@, the outliner problem at hand is better > solved > > > by a dummy if_start method in order to not hurt the fast-path. Thus, if > > > anything at all, a KASSERT(ifp->if_start != NULL, "no if_start method") > > > should be added to if_handoff() and if_start(). > > > > -- Vincenzo Maffione