From owner-freebsd-current@freebsd.org Sun Feb 4 09:50:31 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DEC5EF2414 for ; Sun, 4 Feb 2018 09:50:31 +0000 (UTC) (envelope-from maurizio1018@gmail.com) Received: from mail-pg0-x234.google.com (mail-pg0-x234.google.com [IPv6:2607:f8b0:400e:c05::234]) (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 9475A761F4 for ; Sun, 4 Feb 2018 09:50:30 +0000 (UTC) (envelope-from maurizio1018@gmail.com) Received: by mail-pg0-x234.google.com with SMTP id m136so16186228pga.12 for ; Sun, 04 Feb 2018 01:50:30 -0800 (PST) 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=qL6dEFLWUdSLK3T1AQUhdpG8W3BRyNcgK8UuUfA2L7Q=; b=OnZF7gneZgLQK8H+b7gNLYhIRysjSDzeQGVl1puyD6nnvYyN60V97SotkX0+r29AqE D78vJj9jkcpxX0NmyEAz1Jyogk8QeHdnSWrYdFqb5ZPu0omo2hevL3pL9tL4A/DeBFtS z3O0dCe4xnVxElxooeyN2OqF/MmPYJHA8hgEmk/XzK4ssWN47pP3UETusa0fY+Z4jtrQ L1w58k35/Pzd+4EglfAbEyj662I+dCuYGH9HFnYHgoDTXPJGVGjfv/7ln9o+VYQannI5 tI8YgIj6xJlwkldPJ3eJsqQdyvzWU8mn8Q7UZzm3RfeoDNJcmqGZslxSd8iJWFAHRH+a QIbg== 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=qL6dEFLWUdSLK3T1AQUhdpG8W3BRyNcgK8UuUfA2L7Q=; b=KqAsYfSqgSh3mu9PQjlm8fIRnNpwoZNkWu1omj592KnWwAgR1qWKn+oGsJEniCSLzY NysQ6HROtd2SkvMdT6N7lGuLqorJJvCZrKfSDwaxURFHlBVxEoiKqSLXa9R8vXKYSnyD MlwEOZcS570JSWt6chBpJ94ZMoWLzgnIOkTObhWuvSxlP69Af2fmP3F1rc/U1zpT70bO W6aCRifBmhhHW+xq2+3PzQbCT6Jriakni7s1JcQI1mosS3Ie9J0uC7vvcOn7d3hZT8un 3wv3YtylLDpP2ebwCD3+aMRDN3eiJsS7F0GzzimrQoIaPflblSe8nF9BQpdYdCHiI4Kl qHsg== X-Gm-Message-State: AKwxyteO9usFiqD4E+i456Sv1Tu4tLTVeGOtB+mLJZSJZFeA7t3YOYPf 26cpCO5Yh+AiFyxNsdyAMdv1Bx5TgI/JVxjtHfrUYw== X-Google-Smtp-Source: AH8x225bsxdV1VcpDiAnx0tOrwFUPPtv6mY3i3T0RiLIFfs98CeKe7zMYePxg6ChvojkkEO8XBR2P9G9KTEWvMdne28= X-Received: by 10.101.98.5 with SMTP id d5mr3906781pgv.108.1517737829536; Sun, 04 Feb 2018 01:50:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.100.138.144 with HTTP; Sun, 4 Feb 2018 01:50:28 -0800 (PST) In-Reply-To: <3E242843-7D43-4A36-A448-E4B0DACB2AB4@jnielsen.net> References: <3E242843-7D43-4A36-A448-E4B0DACB2AB4@jnielsen.net> From: Maurizio Vairani Date: Sun, 4 Feb 2018 10:50:28 +0100 Message-ID: Subject: Re: Fatal trap 12 booting FreeBSD-CURRENT via isboot kernel module. To: John Nielsen Cc: freebsd-current , Daisuke Aoyama Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Feb 2018 09:50:31 -0000 2018-01-29 18:38 GMT+01:00 John Nielsen : > [ resending from correct email address ] > > On Jan 29, 2018, at 6:05 AM, Maurizio Vairani > wrote: > > I am running > # uname > -a > > FreeBSD 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328383: Thu Jan 25 04:48:52 > UTC 2018 root@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64. > amd64/sys/GENERIC > amd64 > > After compiling the kernel module as discussed in this thread : > https://lists.freebsd.org/pipermail/freebsd-current/ > 2018-January/068272.html > > I can boot FreeBSD via iSCSI using iPXE. But when the isboot, the iSCSI > boot driver version 0.2.13, starts I receive a panic: > https://mega.nz/#!tkVwBBKA!PUj14-Za6KCNaoo9hxuXORRLQoWkb4LMvTdUA1BorD4 > > Any idea? > > > Bummer! > > Aoyama-san- > > Are you still maintaining isboot? Can you help debug this issue on FreeBSD > 12-CURRENT? > > Once we get it working I will update the port with whatever is needed and > send you the patches in case you'd like to cut a new release. > > Thank you! > I have solved the issue changing the function isboot_ifup() in the source file isboot.c. static int isboot_ifup(struct ifnet *ifp) { struct socket *so; struct ifreq ifr; struct thread *td; int error; td = curthread; error = socreate(AF_INET, &so, SOCK_DGRAM, 0, td->td_ucred, td); if (error) { printf("%s: socreate, error=%d\n", __func__, error); return (error); } /* boot NIC */ memset(&ifr, 0, sizeof(ifr)); strlcpy(ifr.ifr_name, ifp->if_xname, sizeof(ifr.ifr_name)); /* set IFF_UP */ error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)&ifr, td); if (error) { printf("%s: ifioctl SIOCGIFFLAGS, error=%d\n", __func__, error); return (error); } ifr.ifr_flags |= IFF_UP; error = ifioctl(so, SIOCSIFFLAGS, (caddr_t)&ifr, td); if (error) { printf("%s, ifioctl SIOCSIFFLAGS, error=%d\n", __func__, error); return (error); } soclose(so); return (0); } I have added a socket in the ifioctl() call as in the /usr/src/sys/nfs/bootp_subr.c source. Please let me know if you prefer a patch. -- Regards, Maurizio