From owner-svn-src-all@freebsd.org Sun Dec 10 00:17:06 2017 Return-Path: Delivered-To: svn-src-all@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 89666E9D3A5; Sun, 10 Dec 2017 00:17:06 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 4B3C07B71C; Sun, 10 Dec 2017 00:17:05 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id A9C4527374; Sun, 10 Dec 2017 00:17:04 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id vBA0H3kC073339 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 10 Dec 2017 00:17:04 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id vBA0H312073338; Sun, 10 Dec 2017 00:17:03 GMT (envelope-from phk) To: Warner Losh cc: Mark Johnston , Andriy Gapon , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326731 - head/sys/ufs/ffs In-reply-to: From: "Poul-Henning Kamp" References: <201712091544.vB9FiVUI096790@repo.freebsd.org> <20171209223713.GA15275@raichu> <73189.1512862030@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <73336.1512865023.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Sun, 10 Dec 2017 00:17:03 +0000 Message-ID: <73337.1512865023@critter.freebsd.dk> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 00:17:06 -0000 -------- In message , Warner Losh writes: >That would be strange given that BIO_ORDERED is @gibbs baby ? > >Nah... I wrote the iosched code... and I find the concept somewhat flawed >since it is at the disk level, not the partition level, so it winds up >interfering with mixed traffic. And it really only makes sense for writes= , >but it affects reads. And it is a poor fit to Ata semantics, and not a lo= t >better for scsi. And for nvme it creates a bottleneck in hardware careful= ly >designed to be free of bottlenecks... Don't take my comment as an endorsement of BIO_ORDERED... I think ordering is strictly a consumer responsibility for exactly (and then some) of the reasons you mention. "End to end principle in systems design" and all that... -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-svn-src-all@freebsd.org Sun Dec 10 02:24:05 2017 Return-Path: Delivered-To: svn-src-all@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 5DD7FEA1151 for ; Sun, 10 Dec 2017 02:24:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (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 1E0097F57A for ; Sun, 10 Dec 2017 02:24:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22d.google.com with SMTP id w127so6191310iow.11 for ; Sat, 09 Dec 2017 18:24:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=zrcUHiRcARmFrsYgJBLtVygOSPSsKkDW/iiMClE4Eno=; b=1hbscbL+KTSsxTwet2BrMltM3JaogACjbxHMZ+6kzTjNsB1rEE3tUeQkMNGE9NS8Zb kibwzRy2G/6Zft3ccrZL0P3NmjtHk23aaj9pPzZD38oM7LFlk+3LscVdQxfOB1YjMNgz fDOW1oEWM0GolinhDIncoW7ZMEyVqXrkUBki32uikzjTUbbqnW8XQXhvQH3YsOnMsdn3 5BlP8w6+fo/HN7XmJpQwuDJQ/OBCd6AXr96Ajnjpvgit61zcyfEqHc9kG/gsq/gUIJ7r beYykYlZySrSRywduGktHEgk7B3fcb9zvZpFsXQjz4WuTU3DtfP/SJb1rtv5QTG1AAm8 tW8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=zrcUHiRcARmFrsYgJBLtVygOSPSsKkDW/iiMClE4Eno=; b=WggoUJ7fD5bCTw9kZ4nB7dgToBZVj+zAjaNJMen0zN86+HtaDvuNwk4/dVEjLbMVc7 C3QNw6JJtwuUzXX0XcyOW7I6hkua7Ld+H9rQ4LImy6pg6dJfQLOPQbea9FJa8ECEwcdq H2vHmec/kQN7BWQYT5tI/oTbwZqv2axiRYIMOuXT+GwKvi42leKBefX5wn3DzrHhZAcE Ky04Vl0bUi1RjOuYutBLyajEYHtsJWmMM4lDGSyhyXUm14BoMvKhs33l4pdwxh536Jjh S+Cv0J6jGXvL26eZqdl9jIOSWQOX13qF3tNSDgUfGtYfHkGjqFDW/4mjMm9GlVApxOKu pAhQ== X-Gm-Message-State: AKGB3mKCybo1qrGpft4SqA6Stjz62CF3zaU23opL+Ftkpl/Cy1be7jSF +92ufpKaMySvc74Auwo1jf1AN7+IvfUkUdPCX9Wq0A== X-Google-Smtp-Source: AGs4zMbH9F/uBdNTR0zyhCuSZTWTzvVzkf9Ps5istsPgTfpE9rNZiI9MbwJ7LzPFDLRt2o4Om3GZ3bE+3Z3As9WhFIs= X-Received: by 10.107.52.140 with SMTP id b134mr22095560ioa.291.1512872644353; Sat, 09 Dec 2017 18:24:04 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Sat, 9 Dec 2017 18:24:03 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <73337.1512865023@critter.freebsd.dk> References: <201712091544.vB9FiVUI096790@repo.freebsd.org> <20171209223713.GA15275@raichu> <73189.1512862030@critter.freebsd.dk> <73337.1512865023@critter.freebsd.dk> From: Warner Losh Date: Sat, 9 Dec 2017 19:24:03 -0700 X-Google-Sender-Auth: 73NDfp6b_zr-rySukRAgTvAtVN0 Message-ID: Subject: Re: svn commit: r326731 - head/sys/ufs/ffs To: Poul-Henning Kamp Cc: Mark Johnston , Andriy Gapon , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 02:24:05 -0000 On Sat, Dec 9, 2017 at 5:17 PM, Poul-Henning Kamp wrote: > -------- > In message Pg@mail.gmail.com>, Warner Losh writes: > > >That would be strange given that BIO_ORDERED is @gibbs baby ? > > > >Nah... I wrote the iosched code... and I find the concept somewhat flawed > >since it is at the disk level, not the partition level, so it winds up > >interfering with mixed traffic. And it really only makes sense for writes, > >but it affects reads. And it is a poor fit to Ata semantics, and not a lot > >better for scsi. And for nvme it creates a bottleneck in hardware > carefully > >designed to be free of bottlenecks... > > Don't take my comment as an endorsement of BIO_ORDERED... > > I think ordering is strictly a consumer responsibility for exactly > (and then some) of the reasons you mention. > > "End to end principle in systems design" and all that... Yes. I'd like to kill it completely... It's not needed and fosters the notion that there's more determinism in the ordering of events in the I/O stack than has existed since tagged queueing was a thing in the 90's. But there's no such thing as barriers in I/O devices today: that's handled in software by draining the queue, doing the one I/O, then starting the queue back up again.... So I'm with you that it's the client's job to wait for write X to complete before scheduling writes that depend on X to the I/O system. Warner From owner-svn-src-all@freebsd.org Sun Dec 10 02:37:01 2017 Return-Path: Delivered-To: svn-src-all@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 18781EA1B88 for ; Sun, 10 Dec 2017 02:37:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (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 CFB4D7FD1F for ; Sun, 10 Dec 2017 02:37:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id d14so6220409ioc.5 for ; Sat, 09 Dec 2017 18:37:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:cc; bh=bYYtyUfjZBfz/lHk/F6Ykq/bvpCGLs6g3w/7vzpI0Mw=; b=rGdpGd420A8GkNf1Ii9UbuuWYGz+prHt9eXN6ZKnz0Y3yHSDgQ5Zct35rBne5A6Lk9 f+z0WSbCsnwAg2fsTSQepSUDtSe6JJFy5v++/aF5dmvL8/Oli6UMujyGgBlcWLFdgIEO tP2LItQOGZBtg5/139Ce61GCgt4a6PLYW4cF4BBAV8Oxr9olkzCzz2l6rosxPPoW/2Yv fUK6qTGGbariVfBbRcd/UJeBe+nVFiw9ItLVDyr3gatq3QN2z9PO3HjeDetRX3YaVgPV F86hhBIVh2TMQgzfnY/IJdGIw5OxineoDueR8GfFYe3hZ53IAGwVE8Pcyovjspd4cnUj IQ7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:cc; bh=bYYtyUfjZBfz/lHk/F6Ykq/bvpCGLs6g3w/7vzpI0Mw=; b=uCaQgb+B5Ic2Kybj75/AyvAFzkeuhmqzlyMx96X0Ff73Gb+65OiqMvRhM++uHCAKf+ GXUgdmCnD0bkwyi1VyaLjwoHQeHj7K4BurZ3/oZuJZkyvG4CbXfBBeAOq0vW+Mu0lHsK aG8owAXXyxCUGzJuJHremLby/naWXnzXPUa/10L7mKqyVrjsn5wOnSh8cMgN579ngr7+ V4/dTwLKPR5/ciPqRVKuGvbfK0jHA4xFJsldZnMaLh0PnFeYvnWNzzvqWDLCczatM2pM 3hPzptxqbZ+LleaYNJDLLo8N3ja9bynVNMS3um8xF7WkhJET0I1cnk1CDL1vwFDuteNm vElQ== X-Gm-Message-State: AKGB3mJbLnHMX0ngsAE7soF48fpJq0qfxCZxKXUO0sAzx/SN9gWmFvPH JqWF8oQZJh1zOWDlgADjTVU8AgVuYr9elB6YH69Htn4x X-Received: by 10.107.52.140 with SMTP id b134mt23216765ioa.291.1512873419974; Sat, 09 Dec 2017 18:36:59 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Sat, 9 Dec 2017 18:36:59 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201712091544.vB9FiVUI096790@repo.freebsd.org> From: Warner Losh Date: Sat, 9 Dec 2017 19:36:59 -0700 X-Google-Sender-Auth: JZyf-UZrCowTgk6H0I6IhUuyru4 Message-ID: Subject: Re: svn commit: r326731 - head/sys/ufs/ffs Cc: Mark Johnston , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 02:37:01 -0000 On Sat, Dec 9, 2017 at 11:03 AM, Andriy Gapon wrote: > On 09/12/2017 17:44, Mark Johnston wrote: > > Some GEOMs do not appear to handle BIO_ORDERED correctly, meaning that > the > > barrier write may not work as intended. There's a few places we send down a BIO_ORDERED BIO_FLUSH command (see softdep_synchronize for one). Will those matter? As I've noted elsewhere: I'd really like to kill BIO_ORDERED since it has too many icky effects (and BIO_FLUSH + BIO_ORDERED isn't guaranteed to do, well, anything since it can turn into a NOP in a number of places. Plus many of the implementations of BIO_ORDERED assume the drive is like SCSI and you just set the right tag to make it 'ordered'. For ATA we issue a non NCQ command, which is a full drain of outstanding commands, send this command, then start them again which really shuts down the parallelism we implemented NCQ for :(. We do similar for NVME which is even worse. There we have multiple submission queues in the hardware. To simulated it, we do a similar drain, but that's going to get in the way as we move to NUMA and systems where we try to do the I/O entirely on one CPU (both submission and completion) and ordered I/O is guaranteed lock contention. Warner From owner-svn-src-all@freebsd.org Sun Dec 10 03:14:58 2017 Return-Path: Delivered-To: svn-src-all@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 A99AFE80480; Sun, 10 Dec 2017 03:14:58 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pl0-x232.google.com (mail-pl0-x232.google.com [IPv6:2607:f8b0:400e:c01::232]) (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 2025119C6; Sun, 10 Dec 2017 03:14:56 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pl0-x232.google.com with SMTP id g2so2597321pli.8; Sat, 09 Dec 2017 19:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VgoKQQNygNbipe5/Qwqo49osMK8Zazys81TWfOPqkWU=; b=AI8rT8IRoaxsn8m+of9kxEKuMYezllM9+WhrBLM5uHfKOz2gxuTQtDSrfBABfcGcfe tVgkkVWE2TaSEBqsEGxI58urN+VZZcT9hATJe7f8+TwrFhtTw8xoK/vluBFgE/yZQMEE 3IYG5IDQZGFF9fEm2So7LGfBakkJ3kpc84hy4gP0hu3XnC5DrZS/ff6Z+ZQgLT9wNOuO olCl76c0aKcuB/cWd9KKEvQJFEO8u9dROEuyHh5y3Dms0zmWWh+Mp3/PAC5TmGMixrkk GDJ3lQH+Kysw3cXBiIH3ampa9hGdUrJqyDIW1nYJriP44keOefKJTO+gtjb09/O7Fp4Y Y2VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=VgoKQQNygNbipe5/Qwqo49osMK8Zazys81TWfOPqkWU=; b=rxvE6ZjWBBgKqKOn3ZsJv3LrFyBJAju9lTKXT77H8kphzqpq9beME4B0hk+IxnadMN /cUj4JX+8yOycYSRhLvaQgor6WZ5bhT8UcqvLlgBYZ/1doVheryZIHEay6izs96DcRPA 9DCR8FJVkw+s+RJH8NY9MSFD5RRcIegMNqNe6e/lzBdls5BRDnL2IPxCR1UXKioeqgeJ QWc0A4GFCcRAJlrpsLt0ybkmLPmJuVjVO/Iq6qgI9xGYqQj0z19dttxUGS0KbqR2LTgn SOqHtlzge05NktsUe3eLt7psNP5v0FVj2jcD+xhYLRIKqxds71HwzGCJutbEynZiS5ge G5rw== X-Gm-Message-State: AKGB3mIAfKrAodwbZo26TP1Vs78hBSt/Ti2YA2Q/yA+VTGWCVms046Ph FwariFbB3Ltf4XYNpK1xx87BRQ== X-Google-Smtp-Source: AGs4zMZUas6Zs1pcfvdedkOHUOhFO3mmRbGfBa9wwwpg+RCHbPrhDKqH8XkHk61n/yuBO+vYJYdmUQ== X-Received: by 10.159.230.3 with SMTP id u3mr21351882plq.2.1512875694339; Sat, 09 Dec 2017 19:14:54 -0800 (PST) Received: from raichu (toroon0560w-lp140-01-69-159-38-22.dsl.bell.ca. [69.159.38.22]) by smtp.gmail.com with ESMTPSA id t75sm18156738pgc.12.2017.12.09.19.14.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Dec 2017 19:14:53 -0800 (PST) Sender: Mark Johnston Date: Sat, 9 Dec 2017 22:14:50 -0500 From: Mark Johnston To: Warner Losh Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r326731 - head/sys/ufs/ffs Message-ID: <20171210031450.GB15275@raichu> References: <201712091544.vB9FiVUI096790@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 03:14:58 -0000 On Sat, Dec 09, 2017 at 07:36:59PM -0700, Warner Losh wrote: > On Sat, Dec 9, 2017 at 11:03 AM, Andriy Gapon wrote: > > > On 09/12/2017 17:44, Mark Johnston wrote: > > > Some GEOMs do not appear to handle BIO_ORDERED correctly, meaning that > > the > > > barrier write may not work as intended. > > > There's a few places we send down a BIO_ORDERED BIO_FLUSH command > (see softdep_synchronize for one). Will those matter? Some classes have separate handling for BIO_FLUSH, so it depends. I think gmirror's handling is buggy independent of BIO_ORDERED: g_mirror_start() sends BIO_FLUSH commands directly to the mirrors, while reads and writes are queued for handling by the gmirror worker thread. So as far as I can tell, a BIO_WRITE which arrives at the gmirror provider before a BIO_FLUSH might be sent to the mirrors after that BIO_FLUSH. I would expect BIO_FLUSH to implicitly have something like release semantics, i.e., a BIO_FLUSH shouldn't be reordered with a BIO_WRITE that preceded it. But I might be misunderstanding. > As I've noted elsewhere: I'd really like to kill BIO_ORDERED since it has > too many icky effects (and BIO_FLUSH + BIO_ORDERED isn't guaranteed to do, > well, anything since it can turn into a NOP in a number of places. Plus > many of the implementations of BIO_ORDERED assume the drive is like SCSI > and you just set the right tag to make it 'ordered'. For ATA we issue a non > NCQ command, which is a full drain of outstanding commands, send this > command, then start them again which really shuts down the parallelism we > implemented NCQ for :(. We do similar for NVME which is even worse. There > we have multiple submission queues in the hardware. To simulated it, we do > a similar drain, but that's going to get in the way as we move to NUMA and > systems where we try to do the I/O entirely on one CPU (both submission and > completion) and ordered I/O is guaranteed lock contention. Independent of this, it doesn't really look like we have any way of handling write errors when dependencies are enforced using BIO_ORDERED. In the case of the babarrierwrite() consumer in FFS, what happens if the inode block write fails due to a transient error, but the following CG update succeeds? From owner-svn-src-all@freebsd.org Sun Dec 10 04:43:28 2017 Return-Path: Delivered-To: svn-src-all@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 D69BEE81EA6; Sun, 10 Dec 2017 04:43:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A05973F5F; Sun, 10 Dec 2017 04:43:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBA4hRHw023458; Sun, 10 Dec 2017 04:43:27 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBA4hRKa023457; Sun, 10 Dec 2017 04:43:27 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201712100443.vBA4hRKa023457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 10 Dec 2017 04:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326739 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 326739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 04:43:28 -0000 Author: jhibbits Date: Sun Dec 10 04:43:27 2017 New Revision: 326739 URL: https://svnweb.freebsd.org/changeset/base/326739 Log: Retrieve the page outside of holding locks pmap_track_page() only works with physical memory pages, which have a constant vm_page_t address. Microoptimize pmap_track_page() to perform one less operation under the lock. Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Sat Dec 9 23:34:00 2017 (r326738) +++ head/sys/powerpc/booke/pmap.c Sun Dec 10 04:43:27 2017 (r326739) @@ -4224,10 +4224,10 @@ pmap_track_page(pmap_t pmap, vm_offset_t va) va = trunc_page(va); pa = pmap_kextract(va); + page = PHYS_TO_VM_PAGE(pa); rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); - page = PHYS_TO_VM_PAGE(pa); TAILQ_FOREACH(pve, &page->md.pv_list, pv_link) { if ((pmap == pve->pv_pmap) && (va == pve->pv_va)) { From owner-svn-src-all@freebsd.org Sun Dec 10 05:03:43 2017 Return-Path: Delivered-To: svn-src-all@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 04F7CE823DA; Sun, 10 Dec 2017 05:03:43 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 7EF9363A1D; Sun, 10 Dec 2017 05:03:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id D39721084EF; Sun, 10 Dec 2017 16:03:34 +1100 (AEDT) Date: Sun, 10 Dec 2017 16:03:34 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Niclas Zeising cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326733 - head/usr.sbin/acpi/acpiconf In-Reply-To: <201712091559.vB9FxAv9001255@repo.freebsd.org> Message-ID: <20171210132430.M1124@besplex.bde.org> References: <201712091559.vB9FxAv9001255@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=bc8baKHB c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=27B39O857qpdsyqPqwEA:9 a=FxGlBrPq6Vi2QFDL:21 a=QMWDO7Dw0PKc16hh:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 05:03:43 -0000 On Sat, 9 Dec 2017, Niclas Zeising wrote: > Log: > Improve options and error handling. > > Improve options handling and error out if multiple mutually exclusive > options are passed to acpiconf. Switch from using atoi() to strtol() for > argument parsing, and add error checking and handling, instead of blindly > trusting that the integer conversion is OK. > Cange err() to errx() in once case, the errno value was garbage there. This has the usual bugs in strtol() handling, making it little better than atoi(). It adds manu new bugs. > Modified: head/usr.sbin/acpi/acpiconf/acpiconf.c > ============================================================================== > --- head/usr.sbin/acpi/acpiconf/acpiconf.c Sat Dec 9 15:47:26 2017 (r326732) > +++ head/usr.sbin/acpi/acpiconf/acpiconf.c Sat Dec 9 15:59:10 2017 (r326733) > @@ -205,8 +205,9 @@ usage(const char* prog) > int > main(int argc, char *argv[]) > { > - char *prog; > - int c, sleep_type; > + char *prog, *end; > + int c, sleep_type, battery, ack; > + int iflag = 0, kflag = 0, sflag = 0; > > prog = argv[0]; > if (argc < 2) > @@ -218,16 +219,24 @@ main(int argc, char *argv[]) > while ((c = getopt(argc, argv, "hi:k:s:")) != -1) { > switch (c) { > case 'i': > - acpi_battinfo(atoi(optarg)); > + iflag = 1; > + battery = strtol(optarg, &end, 10); First, errno is not set before starting, making it impossible to detect overflow properly. Second, the value is blindly assigned to a variable of type int, just like for atoi(). This gives implementation-defined behaviour. For atoi(), the behaviour is is undefined on any overflow, but for (int)strtol() the behaviour on other overflows is defined for strtol() and the behaviour on this overflow is only implementation-defined, so the combined behaviour is not undefined. Good luck finding an implementation that documents its behaviour. Third, forcing base 10 preserves the bug that only decimal values are supported. This is good enough for acpiconf, but still a gratuitous restriction. POSIX might have ths restriction for all integer args on the command line. It is also unclear if POSIX accepts args not representable by the int type. Any such restrictions are bugs in POSIX. Portability requires not using anything except small decimal integers for args. Good luck finding a utility that documents the form of integer args that it accepts. For acpiconf -s, it was clear that the arg must be one of the characters [1-4], but this commit breaks that (see below). For acpi -i battery, no form is documented, so it is unclear if the arg should be a number, name, or either. -i foobar used to work to give battery number 0 by ignoring errors in atoi(). Almost any error handling for strtol() tends to break this. > + if ((size_t)(end - optarg) != strlen(optarg)) > + errx(EX_USAGE, "invalid battery"); > break; Here is the "almost any" error handling for strtol(). It is very incomplete, but much larger than needed or usual. All it does is check that there is no garbage after the end of the parsed part of the string. This is normally written as: if (*end != '\0') but is written as: if ((size_t)(end - optarg) != strlen(optarg)) Both see "foobar" as garbage after the end, so as an error. The following error checks are still missing: - null args. Best written as another test of 'end' in the same expression: if (end == optarg || *end != '\0') errx(... /* better error message than above */) POSIX requires errno to be set to EINVAL if end == optarg and for some other errors. This is unportable and should not be used. But sloppy code uses it to combine some tests into a single tests of errno and then print a non-specific error message. acpiconf already has the non-specific error message. - overflow in strtol(). Best written as: long bnum; /* must be long to hold result */ ... errno = 0; bnum = strtol(optarg, &end, 0); if (errno == ERANGE) errx(... /* better error message than above */) Another usual error is checking if the result is LONG_MIN or LONG_MAX. These values are returned on overflow errors but also for no errors. errno must be used as above to distinguish, but then checking these values just breaks support for this values. However, if these values are out of the range of subsequent range checks and a specific error message for overflow is not done, then the errno check and checks for the these values are redundant. Sloppy code gets minor simplifications from this with the minor sloppiness of non-speficic error messages. - overflow in assignment. Best avoided by assigning to a variable of the correct type as above. - range checking not related to overflow. This is actually not missing, but done in acpi_battinfo(). The range is 0 to 63 inclusive, modulo overflow of the value before it reaches this function. E.g., 2**32 + 1 is truncated to 1 on 64-bit arches. This range is of course not documented in the man page. The above also has some style bugs. Quoting it again: > + if ((size_t)(end - optarg) != strlen(optarg)) > + errx(EX_USAGE, "invalid battery"); Some style bugs are: - verbose spelling of (*end != '\0) as discussed above - obfuscated name 'end'. 'endp' or 'endptr' is better. Both C99 and the FreeBSD man page use 'endptr' - 4-char indentation of errx() - use of sysexits(3). Bug for bug compatible with the rest of the file and with the error exit in acpi_battinfo() - non-specific error message. The rest of the file is mostly better. It mostly prints the invalid value in error messages. A similar message in acpi_battinfo() prints the arg. Most error messages don't print the range of valid values. The similar message has this bug (it doesn't print [0-63]), and it also has the bug of containing a bogus system message from using err() instead of errx(). errno is garbage from before atoi() or strtol() at that point, but sometimes strtol() sets errno to ERANGE or EINVAL and then the system message is accidentally correct. - other poor wording in error message. It is not the battery that is invalid, but the battery number given by the battery arg. The similar message in acpi_battinfo() has the same bug. Even the man page is better. It names the are 'batt'. That is a bit cryptic for the man page, and better for the source code, but the source code expands the name of the battery number arg from 'batt' to 'battery'. > case 'k': > - acpi_sleep_ack(atoi(optarg)); > + kflag = 1; > + ack = strtol(optarg, &end, 10); > + if ((size_t)(end - optarg) != strlen(optarg)) > + errx(EX_USAGE, "invalid ack argument"); > break; Similarly, except it prints "argument", and the valid range is even more obscure. The arg is bindly blindly truncated and then blindly passed to the kernel which presumably checks. The later error message tells us that the arg is a sleep type. If it is a sleep type, then it can be checked here to get more specific messages as for -s. The later error message for this doesn't print the arg. The later error message for -s does print the arg. > case 's': > + sflag = 1; > if (optarg[0] == 'S') > - sleep_type = optarg[1] - '0'; > - else > - sleep_type = optarg[0] - '0'; > + optarg++; > + sleep_type = strtol(optarg, &end, 10); This is incompatible. Leading whitespace and signs are now accepted. If breaking compatibility, then also allow any base (actually only octal, hex and decimal since C literals are too feeble to even support binary. The main incompatiblity is the octal prefix of 0 not being different enough). > + if ((size_t)(end - optarg) != strlen(optarg)) > + errx(EX_USAGE, "invalid sleep type"); Similarly. > if (sleep_type < 1 || sleep_type > 4) > errx(EX_USAGE, "invalid sleep type (%d)", > sleep_type); The old error message is missing most of the style bugs in the new one. There are rather too many error messages to print specific errors, without even specific ones for range errors. 2 here, with the first one only being distinguishable from the second one due to bugs in it. Both basically just say that the arg is invalid. Later the arg is passed to the kernel. Since the range is checked here, it must be valid, but might be unsupported. The later message just says "... failed" (then the kernel errno). > @@ -241,7 +250,25 @@ main(int argc, char *argv[]) > argc -= optind; > argv += optind; The last 2 lines still seem to be garbage. > > - if (sleep_type != -1) > + if (iflag != 0 && kflag != 0 && sflag != 0) > + errx(EX_USAGE, "-i, -k and -s are mutually exclusive"); Stranger indentation here. > + Style bug (extra blank line). KNF doesn't use blank lines even to separate unrelated code, but the code here is related. > + if (iflag != 0) { Style bug (extra space). > + if (kflag != 0) > + errx(EX_USAGE, "-i and -k are mutually exclusive"); > + if (sflag != 0) > + errx(EX_USAGE, "-i and -s are mutually exclusive"); > + acpi_battinfo(battery); > + } > + > + if (kflag != 0) { > + if (sflag != 0) > + errx(EX_USAGE, "-k and -s are mutually exclusive"); > + acpi_sleep_ack(ack); > + } > + > + Now 2 extra blank lines. > + if (sflag != 0) > acpi_sleep(sleep_type); > > close(acpifd); Everything near the end seems to be wrong. All options except -s, -h and unknown options were processed in order. Some repeated options were repeated. Some combinations and some repetitions might not work, but the verbose checking doesn't do much except prevent users tryning them. It is certainly valid and useful to do any number of -i's for different batteries. That is broken now. Several i's for the same battery is valid but not so useful. Similarly several -i's followed by an option that prevents doing more. The large code to disallow combinations is not large enough to disallow valid and invalid combinations with -h, since -h is still processed in order (similarly for unknown options treated like -h). E.g., -i 0 -h used to print battery info then help. Now it prints help without detecting that this breaks -b. -s 0 -h and -h -s 0 are not so valid. They are not considered to be invalid, but are silently converted to -h the same as before. -s 666 -h is detected as an error by seeing and checking the -s arg before -h; -h -s 666 is not detected as an error because -h is processed in order and the processing terminates the program. The error handling is to exit on any error, so parsing and checking most of the options before handling 1 is especially non-useful for this program. E.g, -i 0 -i 1 ... is no good for probing for batteries since it exited on the first unconfigured battery. Now it exits after handling the first battery and doesn't even do full checking for the other batteries, since the checking is not all in the getopt() loop now that acpi_battinfo() is not in the loop. Documentation for the unsupported combinations is missing in both the usage method and the man page. This can be hard to write for even a few combinations when the unsupported combinations are non-orthogonal or make no sense. This is usualy handled with multiple command lines for the random logic and complicated notation in single command lines for non-random logic. To disallow combinations without undocumented complications, just process options in order and exit after handling 1. acpiconf doesn't have any coomands that need multiple options. I don't really like this. It is just easy to document using 1 command line with multiple exclusive options. Hmm, this can be checked nicely: after finding 1 option, exit with an error without doing anything if there are any more options. Don't bother parsing the garbage options after the first one. Don't print 2**N error messages for 2**N combinations of N invalid options afger the first one. The current documentation is quite broken even for the the old behaviour -- it doesn't mention multiple options. Even ls(1) is not clear about what happens for multiple options. Positive-logic flag options can be repeated with no effect, but the syntax in the synopsis doesn't say this. Like many utilities, ls takes a --libxo option whose syntax is wrong in the SYNOPOSIS, missing in the usage message, and only documented by pointing to libxo(3) in the DESCRIPTION. ls takes only 1 option with an arg (-D). Repetition of this is undocumented. It silently overrides the previous -D. Bruce From owner-svn-src-all@freebsd.org Sun Dec 10 08:53:41 2017 Return-Path: Delivered-To: svn-src-all@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 E1862E866AE; Sun, 10 Dec 2017 08:53:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 7DA8469050; Sun, 10 Dec 2017 08:53:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 91B1B1A8DA3; Sun, 10 Dec 2017 19:31:20 +1100 (AEDT) Date: Sun, 10 Dec 2017 19:31:20 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Conrad Meyer cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326736 - head/usr.bin/wc In-Reply-To: <201712092155.vB9LtJFY053385@repo.freebsd.org> Message-ID: <20171210160344.X1124@besplex.bde.org> References: <201712092155.vB9LtJFY053385@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cK6QihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=rYIJg0UdEs76zxW-XZ8A:9 a=xAcgYsopjZ4dNkU-:21 a=qDnm0jGG12O4IVmq:21 a=hbmDjY5MnyDLhL0-:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 08:53:42 -0000 On Sat, 9 Dec 2017, Conrad Meyer wrote: > Log: > wc(1): Extend non-controversial optimizations to '-c' mode > > wc(1)'s slow path for counting words or multibyte characters requires > conversion of the 8-bit input stream to wide characters. However, a faster > path can be used for counting only lines ('-l' -- newlines have the same > representation in all supported encodings) or bytes ('-c'). > > The existing line count optimization was not used if the input was the > implicit stdin. Additionally, it wasn't used if only byte counting was > requested. This change expands the fast path to both of these scenarios. This seems reasonable, but I don't like the complicated logic for handling combinations of lines and bytes in the same loop. Bytes alone just require adding up the byte counts from read() (in the slow case where st_size cannot be used). This is obviously faster than using cat(1) (modulo block size pessimizations), since cat has to do output. PS: actually, it pessimizes the fastest case of wc -c on a regular file. See below. (The wc -l code is before the fastest case. That was not a very good organization, but it worked since wc -l can never use the fastest case.) Your change seems to work almost right for wc -c but not for wc -m. On freefall, dd bs=1m goes at 32GB/sec. (I think this depends on some vm magic to reduce copies. 1m is large and asks for cache busting, but it should only use 4K of L1 in the kernel and 1 or 2 times 1m in dd. Apparently dd is avoiding the output. My throughput utility which does avoid the output is only 1GB/sec faster). wc -c is now mediocre. It goes at 5.5GB/sec for a pipe from dd bs=1m. 5-6 times slower is too many, but cat it is better than cat which is 11.5 times slower (3GB/sec). 1m is too large a block size for me, and dd bs=64k is only slightly slower (28GB/sec). I blame pipes and slow syscalls for the slowness of dd bs=1m Expanding the buffer size from 64 kB helps reduce the number of read(2) > calls needed, but exactly what impact that change has and what size to > expand the buffer to are still under discussion. It would be wrong. I didn't see any discussion of this. Other utilities have different bugs in this area. The worst are all utilities that use stdio. Just using stdio asks for slowness, but fread() and fwrite() are not too bad for efficiency provided stdio's block sizing is not trusted and setvbuf() is used to override it. stdio naively trusts stat() to return a usable block size in st_blksize, but stat() rarely does so. This doesn't matter much for buffered i/o, unless you want to get near 32GB/sec). dd bs=4k goes at 10GB/sec on freefall. This wastes some CPU, but it is hard to produce i/o at even 1/10 of that speed. Just don't go 8 times slower than that by using a block size of 512. One of the kernel bugs is using PAGE_SIZE as a default for st_blksize. I notice this often when I downgrade to versions of FreeBSD with this bug and do silly things like wc on disks and not so silly things like cmp on disks. I work around this using dd to change the block size. This uses more CPU, but not enough to matter for disks (except SSD ones). Ugh, -current has broken st_blksize for pipes. It is now hard-coded as PAGE_SIZE. In old versions, it was pipe->pipe_buffer_size. Pipe code has internal problems configuring the latter. It uses bogusly ifdefed constants PIPE_SIZE = 16K and BIG_PIPE_SIZE = 64K, and an obscure method to select between these. Only socket code handles st_blksize perfectly. It sets st_blksize to sb_hiwat. The user has complete control over socket buffer sizes and watermarks, and the defaults are better. > Modified: head/usr.bin/wc/wc.c > ============================================================================== > --- head/usr.bin/wc/wc.c Sat Dec 9 21:04:56 2017 (r326735) > +++ head/usr.bin/wc/wc.c Sat Dec 9 21:55:19 2017 (r326736) > @@ -206,30 +206,30 @@ cnt(const char *file) > ... > + else if ((fd = open(file, O_RDONLY, 0)) < 0) { > + xo_warn("%s: open", file); > + return (1); > + } > + if (doword || (domulti && MB_CUR_MAX != 1)) > + goto word; Checks of MB_CUR_MAX like this are supposed to make wc -m do the same as wc -c when the multi-byte width is 1. Is this really valid? Even with ASCII, is is reasonable to treat bytes with no encoding as not there at all, or as an encoding error. I don't know of mb conversion functions are capable of or allowed to ignore bytes with no encoding. On exotic machines with 32-bit chars (now allowed by POSIX). This check seemed to work before for making wc -c equally slow as wc -m for (domulti && MB_CUR_MAX != 1) (just doing this check in inner loops is pessimal). I can't see why the above doesn't make wc -m equally fast to wc -c in this case. > + /* > + * Line counting is split out because it's a lot faster to get > + * lines than to get words, since the word count requires some > + * logic. > + */ > + if (doline || dochar) { > + while ((len = read(fd, buf, MAXBSIZE))) { > + if (len == -1) { > + xo_warn("%s: read", file); > + (void)close(fd); > + return (1); > + } > + if (siginfo) { > + show_cnt(file, linect, wordct, charct, > + llct); > + } Style bugs: - excessive line splitting - excessve parenthses The second one was in the old code. The first one was not in the old code since the splitting was needed because the indentation was larger. The siginfo checks in the inner loop of the slow case help make it slower. Here there is only 1 per read so the pessimization is small. > + charct += len; > + if (doline) { > for (p = buf; len--; ++p) > if (*p == '\n') { > if (tmpll > llct) If doing only chars, then this just adds up the byte counts, except for hair like the error checks (needed) and siginfo tests (hair). Old versions would have been much simpler using unsafe signal handlers. This doesn't require adding siginfo checks in all i/o loops, but just prints immediately and usually unsafely in signal handlers. I think the "safe" method doesn't even work for large i/o's or small blocked i/o's. Unsafe siginfo prints in the middle of the i/o. Most BSD programs can't handle EINTR in i/o loops, so most siginfo setups preserve the default restarting of syscalls, although not restarting is required to get back to the i/o loops to print. > + /* > + * If all we need is the number of characters and it's a > + * regular file, just stat the puppy. > + */ The comment is still precious, and is now misformatted by not adjusting for the new indentation. > + if (dochar || domulti) { > + if (fstat(fd, &sb)) { > + xo_warn("%s: fstat", file); > + (void)close(fd); > + return (1); > + } > + if (S_ISREG(sb.st_mode)) { > + reset_siginfo(); > + charct = sb.st_size; > show_cnt(file, linect, wordct, charct, llct); > + tcharct += charct; > (void)close(fd); > return (0); > - } This naively trusts S_ISREG() to work, so never worked on FreeBSD's irregular "regular" files in procfs and perhaps other places. Similar checks come close to breaking cp and cmp on these files. But cp and cmp do dubious mmapping() and differently bad fallback to a slow case. mmap() fails for most irregular regular files, so the slow case is reached, wc could also use mmap() if it cared about efficiency, but this is hard to do right. No FreeBSD tilities understand buffer sizing even for read() and write(), and mmap() is harder. The slow case in wc is too slow fo better i/o to make much difference. wc -c on a regular file doesn't do i/o. This leaves only wc -l as possibily benefiting from mmap(). cmp is too agressive using mmap(). For regular files, it tries to map the whole file, and falls back to a very slow method using getc() if mmap() fails. For non-regular files, it always uses the slow method This method wastes a lot of CPU for getc() and wastes a lot of bandwith for some file types using the st_blksize pessimizations. Mapping large files busts caches just to allow a simpler terminating condition which saves a few cycles per char. Comparison uses a slow per-char method in all cases to simplify printing differences for the usual case. cp still uses the 25+ year old option VM_AND_BUFFER_CACHE_SYNCHRONIZED in its Makefile in case vm is still 25 years old. Other utilities just assume that mmap() works and that using it is actually an optimization. cp still uses the 25+ year old hard coded limit of 8MB on mmapping(). That used to be too large, but is now a bit small. However, with more caching everywhere it is hard to know the best size and method. I don't like the mmap() method, but it works best for my usual case of lots small files in the buffer cache. All methods are fast then. For large files only on disks, everything is slow and mmamp() makes little difference to the speed of the copy. It might use less CPU but waste more memory. For very large files, it is clearly worst to map whole files like cmp does. This wastes memory in the application and gives vm the wrong hint that the whole files will be used again soon. cp's window of 8MB is not too bad. Perhaps smaller is better for data that won't be used again soon. Then we only want the freatures of mmap that allow it to reduce copying and buffering. cp sometimes knows when the data won't be used again soon because it is copying large data (large files or many small files). I debugged while wc -m doesn't work as documented or as the code seems to support for locales that don't support multibyte characters. It is just that -m turns off dochar. This used to have no effect since the wc -c used the slow case like wc -m. Now the complicated logic is broken. The fastest case of wc -c (where it is supposed to just stat the file()) is also broken by essentially the same error. Now this case use the new second-fastest read() method for wc -c. Bizarrely, wc -m still works as intended by using the fastests case. Code with broken logic: X if (doword || (domulti && MB_CUR_MAX != 1)) X goto word; The point of this MB_CUR_MAX != 1 check is to ensure reaching the slow case for multi-byte characters. Otherwise, we would fall through to test for the fastest case. The test there (and others before there) depends on testing MB_CUR_MAX here. X /* X * Line counting is split out because it's a lot faster to get X * lines than to get words, since the word count requires some X * logic. X */ X if (doline || dochar) { This used to only test doline (but handle dochar). Testing dochar here breaks the fastest case for dochar (but not for domulti) by handling dochar here in a slower way. X [... rest of second-fastest case] X } X /* X * If all we need is the number of characters and it's a X * regular file, just stat the puppy. X */ X if (dochar || domulti) { This used to handle dochar and the width 1 case of domutli in the fastest way. It still works for domulti, but is unreachable for dochar, since dochar was eaten above. X [... fastest case using fstat()] X } To fix this, first move the fstat() case earlier. The condition for using this case can be written as (doline == 0). This is clearer than a testing all the flags again and much clearer than testing only half the flags again as is done now. Then after handling the fastest case, don't test any more, and reduce the indentation. The test in the current code is the same as a null test except it has different bugs than a null test. We want to treat -m as -c, so the test should be of (dochar || domulti || doline), but one of thes flags is known to be set since doword is known to be clear. The current test just breaks the fastest case for -c and the second-fastest case for -m, but avoids breaking the fastest case for -m. Actually, the broken cases for -m are reversed when -l is used. Then -m behaves the same as -c for width 1. Perhaps some more reorganization can be used to redce the indentation. Gotos are already used to do not much more than reduce indentation. Bruce From owner-svn-src-all@freebsd.org Sun Dec 10 08:55:49 2017 Return-Path: Delivered-To: svn-src-all@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 CB1FBE867AF; Sun, 10 Dec 2017 08:55:49 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74D05691E3; Sun, 10 Dec 2017 08:55:49 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBA8tmnW026856; Sun, 10 Dec 2017 08:55:48 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBA8tmac026855; Sun, 10 Dec 2017 08:55:48 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201712100855.vBA8tmac026855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 10 Dec 2017 08:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326740 - head/contrib/jemalloc/include/jemalloc/internal X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/contrib/jemalloc/include/jemalloc/internal X-SVN-Commit-Revision: 326740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 08:55:49 -0000 Author: mmel Date: Sun Dec 10 08:55:48 2017 New Revision: 326740 URL: https://svnweb.freebsd.org/changeset/base/326740 Log: Relax too restrictive assert. The problem has been reported to upstream and similar change will be included in next jemalloc release. Submitted by: David Goldblatt MFC after: 2 weeks Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h Sun Dec 10 04:43:27 2017 (r326739) +++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h Sun Dec 10 08:55:48 2017 (r326740) @@ -91,9 +91,11 @@ idalloctm(tsdn_t *tsdn, void *ptr, tcache_t *tcache, a if (config_stats && is_internal) { arena_internal_sub(iaalloc(tsdn, ptr), isalloc(tsdn, ptr)); } +#if 0 if (!is_internal && tsd_reentrancy_level_get(tsdn_tsd(tsdn)) != 0) { assert(tcache == NULL); } +#endif arena_dalloc(tsdn, ptr, tcache, alloc_ctx, slow_path); } From owner-svn-src-all@freebsd.org Sun Dec 10 09:15:38 2017 Return-Path: Delivered-To: svn-src-all@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 964E0E871AA; Sun, 10 Dec 2017 09:15:38 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 625F569D14; Sun, 10 Dec 2017 09:15:38 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBA9Fb0Z035416; Sun, 10 Dec 2017 09:15:37 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBA9Fb79035415; Sun, 10 Dec 2017 09:15:37 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201712100915.vBA9Fb79035415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 10 Dec 2017 09:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326741 - head/contrib/jemalloc/include/jemalloc/internal X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/contrib/jemalloc/include/jemalloc/internal X-SVN-Commit-Revision: 326741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 09:15:38 -0000 Author: mmel Date: Sun Dec 10 09:15:37 2017 New Revision: 326741 URL: https://svnweb.freebsd.org/changeset/base/326741 Log: Revert r326740. I committed wrong diff. Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h Sun Dec 10 08:55:48 2017 (r326740) +++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h Sun Dec 10 09:15:37 2017 (r326741) @@ -91,11 +91,9 @@ idalloctm(tsdn_t *tsdn, void *ptr, tcache_t *tcache, a if (config_stats && is_internal) { arena_internal_sub(iaalloc(tsdn, ptr), isalloc(tsdn, ptr)); } -#if 0 if (!is_internal && tsd_reentrancy_level_get(tsdn_tsd(tsdn)) != 0) { assert(tcache == NULL); } -#endif arena_dalloc(tsdn, ptr, tcache, alloc_ctx, slow_path); } From owner-svn-src-all@freebsd.org Sun Dec 10 09:17:22 2017 Return-Path: Delivered-To: svn-src-all@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 EAAD7E87256; Sun, 10 Dec 2017 09:17:22 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6C9469E91; Sun, 10 Dec 2017 09:17:22 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBA9HLdL035514; Sun, 10 Dec 2017 09:17:21 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBA9HLPl035513; Sun, 10 Dec 2017 09:17:21 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201712100917.vBA9HLPl035513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 10 Dec 2017 09:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326742 - head/contrib/jemalloc/include/jemalloc/internal X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/contrib/jemalloc/include/jemalloc/internal X-SVN-Commit-Revision: 326742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 09:17:23 -0000 Author: mmel Date: Sun Dec 10 09:17:21 2017 New Revision: 326742 URL: https://svnweb.freebsd.org/changeset/base/326742 Log: Relax too restrictive assert. The problem has been reported to upstream and similar change will be included in next jemalloc release. Submitted by: David Goldblatt MFC after: 2 weeks Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h Sun Dec 10 09:15:37 2017 (r326741) +++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h Sun Dec 10 09:17:21 2017 (r326742) @@ -91,7 +91,8 @@ idalloctm(tsdn_t *tsdn, void *ptr, tcache_t *tcache, a if (config_stats && is_internal) { arena_internal_sub(iaalloc(tsdn, ptr), isalloc(tsdn, ptr)); } - if (!is_internal && tsd_reentrancy_level_get(tsdn_tsd(tsdn)) != 0) { + if (!is_internal && !tsdn_null(tsdn) && + tsd_reentrancy_level_get(tsdn_tsd(tsdn)) != 0) { assert(tcache == NULL); } arena_dalloc(tsdn, ptr, tcache, alloc_ctx, slow_path); From owner-svn-src-all@freebsd.org Sun Dec 10 12:25:34 2017 Return-Path: Delivered-To: svn-src-all@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 0D0EEE8B370; Sun, 10 Dec 2017 12:25:34 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBA626F0D4; Sun, 10 Dec 2017 12:25:33 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBACPW63014247; Sun, 10 Dec 2017 12:25:32 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBACPWEC014242; Sun, 10 Dec 2017 12:25:32 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201712101225.vBACPWEC014242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sun, 10 Dec 2017 12:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326743 - in stable/11/sys: amd64/cloudabi32 amd64/cloudabi64 arm/cloudabi32 arm64/cloudabi64 i386/cloudabi32 X-SVN-Group: stable-11 X-SVN-Commit-Author: ed X-SVN-Commit-Paths: in stable/11/sys: amd64/cloudabi32 amd64/cloudabi64 arm/cloudabi32 arm64/cloudabi64 i386/cloudabi32 X-SVN-Commit-Revision: 326743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 12:25:34 -0000 Author: ed Date: Sun Dec 10 12:25:32 2017 New Revision: 326743 URL: https://svnweb.freebsd.org/changeset/base/326743 Log: MFC r326228 and r326229: Use TO_PTR() to convert integers to pointers. For FreeBSD/arm64's cloudabi32 support, I'm going to need a TO_PTR() in this place. Also use it for all of the other source files, so that the difference remains as minimal as possible. Modified: stable/11/sys/amd64/cloudabi32/cloudabi32_sysvec.c stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c stable/11/sys/arm/cloudabi32/cloudabi32_sysvec.c stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c stable/11/sys/i386/cloudabi32/cloudabi32_sysvec.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- stable/11/sys/amd64/cloudabi32/cloudabi32_sysvec.c Sun Dec 10 09:17:21 2017 (r326742) +++ stable/11/sys/amd64/cloudabi32/cloudabi32_sysvec.c Sun Dec 10 12:25:32 2017 (r326743) @@ -86,7 +86,7 @@ cloudabi32_proc_setregs(struct thread *td, struct imag { ia32_setregs(td, imgp, stack); - (void)cpu_set_user_tls(td, (void *)stack); + (void)cpu_set_user_tls(td, TO_PTR(stack)); } static int Modified: stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c Sun Dec 10 09:17:21 2017 (r326742) +++ stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c Sun Dec 10 12:25:32 2017 (r326743) @@ -83,7 +83,7 @@ cloudabi64_proc_setregs(struct thread *td, struct imag regs = td->td_frame; regs->tf_rdi = stack + sizeof(register_t) + roundup(sizeof(cloudabi64_tcb_t), sizeof(register_t)); - (void)cpu_set_user_tls(td, (void *)stack); + (void)cpu_set_user_tls(td, TO_PTR(stack)); } static int @@ -188,7 +188,7 @@ cloudabi64_thread_setregs(struct thread *td, frame->tf_rdi = td->td_tid; frame->tf_rsi = attr->argument; - return (cpu_set_user_tls(td, (void *)tcbptr)); + return (cpu_set_user_tls(td, TO_PTR(tcbptr))); } static struct sysentvec cloudabi64_elf_sysvec = { Modified: stable/11/sys/arm/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- stable/11/sys/arm/cloudabi32/cloudabi32_sysvec.c Sun Dec 10 09:17:21 2017 (r326742) +++ stable/11/sys/arm/cloudabi32/cloudabi32_sysvec.c Sun Dec 10 12:25:32 2017 (r326743) @@ -63,7 +63,7 @@ cloudabi32_proc_setregs(struct thread *td, struct imag regs = td->td_frame; regs->tf_r0 = td->td_retval[0] = stack + roundup(sizeof(cloudabi32_tcb_t), sizeof(register_t)); - (void)cpu_set_user_tls(td, (void *)stack); + (void)cpu_set_user_tls(td, TO_PTR(stack)); } static int @@ -165,7 +165,7 @@ cloudabi32_thread_setregs(struct thread *td, frame->tf_r1 = attr->argument; /* Set up TLS. */ - return (cpu_set_user_tls(td, (void *)tcb)); + return (cpu_set_user_tls(td, TO_PTR(tcb))); } static struct sysentvec cloudabi32_elf_sysvec = { Modified: stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c Sun Dec 10 09:17:21 2017 (r326742) +++ stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c Sun Dec 10 12:25:32 2017 (r326743) @@ -63,7 +63,7 @@ cloudabi64_proc_setregs(struct thread *td, struct imag regs = td->td_frame; regs->tf_x[0] = td->td_retval[0] = stack + roundup(sizeof(cloudabi64_tcb_t), sizeof(register_t)); - (void)cpu_set_user_tls(td, (void *)stack); + (void)cpu_set_user_tls(td, TO_PTR(stack)); } static int @@ -157,7 +157,7 @@ cloudabi64_thread_setregs(struct thread *td, frame->tf_x[1] = attr->argument; /* Set up TLS. */ - return (cpu_set_user_tls(td, (void *)tcb)); + return (cpu_set_user_tls(td, TO_PTR(tcb))); } static struct sysentvec cloudabi64_elf_sysvec = { Modified: stable/11/sys/i386/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- stable/11/sys/i386/cloudabi32/cloudabi32_sysvec.c Sun Dec 10 09:17:21 2017 (r326742) +++ stable/11/sys/i386/cloudabi32/cloudabi32_sysvec.c Sun Dec 10 12:25:32 2017 (r326743) @@ -81,7 +81,7 @@ cloudabi32_proc_setregs(struct thread *td, struct imag { exec_setregs(td, imgp, stack); - (void)cpu_set_user_tls(td, (void *)stack); + (void)cpu_set_user_tls(td, TO_PTR(stack)); } static int From owner-svn-src-all@freebsd.org Sun Dec 10 13:45:00 2017 Return-Path: Delivered-To: svn-src-all@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 0445AE8D1DE; Sun, 10 Dec 2017 13:45:00 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3C7171CEB; Sun, 10 Dec 2017 13:44:59 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBADiwbr048067; Sun, 10 Dec 2017 13:44:58 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBADiw8l048065; Sun, 10 Dec 2017 13:44:58 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201712101344.vBADiw8l048065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sun, 10 Dec 2017 13:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326744 - stable/11/sys/geom/raid X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sys/geom/raid X-SVN-Commit-Revision: 326744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 13:45:00 -0000 Author: eugen Date: Sun Dec 10 13:44:58 2017 New Revision: 326744 URL: https://svnweb.freebsd.org/changeset/base/326744 Log: MFC r326655,326668: correct error handling for graid SINGLE/CONCAT/RAID5 volumes. Approved by: mav (mentor) Modified: stable/11/sys/geom/raid/tr_concat.c stable/11/sys/geom/raid/tr_raid5.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/raid/tr_concat.c ============================================================================== --- stable/11/sys/geom/raid/tr_concat.c Sun Dec 10 12:25:32 2017 (r326743) +++ stable/11/sys/geom/raid/tr_concat.c Sun Dec 10 13:44:58 2017 (r326744) @@ -339,7 +339,7 @@ g_raid_tr_iodone_concat(struct g_raid_tr_object *tr, pbp->bio_inbed++; if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length; - g_raid_iodone(pbp, bp->bio_error); + g_raid_iodone(pbp, pbp->bio_error); } } Modified: stable/11/sys/geom/raid/tr_raid5.c ============================================================================== --- stable/11/sys/geom/raid/tr_raid5.c Sun Dec 10 12:25:32 2017 (r326743) +++ stable/11/sys/geom/raid/tr_raid5.c Sun Dec 10 13:44:58 2017 (r326744) @@ -371,15 +371,15 @@ g_raid_tr_iodone_raid5(struct g_raid_tr_object *tr, struct g_raid_subdisk *sd, struct bio *bp) { struct bio *pbp; - int error; pbp = bp->bio_parent; + if (pbp->bio_error == 0) + pbp->bio_error = bp->bio_error; pbp->bio_inbed++; - error = bp->bio_error; g_destroy_bio(bp); if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length; - g_raid_iodone(pbp, error); + g_raid_iodone(pbp, pbp->bio_error); } } From owner-svn-src-all@freebsd.org Sun Dec 10 13:45:43 2017 Return-Path: Delivered-To: svn-src-all@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 37B93E8D24A; Sun, 10 Dec 2017 13:45:43 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 023F271E22; Sun, 10 Dec 2017 13:45:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBADjfDt048144; Sun, 10 Dec 2017 13:45:41 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBADjf0x048142; Sun, 10 Dec 2017 13:45:41 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201712101345.vBADjf0x048142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sun, 10 Dec 2017 13:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326745 - stable/10/sys/geom/raid X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/sys/geom/raid X-SVN-Commit-Revision: 326745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 13:45:43 -0000 Author: eugen Date: Sun Dec 10 13:45:41 2017 New Revision: 326745 URL: https://svnweb.freebsd.org/changeset/base/326745 Log: MFC r326655,326668: correct error handling for graid SINGLE/CONCAT/RAID5 volumes. Approved by: mav (mentor) Modified: stable/10/sys/geom/raid/tr_concat.c stable/10/sys/geom/raid/tr_raid5.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/raid/tr_concat.c ============================================================================== --- stable/10/sys/geom/raid/tr_concat.c Sun Dec 10 13:44:58 2017 (r326744) +++ stable/10/sys/geom/raid/tr_concat.c Sun Dec 10 13:45:41 2017 (r326745) @@ -339,7 +339,7 @@ g_raid_tr_iodone_concat(struct g_raid_tr_object *tr, pbp->bio_inbed++; if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length; - g_raid_iodone(pbp, bp->bio_error); + g_raid_iodone(pbp, pbp->bio_error); } } Modified: stable/10/sys/geom/raid/tr_raid5.c ============================================================================== --- stable/10/sys/geom/raid/tr_raid5.c Sun Dec 10 13:44:58 2017 (r326744) +++ stable/10/sys/geom/raid/tr_raid5.c Sun Dec 10 13:45:41 2017 (r326745) @@ -371,15 +371,15 @@ g_raid_tr_iodone_raid5(struct g_raid_tr_object *tr, struct g_raid_subdisk *sd, struct bio *bp) { struct bio *pbp; - int error; pbp = bp->bio_parent; + if (pbp->bio_error == 0) + pbp->bio_error = bp->bio_error; pbp->bio_inbed++; - error = bp->bio_error; g_destroy_bio(bp); if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length; - g_raid_iodone(pbp, error); + g_raid_iodone(pbp, pbp->bio_error); } } From owner-svn-src-all@freebsd.org Sun Dec 10 13:58:38 2017 Return-Path: Delivered-To: svn-src-all@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 7DE8EE8D530; Sun, 10 Dec 2017 13:58:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4936172389; Sun, 10 Dec 2017 13:58:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBADwbIV052455; Sun, 10 Dec 2017 13:58:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBADwbUv052454; Sun, 10 Dec 2017 13:58:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712101358.vBADwbUv052454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 10 Dec 2017 13:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326746 - in stable: 10/lib/msun/man 11/lib/msun/man X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/msun/man 11/lib/msun/man X-SVN-Commit-Revision: 326746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 13:58:38 -0000 Author: dim Date: Sun Dec 10 13:58:37 2017 New Revision: 326746 URL: https://svnweb.freebsd.org/changeset/base/326746 Log: MFC r326669: Remove the sentence in math(3) about some long double math functions not being available. Submitted by: Steve Kargl Modified: stable/11/lib/msun/man/math.3 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/msun/man/math.3 Directory Properties: stable/10/ (props changed) Modified: stable/11/lib/msun/man/math.3 ============================================================================== --- stable/11/lib/msun/man/math.3 Sun Dec 10 13:45:41 2017 (r326745) +++ stable/11/lib/msun/man/math.3 Sun Dec 10 13:58:37 2017 (r326746) @@ -28,7 +28,7 @@ .\" from: @(#)math.3 6.10 (Berkeley) 5/6/91 .\" $FreeBSD$ .\" -.Dd December 5, 2010 +.Dd December 7, 2017 .Dt MATH 3 .Os .Sh NAME @@ -235,12 +235,6 @@ and .Vt long double values, were written for or imported into subsequent versions of FreeBSD. .Sh BUGS -Some of the -.Vt "long double" -math functions in -.St -isoC-99 -are not available. -.Pp Many of the routines to compute transcendental functions produce inaccurate results in other than the default rounding mode. .Pp From owner-svn-src-all@freebsd.org Sun Dec 10 13:58:38 2017 Return-Path: Delivered-To: svn-src-all@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 85E11E8D531; Sun, 10 Dec 2017 13:58:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51BF17238A; Sun, 10 Dec 2017 13:58:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBADwbNK052461; Sun, 10 Dec 2017 13:58:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBADwbm2052460; Sun, 10 Dec 2017 13:58:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712101358.vBADwbm2052460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 10 Dec 2017 13:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326746 - in stable: 10/lib/msun/man 11/lib/msun/man X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/msun/man 11/lib/msun/man X-SVN-Commit-Revision: 326746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 13:58:38 -0000 Author: dim Date: Sun Dec 10 13:58:37 2017 New Revision: 326746 URL: https://svnweb.freebsd.org/changeset/base/326746 Log: MFC r326669: Remove the sentence in math(3) about some long double math functions not being available. Submitted by: Steve Kargl Modified: stable/10/lib/msun/man/math.3 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/msun/man/math.3 Directory Properties: stable/11/ (props changed) Modified: stable/10/lib/msun/man/math.3 ============================================================================== --- stable/10/lib/msun/man/math.3 Sun Dec 10 13:45:41 2017 (r326745) +++ stable/10/lib/msun/man/math.3 Sun Dec 10 13:58:37 2017 (r326746) @@ -28,7 +28,7 @@ .\" from: @(#)math.3 6.10 (Berkeley) 5/6/91 .\" $FreeBSD$ .\" -.Dd December 5, 2010 +.Dd December 7, 2017 .Dt MATH 3 .Os .Sh NAME @@ -235,12 +235,6 @@ and .Vt long double values, were written for or imported into subsequent versions of FreeBSD. .Sh BUGS -Some of the -.Vt "long double" -math functions in -.St -isoC-99 -are not available. -.Pp Many of the routines to compute transcendental functions produce inaccurate results in other than the default rounding mode. .Pp From owner-svn-src-all@freebsd.org Sun Dec 10 14:49:07 2017 Return-Path: Delivered-To: svn-src-all@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 DC271E8E485; Sun, 10 Dec 2017 14:49:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A398473917; Sun, 10 Dec 2017 14:49:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBAEn65M073450; Sun, 10 Dec 2017 14:49:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBAEn6fv073449; Sun, 10 Dec 2017 14:49:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712101449.vBAEn6fv073449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 10 Dec 2017 14:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326747 - in stable: 10/lib/msun/bsdsrc 11/lib/msun/bsdsrc X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/msun/bsdsrc 11/lib/msun/bsdsrc X-SVN-Commit-Revision: 326747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 14:49:08 -0000 Author: dim Date: Sun Dec 10 14:49:06 2017 New Revision: 326747 URL: https://svnweb.freebsd.org/changeset/base/326747 Log: MFC r326670: Remove an unused incude from lib/msun/bsdsrc/b_log.c. Submitted by: Steve Kargl Modified: stable/11/lib/msun/bsdsrc/b_log.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/msun/bsdsrc/b_log.c Directory Properties: stable/10/ (props changed) Modified: stable/11/lib/msun/bsdsrc/b_log.c ============================================================================== --- stable/11/lib/msun/bsdsrc/b_log.c Sun Dec 10 13:58:37 2017 (r326746) +++ stable/11/lib/msun/bsdsrc/b_log.c Sun Dec 10 14:49:06 2017 (r326747) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include "mathimpl.h" From owner-svn-src-all@freebsd.org Sun Dec 10 14:49:08 2017 Return-Path: Delivered-To: svn-src-all@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 348A1E8E489; Sun, 10 Dec 2017 14:49:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1D1773918; Sun, 10 Dec 2017 14:49:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBAEn6Bq073457; Sun, 10 Dec 2017 14:49:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBAEn6TI073456; Sun, 10 Dec 2017 14:49:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712101449.vBAEn6TI073456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 10 Dec 2017 14:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326747 - in stable: 10/lib/msun/bsdsrc 11/lib/msun/bsdsrc X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/msun/bsdsrc 11/lib/msun/bsdsrc X-SVN-Commit-Revision: 326747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 14:49:08 -0000 Author: dim Date: Sun Dec 10 14:49:06 2017 New Revision: 326747 URL: https://svnweb.freebsd.org/changeset/base/326747 Log: MFC r326670: Remove an unused incude from lib/msun/bsdsrc/b_log.c. Submitted by: Steve Kargl Modified: stable/10/lib/msun/bsdsrc/b_log.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/msun/bsdsrc/b_log.c Directory Properties: stable/11/ (props changed) Modified: stable/10/lib/msun/bsdsrc/b_log.c ============================================================================== --- stable/10/lib/msun/bsdsrc/b_log.c Sun Dec 10 13:58:37 2017 (r326746) +++ stable/10/lib/msun/bsdsrc/b_log.c Sun Dec 10 14:49:06 2017 (r326747) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include "mathimpl.h" From owner-svn-src-all@freebsd.org Sun Dec 10 16:43:01 2017 Return-Path: Delivered-To: svn-src-all@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 4080AE904F7; Sun, 10 Dec 2017 16:43:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 142A476755; Sun, 10 Dec 2017 16:43:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBAGh0bS023429; Sun, 10 Dec 2017 16:43:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBAGh01c023427; Sun, 10 Dec 2017 16:43:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712101643.vBAGh01c023427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 10 Dec 2017 16:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326748 - head/lib/msun/man X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/lib/msun/man X-SVN-Commit-Revision: 326748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 16:43:01 -0000 Author: dim Date: Sun Dec 10 16:42:59 2017 New Revision: 326748 URL: https://svnweb.freebsd.org/changeset/base/326748 Log: Document the existence and precision of the remaining long double functions for which an imprecise stub implementation was added in r255294, namely powl(3) and tgammal(3). Submitted by: Steve Kargl MFC after: 3 days Modified: head/lib/msun/man/exp.3 head/lib/msun/man/lgamma.3 Modified: head/lib/msun/man/exp.3 ============================================================================== --- head/lib/msun/man/exp.3 Sun Dec 10 14:49:06 2017 (r326747) +++ head/lib/msun/man/exp.3 Sun Dec 10 16:42:59 2017 (r326748) @@ -28,7 +28,7 @@ .\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91 .\" $FreeBSD$ .\" -.Dd November 9, 2015 +.Dd December 8, 2017 .Dt EXP 3 .Os .Sh NAME @@ -180,6 +180,15 @@ If 0**0 = 1, then then \*(Na**0 = 1 too because x**0 = 1 for all finite and infinite x, i.e., independently of x. .El +.Sh BUGS +To conform with newer C/C++ standards, a stub implementation for +.Nm powl +was committed to the math library, where +.Nm powl +is mapped to +.Nm pow . +Thus, the numerical accuracy is at most that of the 53-bit double +precision implementation. .Sh SEE ALSO .Xr fenv 3 , .Xr ldexp 3 , Modified: head/lib/msun/man/lgamma.3 ============================================================================== --- head/lib/msun/man/lgamma.3 Sun Dec 10 14:49:06 2017 (r326747) +++ head/lib/msun/man/lgamma.3 Sun Dec 10 16:42:59 2017 (r326748) @@ -28,7 +28,7 @@ .\" from: @(#)lgamma.3 6.6 (Berkeley) 12/3/92 .\" $FreeBSD$ .\" -.Dd September 12, 2014 +.Dd December 8, 2017 .Dt LGAMMA 3 .Os .Sh NAME @@ -43,7 +43,8 @@ .Nm gammaf , .Nm gammaf_r , .Nm tgamma , -.Nm tgammaf +.Nm tgammaf , +.Nm tgammal , .Nd log gamma functions, gamma function .Sh LIBRARY .Lb libm @@ -76,6 +77,8 @@ .Fn tgamma "double x" .Ft float .Fn tgammaf "float x" +.Ft "long double" +.Fn tgammal "long double x" .Sh DESCRIPTION .Fn lgamma x , .Fn lgammaf x , @@ -106,9 +109,10 @@ and but the caller must provide an integer to store the sign of \(*G(x). .Pp The -.Fn tgamma x +.Fn tgamma x , +.Fn tgammaf x , and -.Fn tgammaf x +.Fn tgammal x functions return \(*G(x), with no effect on .Fa signgam . .Pp @@ -166,6 +170,15 @@ non-positive integers. For large non-integer negative values, .Fn tgamma will underflow. +.Sh BUGS +To conform with newer C/C++ standards, a stub implementation for +.Nm tgammal +was committed to the math library, where +.Nm tgammal +is mapped to +.Nm tgammal . +Thus, the numerical accuracy is at most that of the 53-bit double +precision implementation. .Sh SEE ALSO .Xr math 3 .Sh STANDARDS @@ -174,8 +187,9 @@ The .Fn lgammaf , .Fn lgammal , .Fn tgamma , +.Fn tgammaf , and -.Fn tgammaf +.Fn tgammal functions are expected to conform to .St -isoC-99 . .Sh HISTORY From owner-svn-src-all@freebsd.org Sun Dec 10 17:56:05 2017 Return-Path: Delivered-To: svn-src-all@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 0DC50E92F78; Sun, 10 Dec 2017 17:56:05 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBA787A12B; Sun, 10 Dec 2017 17:56:04 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBAHu3tw052648; Sun, 10 Dec 2017 17:56:03 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBAHu3Qa052647; Sun, 10 Dec 2017 17:56:03 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201712101756.vBAHu3Qa052647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sun, 10 Dec 2017 17:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326749 - head/usr.bin/wc X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.bin/wc X-SVN-Commit-Revision: 326749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 17:56:05 -0000 Author: cem Date: Sun Dec 10 17:56:03 2017 New Revision: 326749 URL: https://svnweb.freebsd.org/changeset/base/326749 Log: wc(1): Restore regular file char count fast path fstat(2) is going to be a lot faster than reading all of the bytes in a file, if we just need a character count for a regular file. This fast path was accidentally broken in r326736. PR: 224160 Reported by: bde Sponsored by: Dell EMC Isilon Modified: head/usr.bin/wc/wc.c Modified: head/usr.bin/wc/wc.c ============================================================================== --- head/usr.bin/wc/wc.c Sun Dec 10 16:42:59 2017 (r326748) +++ head/usr.bin/wc/wc.c Sun Dec 10 17:56:03 2017 (r326749) @@ -213,51 +213,10 @@ cnt(const char *file) if (doword || (domulti && MB_CUR_MAX != 1)) goto word; /* - * Line counting is split out because it's a lot faster to get - * lines than to get words, since the word count requires some - * logic. + * If all we need is the number of characters and it's a regular file, + * just stat it. */ - if (doline || dochar) { - while ((len = read(fd, buf, MAXBSIZE))) { - if (len == -1) { - xo_warn("%s: read", file); - (void)close(fd); - return (1); - } - if (siginfo) { - show_cnt(file, linect, wordct, charct, - llct); - } - charct += len; - if (doline) { - for (p = buf; len--; ++p) - if (*p == '\n') { - if (tmpll > llct) - llct = tmpll; - tmpll = 0; - ++linect; - } else - tmpll++; - } - } - reset_siginfo(); - if (doline) - tlinect += linect; - if (dochar) - tcharct += charct; - if (dolongline) { - if (llct > tlongline) - tlongline = llct; - } - show_cnt(file, linect, wordct, charct, llct); - (void)close(fd); - return (0); - } - /* - * If all we need is the number of characters and it's a - * regular file, just stat the puppy. - */ - if (dochar || domulti) { + if (doline == 0) { if (fstat(fd, &sb)) { xo_warn("%s: fstat", file); (void)close(fd); @@ -272,6 +231,44 @@ cnt(const char *file) return (0); } } + /* + * For files we can't stat, or if we need line counting, slurp the + * file. Line counting is split out because it's a lot faster to get + * lines than to get words, since the word count requires locale + * handling. + */ + while ((len = read(fd, buf, MAXBSIZE))) { + if (len == -1) { + xo_warn("%s: read", file); + (void)close(fd); + return (1); + } + if (siginfo) + show_cnt(file, linect, wordct, charct, llct); + charct += len; + if (doline) { + for (p = buf; len--; ++p) + if (*p == '\n') { + if (tmpll > llct) + llct = tmpll; + tmpll = 0; + ++linect; + } else + tmpll++; + } + } + reset_siginfo(); + if (doline) + tlinect += linect; + if (dochar) + tcharct += charct; + if (dolongline) { + if (llct > tlongline) + tlongline = llct; + } + show_cnt(file, linect, wordct, charct, llct); + (void)close(fd); + return (0); /* Do it the hard way... */ word: gotsp = 1; From owner-svn-src-all@freebsd.org Sun Dec 10 18:55:44 2017 Return-Path: Delivered-To: svn-src-all@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 0BA24E95EC7; Sun, 10 Dec 2017 18:55:44 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B21167C7E6; Sun, 10 Dec 2017 18:55:43 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBAItgw9077612; Sun, 10 Dec 2017 18:55:42 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBAItgA3077611; Sun, 10 Dec 2017 18:55:42 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201712101855.vBAItgA3077611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 10 Dec 2017 18:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326750 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 326750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 18:55:44 -0000 Author: ian Date: Sun Dec 10 18:55:42 2017 New Revision: 326750 URL: https://svnweb.freebsd.org/changeset/base/326750 Log: Do not give up if writing to the chip's control and status registers fails during startup. When a brand new chip leaves the factory, it is in a special power-saving mode that disables most functions on the chip to save battery power. The chip is stuck in this mode until the first write to the time registers, which automatically clears the special power-saving mode and starts the oscillator. Also, the day-of-week register in this chip counts 1-7, not 0-6, so write the values accordingly. These changes are based on the patch submitted by Brian Scott, but I elimated warnings since this condition is expected, and added some comments, and so in general blame me for any mistakes. PR: 223642 Modified: head/sys/dev/iicbus/ds3231.c Modified: head/sys/dev/iicbus/ds3231.c ============================================================================== --- head/sys/dev/iicbus/ds3231.c Sun Dec 10 17:56:03 2017 (r326749) +++ head/sys/dev/iicbus/ds3231.c Sun Dec 10 18:55:42 2017 (r326750) @@ -427,13 +427,19 @@ ds3231_start(void *xdev) device_printf(sc->sc_dev, "WARNING: RTC clock stopped, check the battery.\n"); } - /* Ack any pending alarm interrupt. */ - if (ds3231_status_write(sc, 1, 1) != 0) - return; - /* Always enable the oscillator. */ - if (ds3231_ctrl_write(sc) != 0) - return; + /* + * Ack any pending alarm interrupts and clear the EOSC bit to ensure the + * clock runs even when on battery power. Do not give up if these + * writes fail, because a factory-fresh chip is in a special mode that + * disables much of the chip to save battery power, and the only thing + * that gets it out of that mode is writing to the time registers. In + * these pristine chips, the EOSC and alarm bits are zero already, so + * the first valid write of time will get everything running properly. + */ + ds3231_status_write(sc, 1, 1); + ds3231_ctrl_write(sc); + /* Temperature. */ SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, @@ -568,7 +574,7 @@ ds3231_settime(device_t dev, struct timespec *ts) data[DS3231_MINS] = TOBCD(ct.min); data[DS3231_HOUR] = TOBCD(ct.hour) | pmflags; data[DS3231_DATE] = TOBCD(ct.day); - data[DS3231_WEEKDAY] = ct.dow; + data[DS3231_WEEKDAY] = ct.dow + 1; data[DS3231_MONTH] = TOBCD(ct.mon); data[DS3231_YEAR] = TOBCD(ct.year % 100); if (sc->sc_last_c) From owner-svn-src-all@freebsd.org Sun Dec 10 19:22:45 2017 Return-Path: Delivered-To: svn-src-all@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 53E43E97BCC; Sun, 10 Dec 2017 19:22:45 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EB4C7DEF4; Sun, 10 Dec 2017 19:22:45 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBAJMim8089805; Sun, 10 Dec 2017 19:22:44 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBAJMiGb089804; Sun, 10 Dec 2017 19:22:44 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201712101922.vBAJMiGb089804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Sun, 10 Dec 2017 19:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326751 - stable/11/sys/dev/vmware/vmxnet3 X-SVN-Group: stable-11 X-SVN-Commit-Author: bryanv X-SVN-Commit-Paths: stable/11/sys/dev/vmware/vmxnet3 X-SVN-Commit-Revision: 326751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 19:22:45 -0000 Author: bryanv Date: Sun Dec 10 19:22:43 2017 New Revision: 326751 URL: https://svnweb.freebsd.org/changeset/base/326751 Log: MFC r326744: Correctly report the vmxnet3 link down media status Modified: stable/11/sys/dev/vmware/vmxnet3/if_vmx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/11/sys/dev/vmware/vmxnet3/if_vmx.c Sun Dec 10 18:55:42 2017 (r326750) +++ stable/11/sys/dev/vmware/vmxnet3/if_vmx.c Sun Dec 10 19:22:43 2017 (r326751) @@ -3485,14 +3485,15 @@ vmxnet3_media_status(struct ifnet *ifp, struct ifmedia sc = ifp->if_softc; - ifmr->ifm_active = IFM_ETHER | IFM_AUTO; ifmr->ifm_status = IFM_AVALID; + ifmr->ifm_active = IFM_ETHER; VMXNET3_CORE_LOCK(sc); - if (vmxnet3_link_is_up(sc) != 0) + if (vmxnet3_link_is_up(sc) != 0) { ifmr->ifm_status |= IFM_ACTIVE; - else - ifmr->ifm_status |= IFM_NONE; + ifmr->ifm_active |= IFM_AUTO; + } else + ifmr->ifm_active |= IFM_NONE; VMXNET3_CORE_UNLOCK(sc); } From owner-svn-src-all@freebsd.org Sun Dec 10 21:51:28 2017 Return-Path: Delivered-To: svn-src-all@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 A97D7E9E53F; Sun, 10 Dec 2017 21:51:28 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8354764C3D; Sun, 10 Dec 2017 21:51:28 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBALpROm051521; Sun, 10 Dec 2017 21:51:27 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBALpRGZ051520; Sun, 10 Dec 2017 21:51:27 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201712102151.vBALpRGZ051520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 10 Dec 2017 21:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326752 - head/stand/arm/uboot X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/stand/arm/uboot X-SVN-Commit-Revision: 326752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 21:51:28 -0000 Author: ian Date: Sun Dec 10 21:51:27 2017 New Revision: 326752 URL: https://svnweb.freebsd.org/changeset/base/326752 Log: Save and restore r9 register in arm ubldr. In old gcc 4.2, r9 was a callee- saved register, but in arm EABI it may be either callee-saved or dedicated to some special purpose (such as a TLS pointer). It appears clang does not treat it as a callee-saved register (instead using it as another work register, similar to r12). Another important side effect of these changes is that saving an extra register in the push/pop statements keeps the stack aligned to an 8-byte boundary during the self_reloc() call, as it always should have been. As stated in the PR... Essentially the important caller-saved registers are pushed (r0, r1, r9, lr) before the relocation call, and popped after. Then r8/r9 are saved as usual for the syscall trampoline, and lr is stored in r8 (now free) as a callee-saved value before calling into `main`. The call to `main` can no longer be a tail call because we must restore r9 especially after main returns (although since we have used r8 to hold lr we must also restore this). PR: 224008 Modified: head/stand/arm/uboot/start.S Modified: head/stand/arm/uboot/start.S ============================================================================== --- head/stand/arm/uboot/start.S Sun Dec 10 19:22:43 2017 (r326751) +++ head/stand/arm/uboot/start.S Sun Dec 10 21:51:27 2017 (r326752) @@ -46,11 +46,8 @@ _start: mcr p15, 0, ip, c1, c0, 0 #endif - /* - * Save r0 and r1 (argc and argv passed from u-boot), and lr (trashed - * by the call to self_reloc below) until we're ready to call main(). - */ - push {r0, r1, lr} + /* Save the arguments and return register before calling self_reloc */ + push {r0, r1, r9, lr} /* * Do self-relocation when the weak external symbol _DYNAMIC is non-NULL. @@ -68,22 +65,31 @@ _start: addne r1, r1, r0 /* r1 = dynamic section physaddr. */ blne _C_LABEL(self_reloc) /* Do reloc if _DYNAMIC is non-NULL. */ + /* Restore saved arguments */ + pop {r0, r1, r9, lr} + /* Hint where to look for the API signature */ ldr ip, =uboot_address str sp, [ip] - /* Save U-Boot's r8 and r9 */ + /* Save U-Boot's r8 and r9 for syscall trampoline */ ldr ip, =saved_regs - str r8, [ip, #0] - str r9, [ip, #4] + str r8, [ip, #0] /* old gd pointer (use to hold lr) */ + str r9, [ip, #4] /* new gd pointer */ /* - * First restore argc, argv, and the u-boot return address, then - * Start loader. This is basically a tail-recursion call; if main() - * returns, it returns to u-boot (which reports the value returned r0). + * Start loader. Save return address first (r8 is available from + * trampoline save). */ - pop {r0, r1, lr} - b main + mov r8, lr + bl main + mov lr, r8 + + /* Restore U-Boot environment */ + ldr ip, =saved_regs + ldr r8, [ip, #0] + ldr r9, [ip, #4] + mov pc, lr /* * Data for self-relocation, in the text segment for pc-rel access. From owner-svn-src-all@freebsd.org Sun Dec 10 23:03:14 2017 Return-Path: Delivered-To: svn-src-all@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 AAC0AEA0554; Sun, 10 Dec 2017 23:03:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7518F67372; Sun, 10 Dec 2017 23:03:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBAN3DsB082571; Sun, 10 Dec 2017 23:03:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBAN3DWL082570; Sun, 10 Dec 2017 23:03:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712102303.vBAN3DWL082570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 10 Dec 2017 23:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326753 - head/lib/msun/man X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/lib/msun/man X-SVN-Commit-Revision: 326753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 23:03:14 -0000 Author: dim Date: Sun Dec 10 23:03:13 2017 New Revision: 326753 URL: https://svnweb.freebsd.org/changeset/base/326753 Log: Correct r326748, indicating that tgammal(3) is mapped to tgamma(3), not to itself. Noticed by: jilles MFC after: 3 days Modified: head/lib/msun/man/lgamma.3 Modified: head/lib/msun/man/lgamma.3 ============================================================================== --- head/lib/msun/man/lgamma.3 Sun Dec 10 21:51:27 2017 (r326752) +++ head/lib/msun/man/lgamma.3 Sun Dec 10 23:03:13 2017 (r326753) @@ -176,7 +176,7 @@ To conform with newer C/C++ standards, a stub implemen was committed to the math library, where .Nm tgammal is mapped to -.Nm tgammal . +.Nm tgamma . Thus, the numerical accuracy is at most that of the 53-bit double precision implementation. .Sh SEE ALSO From owner-svn-src-all@freebsd.org Sun Dec 10 23:06:46 2017 Return-Path: Delivered-To: svn-src-all@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 9073DEA0741; Sun, 10 Dec 2017 23:06:46 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 522D667603; Sun, 10 Dec 2017 23:06:46 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBAN6jg8082724; Sun, 10 Dec 2017 23:06:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBAN6jdL082723; Sun, 10 Dec 2017 23:06:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201712102306.vBAN6jdL082723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 10 Dec 2017 23:06:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326754 - head/stand/uboot/lib X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/stand/uboot/lib X-SVN-Commit-Revision: 326754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 23:06:46 -0000 Author: ian Date: Sun Dec 10 23:06:45 2017 New Revision: 326754 URL: https://svnweb.freebsd.org/changeset/base/326754 Log: When building for arm arches, set PKGALIGN to the max cache line size supported by the arch, to meet u-boot's requirement that I/O be done in cache-aligned chunks. PR: 223977 Modified: head/stand/uboot/lib/libuboot.h Modified: head/stand/uboot/lib/libuboot.h ============================================================================== --- head/stand/uboot/lib/libuboot.h Sun Dec 10 23:03:13 2017 (r326753) +++ head/stand/uboot/lib/libuboot.h Sun Dec 10 23:06:45 2017 (r326754) @@ -45,9 +45,16 @@ struct uboot_devdesc #define d_disk d_kind.disk /* - * Default network packet alignment in memory + * Default network packet alignment in memory. On arm arches packets must be + * aligned to cacheline boundaries. */ +#if defined(__aarch64__) +#define PKTALIGN 128 +#elif defined(__arm__) +#define PKTALIGN 64 +#else #define PKTALIGN 32 +#endif int uboot_getdev(void **vdev, const char *devspec, const char **path); char *uboot_fmtdev(void *vdev); From owner-svn-src-all@freebsd.org Sun Dec 10 23:08:06 2017 Return-Path: Delivered-To: svn-src-all@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 C190BEA08B5; Sun, 10 Dec 2017 23:08:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 55C606791C; Sun, 10 Dec 2017 23:08:05 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id OAhReJeanss4TOAhSe7NR1; Sun, 10 Dec 2017 16:07:59 -0700 X-Authority-Analysis: v=2.2 cv=JuuBlIwC c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=ocR9PWop10UA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=GaScB4JjB8XvaHZ_hKcA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id ECE671572; Sun, 10 Dec 2017 15:07:56 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vBAN7u9v072531; Sun, 10 Dec 2017 15:07:56 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id vBAN7uUq072528; Sun, 10 Dec 2017 15:07:56 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201712102307.vBAN7uUq072528@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Andriy Gapon cc: Jeff Roberson , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326347 - in head/sys: kern sys vm In-Reply-To: Message from Andriy Gapon of "Thu, 07 Dec 2017 10:12:33 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 10 Dec 2017 15:07:56 -0800 X-CMAE-Envelope: MS4wfOeIl8YmC0lfX3Bay2wvp2BXYKjzPkypb3aJqQTu8bKm/TI0DiUloAbRyvPHIsszQVKAo0OUJArreM3XJTvmcLpUp1Se1tbMx2ulBfK1LF+7aFH/B8ZF Q6Sc3gKdjCylXdCKWuhjAb1ckn+x7Q5g0DzASabnmn7wTT+klt49zrIabh0NlaxWs79lFKE8/wevucwSNfuCYohwJGRs8Fgl4tAH9xnCALmAcNZ5VFruWs5P /8xYinVHlPWqAKQ8mbawxS3heP7FWN8fNuGrXFTmR+oo4mYD6kixcYFoom3n7DTaITDlfu2Cnolln6FWEkHJmg== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 23:08:06 -0000 In message , Andriy Gapon wri tes: > On 29/11/2017 01:40, Jeff Roberson wrote: > > Eliminate kmem_arena and kmem_object in preparation for further NUMA comm > its. > > > > The arena argument to kmem_*() is now only used in an assert. A follow-u > p > > commit will remove the argument altogether before we freeze the API for t > he > > next release. > > > > This replaces the hard limit on kmem size with a soft limit imposed by UM > A. When > > the soft limit is exceeded we periodically wakeup the UMA reclaim thread > to > > attempt to shrink KVA. On 32bit architectures this should behave much mo > re > > gracefully as we exhaust KVA. On 64bit the limits are likely never hit. > > > > Reviewed by: markj, kib (some objections) > > Discussed with: alc > > Tested by: pho > > Sponsored by: Netflix / Dell EMC Isilon > > Differential Revision: https://reviews.freebsd.org/D13187 > > > Given this bug report https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=22408 > 0#c3 > can we revert this commit until its impact on ZFS is examined (and fixed)? > > Unfortunately, there is no public comment from you at all. > Not even "yes, I am aware, will be looking into it". Until we can address the ARC breakage, can we revert this, please? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Dec 11 02:43:57 2017 Return-Path: Delivered-To: svn-src-all@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 B27CBE8357B; Mon, 11 Dec 2017 02:43:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F8696D3A3; Mon, 11 Dec 2017 02:43:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBB2huWf073807; Mon, 11 Dec 2017 02:43:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBB2huUg073806; Mon, 11 Dec 2017 02:43:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712110243.vBB2huUg073806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 11 Dec 2017 02:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326755 - head/tools/tools/nanobsd/embedded X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/tools/nanobsd/embedded X-SVN-Commit-Revision: 326755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 02:43:57 -0000 Author: imp Date: Mon Dec 11 02:43:56 2017 New Revision: 326755 URL: https://svnweb.freebsd.org/changeset/base/326755 Log: Fix the std-x86 layout to produce a bootable system. Due to limitations in mkimg we're still not quite to where I'd like to be (I'd like to put s3 first on the disk, then s1, but mkimg won't allow that currently). However, the resulting image now boots with qemu using: qemu-system-x86_64 -hdd $file -serial telnet::4444,server -nographic We'll need tweaks to create a specialized /etc/rc.d/growfs that can create a properly grown image for either the simple or ping-pong cases, but that will be later. Switched to pure serial console (-h) instead of video or serial (-P) since that fits this usecase better. Sponsored by: Netflix Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Sun Dec 10 23:06:45 2017 (r326754) +++ head/tools/tools/nanobsd/embedded/common Mon Dec 11 02:43:56 2017 (r326755) @@ -76,7 +76,7 @@ fi NANO_SLICE_FAT_SIZE=32m NANO_SLICE_CFG_SIZE=32m -NANO_BOOT2CFG="-P -S115200" +NANO_BOOT2CFG="-h -S115200" NANO_RAM_ETCSIZE=8192 NANO_RAM_TMPVARSIZE=8192 @@ -289,11 +289,13 @@ create_diskimage_mbr ( ) ( -o ${out} ;; std-x86) - # s1 is cfg, s2 is /, not sure how to make that - # boot (marked as active) with mkimg yet - mkimg -a 2 ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ - -p ${s2}:=${NANO_LOG}/_.s2 \ + # s3 is cfg, s1 is /, s2 is other / (s2 is created in first boot script) + mkimg -a 1 ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ + -p- \ + -p ${s3}:=${NANO_LOG}/_.s3 \ -o ${out} + + ;; std-uefi) # s1 is boot, s2 is cfg, s3 is /, not sure how to make that @@ -615,9 +617,9 @@ std-embedded) NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; std-x86) - NANO_SLICE_CFG=s1 - NANO_SLICE_ROOT=s2 - NANO_SLICE_ALTROOT=s3 + NANO_SLICE_CFG=s3 + NANO_SLICE_ROOT=s1 + NANO_SLICE_ALTROOT=s2 NANO_ROOT=${NANO_SLICE_ROOT}a NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; From owner-svn-src-all@freebsd.org Mon Dec 11 02:44:12 2017 Return-Path: Delivered-To: svn-src-all@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 84767E835C5; Mon, 11 Dec 2017 02:44:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BF6A6D4E0; Mon, 11 Dec 2017 02:44:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBB2iAIf073884; Mon, 11 Dec 2017 02:44:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBB2iATE073883; Mon, 11 Dec 2017 02:44:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712110244.vBB2iATE073883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 11 Dec 2017 02:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326756 - head/tools/tools/nanobsd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/tools/nanobsd X-SVN-Commit-Revision: 326756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 02:44:12 -0000 Author: imp Date: Mon Dec 11 02:44:10 2017 New Revision: 326756 URL: https://svnweb.freebsd.org/changeset/base/326756 Log: Add -I to just run the imaging part of nanobsd so you can test out changes to the packaging part of nanobsd more easily, or experiment with the image contents w/o regenerating a whole new image tree. This can save minutes when you don't need to do the installworld / installkernel, etc. Sponsored by: Netflix Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Mon Dec 11 02:43:56 2017 (r326755) +++ head/tools/tools/nanobsd/nanobsd.sh Mon Dec 11 02:44:10 2017 (r326756) @@ -44,12 +44,13 @@ do_installworld=true do_image=true do_copyout_partition=true do_native_xtools=false +do_prep_image=true # Pull in legacy stuff for now automatically . "${topdir}/legacy.sh" set +e -args=`getopt BKXWbc:fhiknqvw $*` +args=`getopt BKXWbc:fhiIknqvw $*` if [ $? -ne 0 ] ; then usage exit 2 @@ -123,6 +124,15 @@ do do_world=false shift ;; + -I) + do_world=false + do_kernel=false + do_installworld=false + do_installkernel=false + do_prep_image=false + do_image=true + shift + ;; --) shift break @@ -184,21 +194,27 @@ else pprint 2 "Skipping installworld (as instructed)" fi -if $do_native_xtools ; then +if ${do_native_xtools} ; then native_xtools fi -setup_nanobsd_etc +if ${do_prep_image} ; then + setup_nanobsd_etc +fi if $do_installkernel ; then install_kernel else pprint 2 "Skipping installkernel (as instructed)" fi -run_customize -setup_nanobsd -prune_usr -run_late_customize -fixup_before_diskimage +if $do_prep_image ; then + run_customize + setup_nanobsd + prune_usr + run_late_customize + fixup_before_diskimage +else + pprint 2 "Skipping image prep (as instructed)" +fi if $do_image ; then create_diskimage else From owner-svn-src-all@freebsd.org Mon Dec 11 02:44:16 2017 Return-Path: Delivered-To: svn-src-all@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 6771BE835FC; Mon, 11 Dec 2017 02:44:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 316CA6D4F9; Mon, 11 Dec 2017 02:44:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBB2iFD5073938; Mon, 11 Dec 2017 02:44:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBB2iFcE073937; Mon, 11 Dec 2017 02:44:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712110244.vBB2iFcE073937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 11 Dec 2017 02:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326757 - head/tools/tools/nanobsd/embedded X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/tools/nanobsd/embedded X-SVN-Commit-Revision: 326757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 02:44:16 -0000 Author: imp Date: Mon Dec 11 02:44:15 2017 New Revision: 326757 URL: https://svnweb.freebsd.org/changeset/base/326757 Log: Start adding commands that I know are good to build up residual knowledge about qemu's quirks. Other qemu commands are possible, but this is the quickest for testing. Sponsored by: Netflix Modified: head/tools/tools/nanobsd/embedded/qemu-amd64.cfg Modified: head/tools/tools/nanobsd/embedded/qemu-amd64.cfg ============================================================================== --- head/tools/tools/nanobsd/embedded/qemu-amd64.cfg Mon Dec 11 02:44:10 2017 (r326756) +++ head/tools/tools/nanobsd/embedded/qemu-amd64.cfg Mon Dec 11 02:44:15 2017 (r326757) @@ -32,3 +32,8 @@ NANO_NAME=qemu-amd64 . common # Pull in common definitions qemu_env + +# Run with: +# qemu-system-x86_64 -hdd $file -serial telnet::4444,server -nographic +# To get some breathing room on the image: +# qemu-img resize $file +2G From owner-svn-src-all@freebsd.org Mon Dec 11 04:32:38 2017 Return-Path: Delivered-To: svn-src-all@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 89D7CE8576B; Mon, 11 Dec 2017 04:32:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56EF270985; Mon, 11 Dec 2017 04:32:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBB4WbdF021092; Mon, 11 Dec 2017 04:32:37 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBB4WbnE021090; Mon, 11 Dec 2017 04:32:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201712110432.vBB4WbnE021090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 11 Dec 2017 04:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326758 - in head/sys/i386: conf include X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/i386: conf include X-SVN-Commit-Revision: 326758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 04:32:38 -0000 Author: cem Date: Mon Dec 11 04:32:37 2017 New Revision: 326758 URL: https://svnweb.freebsd.org/changeset/base/326758 Log: i386: Bump KSTACK_PAGES default to match amd64 Logically, extend r286288 to cover all threads, by default. The world has largely moved on from i386. Most FreeBSD users and developers test on amd64 hardware. For better or worse, we have written a non-trivial amount of kernel code that relies on stacks larger than 8 kB, and it "just works" on amd64, so there has been little incentive to shrink it. amd64 had its KSTACK_PAGES bumped to 4 back in Peter's initial AMD64 commit, r114349, in 2003. Since that time, i386 has limped along on a stack half the size. We've even observed the stack overflows years ago, but neglected to fix the issue; see the 20121223 and 20150728 entries in UPDATING. If anyone is concerned with this change, I suggest they configure their AMD64 kernels with KSTACK_PAGES 2 and fix the fallout there first. Eugene has identified a list of high stack usage functions in the first PR below. PR: 219476, 224218 Reported by: eugen@, Shreesh Holla Relnotes: maybe Sponsored by: Dell EMC Isilon Modified: head/sys/i386/conf/NOTES head/sys/i386/include/param.h Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Mon Dec 11 02:44:15 2017 (r326757) +++ head/sys/i386/conf/NOTES Mon Dec 11 04:32:37 2017 (r326758) @@ -968,7 +968,7 @@ device ndis # KSTACK_PAGES is the number of memory pages to assign to the kernel # stack of each thread. -options KSTACK_PAGES=3 +options KSTACK_PAGES=5 # Enable detailed accounting by the PV entry allocator. Modified: head/sys/i386/include/param.h ============================================================================== --- head/sys/i386/include/param.h Mon Dec 11 02:44:15 2017 (r326757) +++ head/sys/i386/include/param.h Mon Dec 11 04:32:37 2017 (r326758) @@ -113,7 +113,7 @@ #define IOPAGES 2 /* pages of i/o permission bitmap */ #ifndef KSTACK_PAGES -#define KSTACK_PAGES 2 /* Includes pcb! */ +#define KSTACK_PAGES 4 /* Includes pcb! */ #endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ #if KSTACK_PAGES < 4 From owner-svn-src-all@freebsd.org Mon Dec 11 04:40:27 2017 Return-Path: Delivered-To: svn-src-all@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 366FFE85927; Mon, 11 Dec 2017 04:40:27 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0213470C2E; Mon, 11 Dec 2017 04:40:26 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBB4eQXI021625; Mon, 11 Dec 2017 04:40:26 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBB4eQOS021624; Mon, 11 Dec 2017 04:40:26 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <201712110440.vBB4eQOS021624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 11 Dec 2017 04:40:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326759 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 326759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 04:40:27 -0000 Author: chuck Date: Mon Dec 11 04:40:25 2017 New Revision: 326759 URL: https://svnweb.freebsd.org/changeset/base/326759 Log: Add myself to committers-src.dot Reviewed by: ken, imp Approved by: ken (mentor), imp (mentor) Differential Revision: https://reviews.freebsd.org/D13406 Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Mon Dec 11 04:32:37 2017 (r326758) +++ head/share/misc/committers-src.dot Mon Dec 11 04:40:25 2017 (r326759) @@ -136,6 +136,7 @@ bryanv [label="Bryan Venteicher\nbryanv@FreeBSD.org\n2 bschmidt [label="Bernhard Schmidt\nbschmidt@FreeBSD.org\n2010/02/06"] bz [label="Bjoern A. Zeeb\nbz@FreeBSD.org\n2004/07/27"] cem [label="Conrad Meyer\ncem@FreeBSD.org\n2015/07/05"] +chuck [label="Chuck Tuffli\nchuck@FreeBSD.org\n2017/09/06"] cognet [label="Olivier Houchard\ncognet@FreeBSD.org\n2002/10/09"] cokane [label="Coleman Kane\ncokane@FreeBSD.org\n2000/06/19"] cperciva [label="Colin Percival\ncperciva@FreeBSD.org\n2004/01/20"] @@ -525,6 +526,7 @@ imp -> ambrisko imp -> andrew imp -> bmah imp -> bruno +imp -> chuck imp -> dmlb imp -> emax imp -> furuta @@ -616,6 +618,7 @@ julian -> mp kan -> kib ken -> asomers +ken -> chuck ken -> slm kib -> ae From owner-svn-src-all@freebsd.org Mon Dec 11 05:06:29 2017 Return-Path: Delivered-To: svn-src-all@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 7F059E8630A; Mon, 11 Dec 2017 05:06:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DB847181B; Mon, 11 Dec 2017 05:06:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBB56S7K034142; Mon, 11 Dec 2017 05:06:28 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBB56Sk5034141; Mon, 11 Dec 2017 05:06:28 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712110506.vBB56Sk5034141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 11 Dec 2017 05:06:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326760 - stable/11/usr.sbin/inetd X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/usr.sbin/inetd X-SVN-Commit-Revision: 326760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 05:06:29 -0000 Author: delphij Date: Mon Dec 11 05:06:28 2017 New Revision: 326760 URL: https://svnweb.freebsd.org/changeset/base/326760 Log: MFC r326244: Don't assign rs as we will assign it later. Modified: stable/11/usr.sbin/inetd/builtins.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/inetd/builtins.c ============================================================================== --- stable/11/usr.sbin/inetd/builtins.c Mon Dec 11 04:40:25 2017 (r326759) +++ stable/11/usr.sbin/inetd/builtins.c Mon Dec 11 05:06:28 2017 (r326760) @@ -167,10 +167,8 @@ chargen_stream(int s, struct servtab *sep) inetd_setproctitle(sep->se_service, s); - if (!endring) { + if (!endring) initring(); - rs = ring; - } text[LINESIZ] = '\r'; text[LINESIZ + 1] = '\n'; From owner-svn-src-all@freebsd.org Mon Dec 11 05:10:12 2017 Return-Path: Delivered-To: svn-src-all@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 E64E6E86494; Mon, 11 Dec 2017 05:10:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A24AF71AD3; Mon, 11 Dec 2017 05:10:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBB5ABKP034548; Mon, 11 Dec 2017 05:10:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBB5ABTH034547; Mon, 11 Dec 2017 05:10:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712110510.vBB5ABTH034547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 11 Dec 2017 05:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326761 - stable/10/usr.sbin/inetd X-SVN-Group: stable-10 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/10/usr.sbin/inetd X-SVN-Commit-Revision: 326761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 05:10:13 -0000 Author: delphij Date: Mon Dec 11 05:10:11 2017 New Revision: 326761 URL: https://svnweb.freebsd.org/changeset/base/326761 Log: MFC r326244: Don't assign rs as we will assign it later. Modified: stable/10/usr.sbin/inetd/builtins.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/inetd/builtins.c ============================================================================== --- stable/10/usr.sbin/inetd/builtins.c Mon Dec 11 05:06:28 2017 (r326760) +++ stable/10/usr.sbin/inetd/builtins.c Mon Dec 11 05:10:11 2017 (r326761) @@ -167,10 +167,8 @@ chargen_stream(int s, struct servtab *sep) inetd_setproctitle(sep->se_service, s); - if (!endring) { + if (!endring) initring(); - rs = ring; - } text[LINESIZ] = '\r'; text[LINESIZ + 1] = '\n'; From owner-svn-src-all@freebsd.org Mon Dec 11 05:19:46 2017 Return-Path: Delivered-To: svn-src-all@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 DBCAAE868A6; Mon, 11 Dec 2017 05:19:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A821A720CE; Mon, 11 Dec 2017 05:19:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBB5JjkZ038903; Mon, 11 Dec 2017 05:19:45 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBB5JjHg038902; Mon, 11 Dec 2017 05:19:45 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712110519.vBB5JjHg038902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 11 Dec 2017 05:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326762 - stable/11/usr.bin/find X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/usr.bin/find X-SVN-Commit-Revision: 326762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 05:19:47 -0000 Author: delphij Date: Mon Dec 11 05:19:45 2017 New Revision: 326762 URL: https://svnweb.freebsd.org/changeset/base/326762 Log: MFC r325723: find(1): Don't treat statfs() error as fatal in f_fstype, which can happen when a directory is removed in the middle of find. Instead of a full err(), allow find to continue, plus print a warning with exitstatus set when appropriate. Reported by: 100.chksetuid via gordon Reviewed by: jilles Modified: stable/11/usr.bin/find/function.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/find/function.c ============================================================================== --- stable/11/usr.bin/find/function.c Mon Dec 11 05:10:11 2017 (r326761) +++ stable/11/usr.bin/find/function.c Mon Dec 11 05:19:45 2017 (r326762) @@ -902,8 +902,13 @@ f_fstype(PLAN *plan, FTSENT *entry) } else p = NULL; - if (statfs(entry->fts_accpath, &sb)) - err(1, "%s", entry->fts_accpath); + if (statfs(entry->fts_accpath, &sb)) { + if (!ignore_readdir_race || errno != ENOENT) { + warn("statfs: %s", entry->fts_accpath); + exitstatus = 1; + } + return 0; + } if (p) { p[0] = save[0]; From owner-svn-src-all@freebsd.org Mon Dec 11 05:21:49 2017 Return-Path: Delivered-To: svn-src-all@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 EAF9DE869B9; Mon, 11 Dec 2017 05:21:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EF01723CA; Mon, 11 Dec 2017 05:21:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBB5Lm9C041979; Mon, 11 Dec 2017 05:21:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBB5LmE8041978; Mon, 11 Dec 2017 05:21:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712110521.vBB5LmE8041978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 11 Dec 2017 05:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326763 - stable/10/usr.bin/find X-SVN-Group: stable-10 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/10/usr.bin/find X-SVN-Commit-Revision: 326763 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 05:21:50 -0000 Author: delphij Date: Mon Dec 11 05:21:48 2017 New Revision: 326763 URL: https://svnweb.freebsd.org/changeset/base/326763 Log: MFC r325723: find(1): Don't treat statfs() error as fatal in f_fstype, which can happen when a directory is removed in the middle of find. Instead of a full err(), allow find to continue, plus print a warning with exitstatus set when appropriate. Reported by: 100.chksetuid via gordon Reviewed by: jilles Modified: stable/10/usr.bin/find/function.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/find/function.c ============================================================================== --- stable/10/usr.bin/find/function.c Mon Dec 11 05:19:45 2017 (r326762) +++ stable/10/usr.bin/find/function.c Mon Dec 11 05:21:48 2017 (r326763) @@ -896,8 +896,13 @@ f_fstype(PLAN *plan, FTSENT *entry) } else p = NULL; - if (statfs(entry->fts_accpath, &sb)) - err(1, "%s", entry->fts_accpath); + if (statfs(entry->fts_accpath, &sb)) { + if (!ignore_readdir_race || errno != ENOENT) { + warn("statfs: %s", entry->fts_accpath); + exitstatus = 1; + } + return 0; + } if (p) { p[0] = save[0]; From owner-svn-src-all@freebsd.org Mon Dec 11 09:19:56 2017 Return-Path: Delivered-To: svn-src-all@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 F2673E8B5AB; Mon, 11 Dec 2017 09:19:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E0317903B; Mon, 11 Dec 2017 09:19:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vBB9JhYe048303 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 Dec 2017 11:19:47 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vBB9JhYe048303 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vBB9JhQQ048302; Mon, 11 Dec 2017 11:19:43 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 11 Dec 2017 11:19:43 +0200 From: Konstantin Belousov To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Message-ID: <20171211091943.GF2272@kib.kiev.ua> References: <201712110432.vBB4WbnE021090@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201712110432.vBB4WbnE021090@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 09:19:56 -0000 On Mon, Dec 11, 2017 at 04:32:37AM +0000, Conrad Meyer wrote: > Author: cem > Date: Mon Dec 11 04:32:37 2017 > New Revision: 326758 > URL: https://svnweb.freebsd.org/changeset/base/326758 > > Log: > i386: Bump KSTACK_PAGES default to match amd64 i386 is not amd64, the change is wrong. i386 has the word size two times smaller than amd64, which makes typical frame smaller by 30-40% over same code on amd64. Also i386 has much smaller available KVA size (tens of MB) and KVA fragmentation is both more severe and more fatal due to this. I expect that your change will make any non-trivial load which creates enough threads to either fail randomly or deadlock. If somebody tries to fit large load onto i386 machine, he must know what to do and how to configure the kernel to adapt to the load (which does not require the recompilation). > > Logically, extend r286288 to cover all threads, by default. > > The world has largely moved on from i386. Most FreeBSD users and developers > test on amd64 hardware. For better or worse, we have written a non-trivial > amount of kernel code that relies on stacks larger than 8 kB, and it "just > works" on amd64, so there has been little incentive to shrink it. > > amd64 had its KSTACK_PAGES bumped to 4 back in Peter's initial AMD64 commit, > r114349, in 2003. Since that time, i386 has limped along on a stack half > the size. We've even observed the stack overflows years ago, but neglected > to fix the issue; see the 20121223 and 20150728 entries in UPDATING. > > If anyone is concerned with this change, I suggest they configure their > AMD64 kernels with KSTACK_PAGES 2 and fix the fallout there first. Eugene > has identified a list of high stack usage functions in the first PR below. This suggestion is completely bogus. > > PR: 219476, 224218 > Reported by: eugen@, Shreesh Holla > Relnotes: maybe > Sponsored by: Dell EMC Isilon > > Modified: > head/sys/i386/conf/NOTES > head/sys/i386/include/param.h > > Modified: head/sys/i386/conf/NOTES > ============================================================================== > --- head/sys/i386/conf/NOTES Mon Dec 11 02:44:15 2017 (r326757) > +++ head/sys/i386/conf/NOTES Mon Dec 11 04:32:37 2017 (r326758) > @@ -968,7 +968,7 @@ device ndis > # KSTACK_PAGES is the number of memory pages to assign to the kernel > # stack of each thread. > > -options KSTACK_PAGES=3 > +options KSTACK_PAGES=5 > > # Enable detailed accounting by the PV entry allocator. > > > Modified: head/sys/i386/include/param.h > ============================================================================== > --- head/sys/i386/include/param.h Mon Dec 11 02:44:15 2017 (r326757) > +++ head/sys/i386/include/param.h Mon Dec 11 04:32:37 2017 (r326758) > @@ -113,7 +113,7 @@ > #define IOPAGES 2 /* pages of i/o permission bitmap */ > > #ifndef KSTACK_PAGES > -#define KSTACK_PAGES 2 /* Includes pcb! */ > +#define KSTACK_PAGES 4 /* Includes pcb! */ > #endif > #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ > #if KSTACK_PAGES < 4 From owner-svn-src-all@freebsd.org Mon Dec 11 10:26:27 2017 Return-Path: Delivered-To: svn-src-all@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 0C612E8C710; Mon, 11 Dec 2017 10:26:27 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 91E3A7ABC1; Mon, 11 Dec 2017 10:26:25 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBBAQGRT004372 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2017 11:26:17 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: kostikbel@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBBAQCCp022715; Mon, 11 Dec 2017 17:26:12 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Konstantin Belousov , Conrad Meyer References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <5A2E5D44.9030904@grosbein.net> Date: Mon, 11 Dec 2017 17:26:12 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20171211091943.GF2272@kib.kiev.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 10:26:27 -0000 On 11.12.2017 16:19, Konstantin Belousov wrote: > On Mon, Dec 11, 2017 at 04:32:37AM +0000, Conrad Meyer wrote: >> Author: cem >> Date: Mon Dec 11 04:32:37 2017 >> New Revision: 326758 >> URL: https://svnweb.freebsd.org/changeset/base/326758 >> >> Log: >> i386: Bump KSTACK_PAGES default to match amd64 > i386 is not amd64, the change is wrong. > > i386 has the word size two times smaller than amd64, which makes typical > frame smaller by 30-40% over same code on amd64. Also i386 has much > smaller available KVA size (tens of MB) and KVA fragmentation is both > more severe and more fatal due to this. I expect that your change will > make any non-trivial load which creates enough threads to either fail > randomly or deadlock. > > If somebody tries to fit large load onto i386 machine, he must know what to > do and how to configure the kernel to adapt to the load (which does not > require the recompilation). Its very easy to get kernel stack overflow with 11-STABLE/i386 without any significant load due to abuse of kernel stack in many kernel subsystems as shown in the https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219476 Contrary, "enough threads" seems to be very non-trivial number of threads and pretty unusual load pattern for i386 as I run several such systems with kern.kstack_pages=4 for quite long time and have no problems. No random fails, no deadlocks. And with 2 pages only 11-STABLE/i386 is just unusable if one utilizes SCTP, IPv6, some WiFi connectivity, IPSEC or even very small ZFS pool. I still wonder if there is really such load pattern that creates "enough threads" for i386 to make 4-pages stack troublesome. Eugene Grosbein From owner-svn-src-all@freebsd.org Mon Dec 11 10:52:56 2017 Return-Path: Delivered-To: svn-src-all@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 0001AE8E2A8; Mon, 11 Dec 2017 10:52:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8854D803B8; Mon, 11 Dec 2017 10:52:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vBBAqgBd077110 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 Dec 2017 12:52:46 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vBBAqgBd077110 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vBBAqgLL077109; Mon, 11 Dec 2017 12:52:42 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 11 Dec 2017 12:52:42 +0200 From: Konstantin Belousov To: Eugene Grosbein Cc: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Message-ID: <20171211105242.GH2272@kib.kiev.ua> References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A2E5D44.9030904@grosbein.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 10:52:56 -0000 On Mon, Dec 11, 2017 at 05:26:12PM +0700, Eugene Grosbein wrote: > On 11.12.2017 16:19, Konstantin Belousov wrote: > > On Mon, Dec 11, 2017 at 04:32:37AM +0000, Conrad Meyer wrote: > >> Author: cem > >> Date: Mon Dec 11 04:32:37 2017 > >> New Revision: 326758 > >> URL: https://svnweb.freebsd.org/changeset/base/326758 > >> > >> Log: > >> i386: Bump KSTACK_PAGES default to match amd64 > > i386 is not amd64, the change is wrong. > > > > i386 has the word size two times smaller than amd64, which makes typical > > frame smaller by 30-40% over same code on amd64. Also i386 has much > > smaller available KVA size (tens of MB) and KVA fragmentation is both > > more severe and more fatal due to this. I expect that your change will > > make any non-trivial load which creates enough threads to either fail > > randomly or deadlock. > > > > If somebody tries to fit large load onto i386 machine, he must know what to > > do and how to configure the kernel to adapt to the load (which does not > > require the recompilation). > > Its very easy to get kernel stack overflow with 11-STABLE/i386 > without any significant load due to abuse of kernel stack in many kernel subsystems > as shown in the https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219476 > > Contrary, "enough threads" seems to be very non-trivial number of threads > and pretty unusual load pattern for i386 as I run several such systems > with kern.kstack_pages=4 for quite long time and have no problems. > No random fails, no deadlocks. And with 2 pages only 11-STABLE/i386 is just unusable > if one utilizes SCTP, IPv6, some WiFi connectivity, IPSEC or even very small ZFS pool. > > I still wonder if there is really such load pattern that creates "enough threads" > for i386 to make 4-pages stack troublesome. Yes, there is such load pattern, it is when you do create threads. Your load, as described, is static. Peter' stress2 includes some tests which will highlight the change. I am quite impressed by your ability to make generalization from single data point. Moving issues around because you care about your load, and do not care about other usage patterns, is certainly the way to go. From owner-svn-src-all@freebsd.org Mon Dec 11 11:03:49 2017 Return-Path: Delivered-To: svn-src-all@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 55B61E8E53E; Mon, 11 Dec 2017 11:03:49 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E12EE80886; Mon, 11 Dec 2017 11:03:48 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBBB3e48005063 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2017 12:03:41 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: kostikbel@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBBB3aZr033788; Mon, 11 Dec 2017 18:03:37 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Konstantin Belousov References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <20171211105242.GH2272@kib.kiev.ua> Cc: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A2E6608.5090205@grosbein.net> Date: Mon, 11 Dec 2017 18:03:36 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20171211105242.GH2272@kib.kiev.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 11:03:49 -0000 On 11.12.2017 17:52, Konstantin Belousov wrote: >> I still wonder if there is really such load pattern that creates "enough threads" >> for i386 to make 4-pages stack troublesome. > Yes, there is such load pattern, it is when you do create threads. Your > load, as described, is static. Peter' stress2 includes some tests which > will highlight the change. > > I am quite impressed by your ability to make generalization from single data > point. Moving issues around because you care about your load, and do not > care about other usage patterns, is certainly the way to go. I do not try to contradict other usage patterns. In fact, I'm eager to know a practical example of such pattern: a task, an application, anything real? I already know how to bring FreeBSD down to its kneels using stress tests but that's not what I'm looking for in this case of kstack_pages. From owner-svn-src-all@freebsd.org Mon Dec 11 11:57:48 2017 Return-Path: Delivered-To: svn-src-all@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 846ADE8F643; Mon, 11 Dec 2017 11:57:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43CEB24CE; Mon, 11 Dec 2017 11:57:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBBvl8w016915; Mon, 11 Dec 2017 11:57:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBBvl1q016914; Mon, 11 Dec 2017 11:57:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712111157.vBBBvl1q016914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 11 Dec 2017 11:57:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326764 - head/contrib/ofed/librdmacm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/contrib/ofed/librdmacm X-SVN-Commit-Revision: 326764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 11:57:48 -0000 Author: kib Date: Mon Dec 11 11:57:46 2017 New Revision: 326764 URL: https://svnweb.freebsd.org/changeset/base/326764 Log: ofed: Remove duplicated symbols from the version file. ld.bfd accepts multiple listing of the same symbol in the version script. lld is stricter and errors out. Since arm64 and sometimes amd64 use lld, we should correct this cosmetic issue. Sponsored by: Mellanox Technologies Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D13329 Modified: head/contrib/ofed/librdmacm/librdmacm.map Modified: head/contrib/ofed/librdmacm/librdmacm.map ============================================================================== --- head/contrib/ofed/librdmacm/librdmacm.map Mon Dec 11 05:21:48 2017 (r326763) +++ head/contrib/ofed/librdmacm/librdmacm.map Mon Dec 11 11:57:46 2017 (r326764) @@ -60,10 +60,6 @@ RDMACM_1.0 { rsetsockopt; rgetsockopt; rfcntl; - rpoll; - rselect; - rdma_get_src_port; - rdma_get_dst_port; riomap; riounmap; riowrite; From owner-svn-src-all@freebsd.org Mon Dec 11 11:59:47 2017 Return-Path: Delivered-To: svn-src-all@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 F3FFEE8F70F; Mon, 11 Dec 2017 11:59:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0ABB26A4; Mon, 11 Dec 2017 11:59:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBBxjRx017027; Mon, 11 Dec 2017 11:59:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBBxjo2017026; Mon, 11 Dec 2017 11:59:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712111159.vBBBxjo2017026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 11 Dec 2017 11:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326765 - head/contrib/ofed/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/contrib/ofed/include X-SVN-Commit-Revision: 326765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 11:59:47 -0000 Author: kib Date: Mon Dec 11 11:59:45 2017 New Revision: 326765 URL: https://svnweb.freebsd.org/changeset/base/326765 Log: ofed: Define barriers for mips and arm. I used the strongest barriers available on the architectures, so if the future analysis show that it is excessive, the barriers could be relaxed. Still, it is unlikely that it is meaningful to run IB on 32bit ARM or current MIPS machines, so the change is to make WITH_OFED to pass tinderbox. Sponsored by: Mellanox Technologies Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D13329 Modified: head/contrib/ofed/include/udma_barrier.h Modified: head/contrib/ofed/include/udma_barrier.h ============================================================================== --- head/contrib/ofed/include/udma_barrier.h Mon Dec 11 11:57:46 2017 (r326764) +++ head/contrib/ofed/include/udma_barrier.h Mon Dec 11 11:59:45 2017 (r326765) @@ -96,6 +96,14 @@ #define udma_to_device_barrier() asm volatile("dsb st" ::: "memory"); #elif defined(__sparc__) || defined(__s390x__) #define udma_to_device_barrier() asm volatile("" ::: "memory") +#elif defined(__mips__) +#include +#include +#define udma_to_device_barrier() mips_sync() +#elif defined(__arm__) +#include +#include +#define udma_to_device_barrier() dmb() #else #error No architecture specific memory barrier defines found! #endif @@ -128,6 +136,10 @@ #define udma_from_device_barrier() asm volatile("dsb ld" ::: "memory"); #elif defined(__sparc__) || defined(__s390x__) #define udma_from_device_barrier() asm volatile("" ::: "memory") +#elif defined(__mips__) +#define udma_from_device_barrier() mips_sync() +#elif defined(__arm__) +#define udma_from_device_barrier() dmb() #else #error No architecture specific memory barrier defines found! #endif @@ -192,6 +204,10 @@ #define mmio_flush_writes() asm volatile("dsb st" ::: "memory"); #elif defined(__sparc__) || defined(__s390x__) #define mmio_flush_writes() asm volatile("" ::: "memory") +#elif defined(__mips__) +#define mmio_flush_writes() mips_sync() +#elif defined(__arm__) +#define mmio_flush_writes() dmb() #else #error No architecture specific memory barrier defines found! #endif From owner-svn-src-all@freebsd.org Mon Dec 11 12:38:52 2017 Return-Path: Delivered-To: svn-src-all@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 3D325E90C82; Mon, 11 Dec 2017 12:38:52 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07088635AD; Mon, 11 Dec 2017 12:38:51 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBCcoka034021; Mon, 11 Dec 2017 12:38:50 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBCco1M034020; Mon, 11 Dec 2017 12:38:50 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201712111238.vBBCco1M034020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 11 Dec 2017 12:38:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326766 - stable/11/contrib/bsnmp/snmpd X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/contrib/bsnmp/snmpd X-SVN-Commit-Revision: 326766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 12:38:52 -0000 Author: ae Date: Mon Dec 11 12:38:50 2017 New Revision: 326766 URL: https://svnweb.freebsd.org/changeset/base/326766 Log: MFC r326510: Fix format string warning with enabled DEBUGGING. Modified: stable/11/contrib/bsnmp/snmpd/config.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/bsnmp/snmpd/config.c ============================================================================== --- stable/11/contrib/bsnmp/snmpd/config.c Mon Dec 11 11:59:45 2017 (r326765) +++ stable/11/contrib/bsnmp/snmpd/config.c Mon Dec 11 12:38:50 2017 (r326766) @@ -663,7 +663,7 @@ gettoken() printf("(EOL)"); break; case TOK_NUM: - printf("(NUM %llu)", numval); + printf("(NUM %ju)", (uintmax_t)numval); break; case TOK_STR: printf("(STR %.*s)", (int)strvallen, strval); From owner-svn-src-all@freebsd.org Mon Dec 11 14:38:43 2017 Return-Path: Delivered-To: svn-src-all@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 F0A50E937FA; Mon, 11 Dec 2017 14:38:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAC9B67C9D; Mon, 11 Dec 2017 14:38:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBEcgOi085080; Mon, 11 Dec 2017 14:38:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBEcgD2085079; Mon, 11 Dec 2017 14:38:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201712111438.vBBEcgD2085079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 11 Dec 2017 14:38:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326767 - stable/11/usr.bin/ctlstat X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/usr.bin/ctlstat X-SVN-Commit-Revision: 326767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 14:38:44 -0000 Author: mav Date: Mon Dec 11 14:38:42 2017 New Revision: 326767 URL: https://svnweb.freebsd.org/changeset/base/326767 Log: MFC r326273: Make ctlstat -n option work reasonably for sparse LUN list. Modified: stable/11/usr.bin/ctlstat/ctlstat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/ctlstat/ctlstat.c ============================================================================== --- stable/11/usr.bin/ctlstat/ctlstat.c Mon Dec 11 12:38:50 2017 (r326766) +++ stable/11/usr.bin/ctlstat/ctlstat.c Mon Dec 11 14:38:42 2017 (r326767) @@ -320,11 +320,12 @@ static const char *iotypes[] = {"NO IO", "READ", "WRIT static void ctlstat_dump(struct ctlstat_context *ctx) { - int iotype, i; + int iotype, i, n; struct ctl_io_stats *stats = ctx->cur_stats; - for (i = 0; i < ctx->cur_items;i++) { - if (F_MASK(ctx) && bit_test(ctx->item_mask, i) == 0) + for (i = n = 0; i < ctx->cur_items;i++) { + if (F_MASK(ctx) && bit_test(ctx->item_mask, + (int)stats[i].item) == 0) continue; printf("%s %d\n", F_PORTS(ctx) ? "port" : "lun", stats[i].item); for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; iotype++) { @@ -341,17 +342,20 @@ ctlstat_dump(struct ctlstat_context *ctx) PRINT_BINTIME(stats[i].dma_time[iotype]); printf("\n"); } + if (++n >= ctx->numdevs) + break; } } static void ctlstat_json(struct ctlstat_context *ctx) { - int iotype, i; + int iotype, i, n; struct ctl_io_stats *stats = ctx->cur_stats; printf("{\"%s\":[", F_PORTS(ctx) ? "ports" : "luns"); - for (i = 0; i < ctx->cur_items; i++) { - if (F_MASK(ctx) && bit_test(ctx->item_mask, i) == 0) + for (i = n = 0; i < ctx->cur_items; i++) { + if (F_MASK(ctx) && bit_test(ctx->item_mask, + (int)stats[i].item) == 0) continue; printf("{\"num\":%d,\"io\":[", stats[i].item); @@ -372,6 +376,8 @@ ctlstat_json(struct ctlstat_context *ctx) { printf(","); /* continue io array */ } printf("]}"); + if (++n >= ctx->numdevs) + break; if (i < (ctx->cur_items - 1)) printf(","); /* continue lun array */ } @@ -383,7 +389,7 @@ ctlstat_standard(struct ctlstat_context *ctx) { long double etime; uint64_t delta_jiffies, delta_idle; long double cpu_percentage; - int i, j; + int i, j, n; cpu_percentage = 0; @@ -413,10 +419,6 @@ ctlstat_standard(struct ctlstat_context *ctx) { if (F_HDR(ctx)) { ctx->header_interval--; if (ctx->header_interval <= 0) { - int hdr_devs; - - hdr_devs = 0; - if (F_CPU(ctx)) fprintf(stdout, " CPU"); if (F_TOTALS(ctx)) { @@ -425,9 +427,9 @@ ctlstat_standard(struct ctlstat_context *ctx) { (F_TIMEVAL(ctx) != 0) ? " " : "", (F_TIMEVAL(ctx) != 0) ? " " : "", (F_TIMEVAL(ctx) != 0) ? " " : ""); - hdr_devs = 3; + n = 3; } else { - for (i = 0; i < min(CTL_STAT_BITS, + for (i = n = 0; i < min(CTL_STAT_BITS, ctx->cur_items); i++) { int item; @@ -444,13 +446,14 @@ ctlstat_standard(struct ctlstat_context *ctx) { fprintf(stdout, "%15.6s%d %s", F_PORTS(ctx) ? "port" : "lun", item, (F_TIMEVAL(ctx) != 0) ? " " : ""); - hdr_devs++; + if (++n >= ctx->numdevs) + break; } fprintf(stdout, "\n"); } if (F_CPU(ctx)) fprintf(stdout, " "); - for (i = 0; i < hdr_devs; i++) + for (i = 0; i < n; i++) fprintf(stdout, "%s KB/t %s MB/s", (F_TIMEVAL(ctx) != 0) ? " ms" : "", (F_DMA(ctx) == 0) ? "tps" : "dps"); @@ -534,7 +537,7 @@ ctlstat_standard(struct ctlstat_context *ctx) { dmas_per_sec[i], mbsec[i]); } } else { - for (i = 0; i < min(CTL_STAT_BITS, ctx->cur_items); i++) { + for (i = n = 0; i < min(CTL_STAT_BITS, ctx->cur_items); i++) { long double mbsec, kb_per_transfer; long double transfers_per_sec; long double ms_per_transfer; @@ -565,6 +568,8 @@ ctlstat_standard(struct ctlstat_context *ctx) { fprintf(stdout, " %4.0Lf %5.0Lf %4.0Lf", kb_per_transfer, (F_DMA(ctx) == 0) ? transfers_per_sec : dmas_per_sec, mbsec); + if (++n >= ctx->numdevs) + break; } } } @@ -668,18 +673,6 @@ main(int argc, char **argv) ctx.flags |= CTLSTAT_FLAG_PORTS; else ctx.flags |= CTLSTAT_FLAG_LUNS; - } - - if (!F_TOTALS(&ctx) && !F_MASK(&ctx)) { - /* - * Note that this just selects the first N LUNs to display, - * but at this point we have no knoweledge of which LUN - * numbers actually exist. So we may select LUNs that - * aren't there. - */ - bit_nset(ctx.item_mask, 0, min(ctx.numdevs - 1, - CTL_STAT_BITS - 1)); - ctx.flags |= CTLSTAT_FLAG_MASK; } if ((fd = open(CTL_DEFAULT_DEV, O_RDWR)) == -1) From owner-svn-src-all@freebsd.org Mon Dec 11 14:47:25 2017 Return-Path: Delivered-To: svn-src-all@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 22F04E93BBF; Mon, 11 Dec 2017 14:47:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E462768578; Mon, 11 Dec 2017 14:47:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBElO5Y089759; Mon, 11 Dec 2017 14:47:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBElOqh089758; Mon, 11 Dec 2017 14:47:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712111447.vBBElOqh089758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 11 Dec 2017 14:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326768 - head/stand X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand X-SVN-Commit-Revision: 326768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 14:47:25 -0000 Author: imp Date: Mon Dec 11 14:47:23 2017 New Revision: 326768 URL: https://svnweb.freebsd.org/changeset/base/326768 Log: Fix a comment to be more accurate Modified: head/stand/defs.mk Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Mon Dec 11 14:38:42 2017 (r326767) +++ head/stand/defs.mk Mon Dec 11 14:47:23 2017 (r326768) @@ -96,7 +96,7 @@ CFLAGS+= -DLOADER_GPT_SUPPORT CFLAGS+= -DLOADER_MBR_SUPPORT .endif -# GELI Support, with backward compat hooks +# GELI Support, with backward compat hooks (mostly) .if defined(HAVE_GELI) .if defined(LOADER_NO_GELI_SUPPORT) MK_LOADER_GELI=no From owner-svn-src-all@freebsd.org Mon Dec 11 14:54:44 2017 Return-Path: Delivered-To: svn-src-all@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 0D24AE93FE2; Mon, 11 Dec 2017 14:54:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C18FD68D5B; Mon, 11 Dec 2017 14:54:43 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBEsgCM093987; Mon, 11 Dec 2017 14:54:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBEsgGL093986; Mon, 11 Dec 2017 14:54:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712111454.vBBEsgGL093986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 11 Dec 2017 14:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326769 - head/usr.bin/ctlstat X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/ctlstat X-SVN-Commit-Revision: 326769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 14:54:44 -0000 Author: bapt Date: Mon Dec 11 14:54:42 2017 New Revision: 326769 URL: https://svnweb.freebsd.org/changeset/base/326769 Log: Remove hard coded number of lun definition The number of lun exposed is now exposed via sysctl by the kernel. Use that number in ctlstat instead of the hardcoded version Add a backward compatibility in case the sysctl(2) request fails. This also allows ctlstat -l 1118 to actually work when having more than 1024 luns. Reviewed by: avg, manu (both before the backward compatibility addition) Approved by: avg, manu (both before the backward compatibility addition) MFC after: 2 weeks Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D13446 Modified: head/usr.bin/ctlstat/ctlstat.c Modified: head/usr.bin/ctlstat/ctlstat.c ============================================================================== --- head/usr.bin/ctlstat/ctlstat.c Mon Dec 11 14:47:23 2017 (r326768) +++ head/usr.bin/ctlstat/ctlstat.c Mon Dec 11 14:54:42 2017 (r326769) @@ -74,12 +74,7 @@ __FBSDID("$FreeBSD$"); */ #define CTL_STAT_NUM_ITEMS 256 -/* - * The default number of LUN selection bits we allocate. This is large - * because we don't currently increase it if the user specifies a LUN - * number of 1024 or larger. - */ -#define CTL_STAT_BITS 1024L +static int ctl_stat_bits; static const char *ctlstat_opts = "Cc:Ddhjl:n:p:tw:"; static const char *ctlstat_usage = "Usage: ctlstat [-CDdjht] [-l lunnum]" @@ -127,7 +122,7 @@ struct ctlstat_context { struct ctl_cpu_stats cur_cpu, prev_cpu; uint64_t cur_total_jiffies, prev_total_jiffies; uint64_t cur_idle, prev_idle; - bitstr_t bit_decl(item_mask, CTL_STAT_BITS); + bitstr_t *item_mask; int cur_items, prev_items; int cur_alloc, prev_alloc; int numdevs; @@ -431,7 +426,7 @@ ctlstat_standard(struct ctlstat_context *ctx) { (F_TIMEVAL(ctx) != 0) ? " " : ""); n = 3; } else { - for (i = n = 0; i < min(CTL_STAT_BITS, + for (i = n = 0; i < min(ctl_stat_bits, ctx->cur_items); i++) { int item; @@ -539,7 +534,7 @@ ctlstat_standard(struct ctlstat_context *ctx) { dmas_per_sec[i], mbsec[i]); } } else { - for (i = n = 0; i < min(CTL_STAT_BITS, ctx->cur_items); i++) { + for (i = n = 0; i < min(ctl_stat_bits, ctx->cur_items); i++) { long double mbsec, kb_per_transfer; long double transfers_per_sec; long double ms_per_transfer; @@ -582,6 +577,7 @@ main(int argc, char **argv) int c; int count, waittime; int fd, retval; + size_t size; struct ctlstat_context ctx; struct ctl_io_stats *tmp_stats; @@ -596,6 +592,16 @@ main(int argc, char **argv) ctx.flags |= CTLSTAT_FLAG_FIRST_RUN; ctx.flags |= CTLSTAT_FLAG_HEADER; + size = sizeof(ctl_stat_bits); + if (sysctlbyname("kern.cam.ctl.max_luns", &ctl_stat_bits, &size, NULL, + 0) == -1) { + /* Backward compatibility for where the sysctl wasn't exposed */ + ctl_stat_bits = 1024; + } + ctx.item_mask = bit_alloc(ctl_stat_bits); + if (ctx.item_mask == NULL) + err(1, "bit_alloc() failed"); + while ((c = getopt(argc, argv, ctlstat_opts)) != -1) { switch (c) { case 'C': @@ -622,7 +628,7 @@ main(int argc, char **argv) int cur_lun; cur_lun = atoi(optarg); - if (cur_lun > CTL_STAT_BITS) + if (cur_lun > ctl_stat_bits) errx(1, "Invalid LUN number %d", cur_lun); if (!F_MASK(&ctx)) @@ -641,7 +647,7 @@ main(int argc, char **argv) int cur_port; cur_port = atoi(optarg); - if (cur_port > CTL_STAT_BITS) + if (cur_port > ctl_stat_bits) errx(1, "Invalid port number %d", cur_port); if (!F_MASK(&ctx)) From owner-svn-src-all@freebsd.org Mon Dec 11 15:08:36 2017 Return-Path: Delivered-To: svn-src-all@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 94E9DE94503; Mon, 11 Dec 2017 15:08:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28FA069428; Mon, 11 Dec 2017 15:08:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vBBF8SQk076823 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 Dec 2017 17:08:31 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vBBF8SQk076823 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vBBF8Rdx076820; Mon, 11 Dec 2017 17:08:27 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 11 Dec 2017 17:08:27 +0200 From: Konstantin Belousov To: Eugene Grosbein Cc: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Message-ID: <20171211150827.GJ2272@kib.kiev.ua> References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <20171211105242.GH2272@kib.kiev.ua> <5A2E6608.5090205@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A2E6608.5090205@grosbein.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 15:08:36 -0000 On Mon, Dec 11, 2017 at 06:03:36PM +0700, Eugene Grosbein wrote: > I do not try to contradict other usage patterns. In fact, I'm eager to know > a practical example of such pattern: a task, an application, anything real? Plain workstation use, like X11+browser+editor+some other programs easily allocates 1000+ threads. It was still possible to use 32bit x86 for that, of course in max memory config without PAE, and without ZFS. Add some load that involves network, for instance torrent client, to establish the pressure on KVA. I am almost sure that users would get troubles now. > > I already know how to bring FreeBSD down to its kneels using stress tests > but that's not what I'm looking for in this case of kstack_pages. > Stress test is useful due to its canary nature. From owner-svn-src-all@freebsd.org Mon Dec 11 15:09:12 2017 Return-Path: Delivered-To: svn-src-all@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 EC2E0E9456B; Mon, 11 Dec 2017 15:09:12 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D562169586; Mon, 11 Dec 2017 15:09:12 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBBF9Apd081696; Mon, 11 Dec 2017 07:09:10 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBBF9Aha081695; Mon, 11 Dec 2017 07:09:10 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712111509.vBBF9Aha081695@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326758 - in head/sys/i386: conf include In-Reply-To: <201712110432.vBB4WbnE021090@repo.freebsd.org> To: Conrad Meyer Date: Mon, 11 Dec 2017 07:09:10 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 15:09:13 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: cem > Date: Mon Dec 11 04:32:37 2017 > New Revision: 326758 > URL: https://svnweb.freebsd.org/changeset/base/326758 > > Log: > i386: Bump KSTACK_PAGES default to match amd64 > > Logically, extend r286288 to cover all threads, by default. > > The world has largely moved on from i386. Most FreeBSD users and developers THis is a mistake, there is a huge worled of i386 deployment, not all the world needs, or even wants amd64, especially in teh virtualization world when you are running anything with less than 4G of memory, which I would argue is a huge depolyement base. 64bit code is simply wasteful on these platforms, and though maybe software developers are ok with that waste, (smart) business people are not. > test on amd64 hardware. For better or worse, we have written a non-trivial > amount of kernel code that relies on stacks larger than 8 kB, and it "just > works" on amd64, so there has been little incentive to shrink it. > > amd64 had its KSTACK_PAGES bumped to 4 back in Peter's initial AMD64 commit, > r114349, in 2003. Since that time, i386 has limped along on a stack half > the size. We've even observed the stack overflows years ago, but neglected > to fix the issue; see the 20121223 and 20150728 entries in UPDATING. This makes perfect sense to have sizeofstackamd64 == 2 * sizofstacki386 if you think about it for very long, most of what should be on your stack are pointers and ints, the sizedof pointers/int is 2x on amd64. If we are storing lots of none pointer stuff that is very large on the stack something is probably designed wrong. Does it makes since to change the KSTACK_PAGES value to be more MI in how it is defined (I am not saying move it to MI code) so a better understanding can be had, as in: KSTACK_PAGES=(sizeof(void *)/2) The comment that should go with this is left as an excersize for the commiter. The current comment about a pcb, I thought that code was changed so we only put the pointer to a pcb on the stack. > > If anyone is concerned with this change, I suggest they configure their > AMD64 kernels with KSTACK_PAGES 2 and fix the fallout there first. Eugene > has identified a list of high stack usage functions in the first PR below. Um, that is the wrong approach for the reason stated above, you would end up pessimizing on amd64. Thought getting amd64 to run in 2 pages of stack would defanitly allow the i386 to run in 2 pages. > PR: 219476, 224218 > Reported by: eugen@, Shreesh Holla > Relnotes: maybe > Sponsored by: Dell EMC Isilon > > Modified: > head/sys/i386/conf/NOTES > head/sys/i386/include/param.h > > Modified: head/sys/i386/conf/NOTES > ============================================================================== > --- head/sys/i386/conf/NOTES Mon Dec 11 02:44:15 2017 (r326757) > +++ head/sys/i386/conf/NOTES Mon Dec 11 04:32:37 2017 (r326758) > @@ -968,7 +968,7 @@ device ndis > # KSTACK_PAGES is the number of memory pages to assign to the kernel > # stack of each thread. > > -options KSTACK_PAGES=3 > +options KSTACK_PAGES=5 > > # Enable detailed accounting by the PV entry allocator. > > > Modified: head/sys/i386/include/param.h > ============================================================================== > --- head/sys/i386/include/param.h Mon Dec 11 02:44:15 2017 (r326757) > +++ head/sys/i386/include/param.h Mon Dec 11 04:32:37 2017 (r326758) > @@ -113,7 +113,7 @@ > #define IOPAGES 2 /* pages of i/o permission bitmap */ > > #ifndef KSTACK_PAGES > -#define KSTACK_PAGES 2 /* Includes pcb! */ > +#define KSTACK_PAGES 4 /* Includes pcb! */ > #endif > #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ > #if KSTACK_PAGES < 4 > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Dec 11 15:22:28 2017 Return-Path: Delivered-To: svn-src-all@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 17E91E94D23; Mon, 11 Dec 2017 15:22:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 993ED6A0F8; Mon, 11 Dec 2017 15:22:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vBBFMJP7081859 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 Dec 2017 17:22:23 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vBBFMJP7081859 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vBBFMJJW081858; Mon, 11 Dec 2017 17:22:19 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 11 Dec 2017 17:22:19 +0200 From: Konstantin Belousov To: rgrimes@freebsd.org Cc: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Message-ID: <20171211152219.GL2272@kib.kiev.ua> References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <201712111509.vBBF9Aha081695@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201712111509.vBBF9Aha081695@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 15:22:28 -0000 On Mon, Dec 11, 2017 at 07:09:10AM -0800, Rodney W. Grimes wrote: > The current comment about a pcb, I thought that code was changed > so we only put the pointer to a pcb on the stack. pcb is on top of the stack, followed by the userspace FPU registers save area. I do not see any sense in existence of pcb in modern kernel, it is a remnant of the user area that was swappable. Currently pcb is swappable as well, but the value of this is much less then the overhead we pay by the stack space reduction. FPU save area is the on of the problem which makes us increase the amd64 stack size, AVX or even AVX512 make the things much worse. It is unlikely that somebody would run 32bit kernel on machine capable of that extensions, i.e. Haswell or Skylake. From owner-svn-src-all@freebsd.org Mon Dec 11 15:33:11 2017 Return-Path: Delivered-To: svn-src-all@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 E012FE95629; Mon, 11 Dec 2017 15:33:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C59D46AC2A; Mon, 11 Dec 2017 15:33:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBBFX8NJ081790; Mon, 11 Dec 2017 07:33:08 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBBFX8sl081789; Mon, 11 Dec 2017 07:33:08 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712111533.vBBFX8sl081789@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326758 - in head/sys/i386: conf include In-Reply-To: <20171211152219.GL2272@kib.kiev.ua> To: Konstantin Belousov Date: Mon, 11 Dec 2017 07:33:08 -0800 (PST) CC: rgrimes@freebsd.org, Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 15:33:12 -0000 > On Mon, Dec 11, 2017 at 07:09:10AM -0800, Rodney W. Grimes wrote: > > The current comment about a pcb, I thought that code was changed > > so we only put the pointer to a pcb on the stack. > > pcb is on top of the stack, followed by the userspace FPU registers save > area. I do not see any sense in existence of pcb in modern kernel, it is > a remnant of the user area that was swappable. Currently pcb is swappable > as well, but the value of this is much less then the overhead we pay by > the stack space reduction. How about KSTACK_PAGES should be KSTAKE_BYTES/PAGESIZE, and we need a much better formula for define of KSTACK_BYTES so that these facts are more accurately defined? And a compile time assert if this ever growes to something unreasonable that would cause other issues. I fully agree with you that just bumping KSTACK_PAGES is very much the wrong way to fix the i386 issue of certain code not running, it is that code that should be examined for over usage of the stack. I can assert that the base i386 system is very usable for tons of things without this change, I have at least 30 VM's running FreeBSD 11.1/i386 in some very small footprints, typically 64MB, that have zero issues. But then they are not using any of the code that sited as problem areas. > FPU save area is the on of the problem which makes us increase the amd64 > stack size, AVX or even AVX512 make the things much worse. It is unlikely > that somebody would run 32bit kernel on machine capable of that extensions, > i.e. Haswell or Skylake. Your igonoring the virutalization world, host is a skylake or haswell, guest is i386 as it has small memory needs and no use to waste half of all pointers. We need to break the developers model that i386 is dead and that i386 is not running on extremly modern hardware due to the factor of virtualization. Output from one of my VM's running inside bhyve: # uname -a FreeBSD filestore.dnsmgr.net 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 04:10:47 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 # dmesg | head -24 Copyright (c) 1992-2017 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0) VT(vga): resolution 640x480 info: [drm] Initialized drm 1.1.0 20060810 CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz (2494.39-MHz K8-class CPU) Origin="GenuineIntel" Id=0x306a9 Family=0x6 Model=0x3a Stepping=9 Features=0xbfebfbff Features2=0x7fbae3bf AMD Features=0x28100800 AMD Features2=0x1 Structured Extended Features=0x281 XSAVE Features=0x1 VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID TSC: P-state invariant, performance statistics real memory = 12884901888 (12288 MB) avail memory = 12114096128 (11552 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Dec 11 15:33:29 2017 Return-Path: Delivered-To: svn-src-all@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 AD293E95676; Mon, 11 Dec 2017 15:33:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 774966ACC1; Mon, 11 Dec 2017 15:33:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBFXOjk010636; Mon, 11 Dec 2017 15:33:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBFXOSj010635; Mon, 11 Dec 2017 15:33:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712111533.vBBFXOSj010635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 11 Dec 2017 15:33:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326770 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 326770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 15:33:29 -0000 Author: markj Date: Mon Dec 11 15:33:24 2017 New Revision: 326770 URL: https://svnweb.freebsd.org/changeset/base/326770 Log: Use a dedicated counter for inactive queue scans. The laundry thread keeps track of the number of inactive queue scans performed by the page daemon, and was previously using the v_pdwakeups counter to count them. However, in some cases the inactive queue may be scanned multiple times after a single wakeup, so it's more accurate to use a dedicated counter. Reviewed by: alc, kib (previous version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13422 Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Mon Dec 11 14:54:42 2017 (r326769) +++ head/sys/vm/vm_pageout.c Mon Dec 11 15:33:24 2017 (r326770) @@ -159,6 +159,7 @@ static enum { VM_LAUNDRY_BACKGROUND, VM_LAUNDRY_SHORTFALL } vm_laundry_request = VM_LAUNDRY_IDLE; +static int vm_inactq_scans; static int vm_pageout_update_period; static int disable_swap_pageouts; @@ -961,7 +962,7 @@ vm_pageout_laundry_worker(void *arg) struct vm_domain *domain; struct vm_pagequeue *pq; uint64_t nclean, ndirty; - u_int last_launder, wakeups; + u_int inactq_scans, last_launder; int domidx, last_target, launder, shortfall, shortfall_cycle, target; bool in_shortfall; @@ -975,6 +976,7 @@ vm_pageout_laundry_worker(void *arg) in_shortfall = false; shortfall_cycle = 0; target = 0; + inactq_scans = 0; last_launder = 0; /* @@ -993,7 +995,6 @@ vm_pageout_laundry_worker(void *arg) KASSERT(shortfall_cycle >= 0, ("negative cycle %d", shortfall_cycle)); launder = 0; - wakeups = VM_CNT_FETCH(v_pdwakeups); /* * First determine whether we need to launder pages to meet a @@ -1017,7 +1018,7 @@ vm_pageout_laundry_worker(void *arg) target = 0; goto trybackground; } - last_launder = wakeups; + last_launder = inactq_scans; launder = target / shortfall_cycle--; goto dolaundry; @@ -1034,29 +1035,29 @@ vm_pageout_laundry_worker(void *arg) * * The background laundering threshold is not a constant. * Instead, it is a slowly growing function of the number of - * page daemon wakeups since the last laundering. Thus, as the + * page daemon scans since the last laundering. Thus, as the * ratio of dirty to clean inactive pages grows, the amount of * memory pressure required to trigger laundering decreases. */ trybackground: nclean = vm_cnt.v_inactive_count + vm_cnt.v_free_count; ndirty = vm_cnt.v_laundry_count; - if (target == 0 && wakeups != last_launder && - ndirty * isqrt(wakeups - last_launder) >= nclean) { + if (target == 0 && inactq_scans != last_launder && + ndirty * isqrt(inactq_scans - last_launder) >= nclean) { target = vm_background_launder_target; } /* * We have a non-zero background laundering target. If we've * laundered up to our maximum without observing a page daemon - * wakeup, just stop. This is a safety belt that ensures we + * request, just stop. This is a safety belt that ensures we * don't launder an excessive amount if memory pressure is low * and the ratio of dirty to clean pages is large. Otherwise, * proceed at the background laundering rate. */ if (target > 0) { - if (wakeups != last_launder) { - last_launder = wakeups; + if (inactq_scans != last_launder) { + last_launder = inactq_scans; last_target = target; } else if (last_target - target >= vm_background_launder_max * PAGE_SIZE / 1024) { @@ -1104,6 +1105,7 @@ dolaundry: if (target == 0) vm_laundry_request = VM_LAUNDRY_IDLE; + inactq_scans = vm_inactq_scans; vm_pagequeue_unlock(pq); } } @@ -1349,12 +1351,16 @@ drop_page: * need to launder more aggressively. If PQ_LAUNDRY is empty and no * swap devices are configured, the laundry thread has no work to do, so * don't bother waking it up. + * + * The laundry thread uses the number of inactive queue scans elapsed + * since the last laundering to determine whether to launder again, so + * keep count. */ - if (vm_laundry_request == VM_LAUNDRY_IDLE && - starting_page_shortage > 0) { + if (starting_page_shortage > 0) { pq = &vm_dom[0].vmd_pagequeues[PQ_LAUNDRY]; vm_pagequeue_lock(pq); - if (pq->pq_cnt > 0 || atomic_load_acq_int(&swapdev_enabled)) { + if (vm_laundry_request == VM_LAUNDRY_IDLE && + (pq->pq_cnt > 0 || atomic_load_acq_int(&swapdev_enabled))) { if (page_shortage > 0) { vm_laundry_request = VM_LAUNDRY_SHORTFALL; VM_CNT_INC(v_pdshortfalls); @@ -1362,6 +1368,7 @@ drop_page: vm_laundry_request = VM_LAUNDRY_BACKGROUND; wakeup(&vm_laundry_request); } + vm_inactq_scans++; vm_pagequeue_unlock(pq); } From owner-svn-src-all@freebsd.org Mon Dec 11 15:44:57 2017 Return-Path: Delivered-To: svn-src-all@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 C9A47E95B57; Mon, 11 Dec 2017 15:44:57 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AACCA6B4D1; Mon, 11 Dec 2017 15:44:57 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 01AC11542F; Mon, 11 Dec 2017 15:44:56 +0000 (UTC) Date: Mon, 11 Dec 2017 15:44:56 +0000 From: Alexey Dokuchaev To: rgrimes@freebsd.org Cc: Conrad Meyer , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Message-ID: <20171211154456.GB33210@FreeBSD.org> References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <201712111509.vBBF9Aha081695@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201712111509.vBBF9Aha081695@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 15:44:57 -0000 On Mon, Dec 11, 2017 at 07:09:10AM -0800, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > New Revision: 326758 > > URL: https://svnweb.freebsd.org/changeset/base/326758 > > > > Log: > > i386: Bump KSTACK_PAGES default to match amd64 > > > > Logically, extend r286288 to cover all threads, by default. > > > > The world has largely moved on from i386. Most FreeBSD users and > > developers ... > > This is a mistake, there is a huge world of i386 deployment, not all > the world needs, or even wants amd64, especially in the virtualization > world when you are running anything with less than 4G of memory, which > I would argue is a huge depolyement base. > > 64-bit code is simply wasteful on these platforms, and though maybe > software developers are ok with that waste, (smart) business people > are not. Big +1. Most of my hw is 32-bit and I like it that way. It works fine, it helps to maintains/check sw sanity, and remains our default reference platform. > > ... test on amd64 hardware. Then they should start doing a better job and test on i386 (at least) as well. > For better or worse, we have written a non-trivial amount of kernel > code that relies on stacks larger than 8 kB, and it "just works" on > amd64, so there has been little incentive to shrink it. If the code is broken, it should be fixed. "Just works on amd64" is not a good enough excuse to deprecate^Wput quick "fixes" for i386 that did not undergo sufficient review. ./danfe From owner-svn-src-all@freebsd.org Mon Dec 11 16:17:54 2017 Return-Path: Delivered-To: svn-src-all@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 852C3E96976; Mon, 11 Dec 2017 16:17:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 522686C95F; Mon, 11 Dec 2017 16:17:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBGHrXf027886; Mon, 11 Dec 2017 16:17:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBGHrCZ027885; Mon, 11 Dec 2017 16:17:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712111617.vBBGHrCZ027885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 11 Dec 2017 16:17:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326771 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 326771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 16:17:54 -0000 Author: imp Date: Mon Dec 11 16:17:53 2017 New Revision: 326771 URL: https://svnweb.freebsd.org/changeset/base/326771 Log: Unbreak gcc build by using (void) for functions that take no args. Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Mon Dec 11 15:33:24 2017 (r326770) +++ head/usr.sbin/efibootmgr/efibootmgr.c Mon Dec 11 16:17:53 2017 (r326771) @@ -275,7 +275,7 @@ parse_args(int argc, char *argv[]) static void -print_order() +print_order(void) { uint32_t attrs; uint8_t *data; @@ -531,7 +531,7 @@ compare(const void *a, const void *b) } static char * -make_next_boot_var_name() +make_next_boot_var_name(void) { struct entry *v; uint16_t *vals, next_free = 0; @@ -823,7 +823,7 @@ print_boot_vars(bool verbose) } static void -delete_timeout() +delete_timeout(void) { efi_del_variable(EFI_GLOBAL_GUID,"Timeout"); From owner-svn-src-all@freebsd.org Mon Dec 11 16:18:08 2017 Return-Path: Delivered-To: svn-src-all@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 940A7E969B6; Mon, 11 Dec 2017 16:18:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 029406CA9A; Mon, 11 Dec 2017 16:18:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBGI6VX027957; Mon, 11 Dec 2017 16:18:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBGI5nD027945; Mon, 11 Dec 2017 16:18:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712111618.vBBGI5nD027945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 11 Dec 2017 16:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326772 - in head/stand: common efi/loader i386/loader mips/beri/loader ofw/common powerpc/kboot powerpc/ps3 sparc64/loader userboot/userboot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: common efi/loader i386/loader mips/beri/loader ofw/common powerpc/kboot powerpc/ps3 sparc64/loader userboot/userboot X-SVN-Commit-Revision: 326772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 16:18:08 -0000 Author: imp Date: Mon Dec 11 16:18:05 2017 New Revision: 326772 URL: https://svnweb.freebsd.org/changeset/base/326772 Log: Fix regression with lua import Don't print when we can't find a file. Copy it instead to the error buffer. Higher level routines determine if it's appropriate to print the error message. Also, remove dead code (labeled bogusly lost functionality) since we never used that functionality. Remove unused arg from interact() too. Sponsored by: Netflix Modified: head/stand/common/bootstrap.h head/stand/common/interp.c head/stand/common/interp_forth.c head/stand/efi/loader/main.c head/stand/i386/loader/main.c head/stand/mips/beri/loader/main.c head/stand/ofw/common/main.c head/stand/powerpc/kboot/main.c head/stand/powerpc/ps3/main.c head/stand/sparc64/loader/main.c head/stand/userboot/userboot/main.c Modified: head/stand/common/bootstrap.h ============================================================================== --- head/stand/common/bootstrap.h Mon Dec 11 16:17:53 2017 (r326771) +++ head/stand/common/bootstrap.h Mon Dec 11 16:18:05 2017 (r326772) @@ -45,7 +45,7 @@ extern char command_errbuf[COMMAND_ERRBUFSZ]; #define CMD_FATAL 4 /* interp.c */ -void interact(const char *rc); +void interact(void); int include(const char *filename); /* interp_backslash.c */ @@ -53,10 +53,6 @@ char *backslash(const char *str); /* interp_parse.c */ int parse(int *argc, char ***argv, const char *str); - -/* interp_forth.c */ -void bf_init(const char *rc); -int bf_run(char *line); /* boot.c */ int autoboot(int timeout, char *prompt); Modified: head/stand/common/interp.c ============================================================================== --- head/stand/common/interp.c Mon Dec 11 16:17:53 2017 (r326771) +++ head/stand/common/interp.c Mon Dec 11 16:18:05 2017 (r326772) @@ -58,7 +58,7 @@ default_load_config(void *ctx) * Interactive mode */ void -interact(const char * rc) +interact(void) { static char input[256]; /* big enough? */ @@ -124,6 +124,9 @@ command_include(int argc, char *argv[]) for (i = 0; i < argc; i++) free(argvbuf[i]); free(argvbuf); + + if (res != CMD_OK) + printf("%s", command_errbuf); return(res); } Modified: head/stand/common/interp_forth.c ============================================================================== --- head/stand/common/interp_forth.c Mon Dec 11 16:17:53 2017 (r326771) +++ head/stand/common/interp_forth.c Mon Dec 11 16:18:05 2017 (r326772) @@ -294,21 +294,6 @@ interp_forth_init(void *ctx) /* Export some version numbers so that code can detect the loader/host version */ ficlSetEnv(bf_sys, "FreeBSD_version", __FreeBSD_version); ficlSetEnv(bf_sys, "loader_version", bootprog_rev); - -#if 0 /* XXX lost functionality -- imp */ - /* try to load and run init file if present */ - if (rc == NULL) - rc = "/boot/boot.4th"; - if (*rc != '\0') { - int fd; - - fd = open(rc, O_RDONLY); - if (fd != -1) { - (void)ficlExecFD(bf_vm, fd); - close(fd); - } - } -#endif } /* @@ -364,10 +349,12 @@ interp_forth_incl(void *ctx, const char *filename) fd = open(filename, O_RDONLY); if (fd == -1) { - printf("can't open %s\n", filename); + /* Hihger layers print the error message */ + snprintf(command_errbuf, sizeof(command_errbuf), + "can't open %s\n", filename); return (CMD_ERROR); } - return (ficlExecFD(softc->bf_vm, fd)); + return (ficlExecFD(softc->bf_vm, fd) == 0 ? CMD_OK : CMD_ERROR); } Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Mon Dec 11 16:17:53 2017 (r326771) +++ head/stand/efi/loader/main.c Mon Dec 11 16:18:05 2017 (r326772) @@ -501,7 +501,7 @@ main(int argc, CHAR16 *argv[]) #endif } - interact(NULL); /* doesn't return */ + interact(); /* doesn't return */ return (EFI_SUCCESS); /* keep compiler happy */ } Modified: head/stand/i386/loader/main.c ============================================================================== --- head/stand/i386/loader/main.c Mon Dec 11 16:17:53 2017 (r326771) +++ head/stand/i386/loader/main.c Mon Dec 11 16:18:05 2017 (r326772) @@ -232,7 +232,7 @@ main(void) bios_getsmap(); - interact(NULL); + interact(); /* if we ever get here, it is an error */ return (1); Modified: head/stand/mips/beri/loader/main.c ============================================================================== --- head/stand/mips/beri/loader/main.c Mon Dec 11 16:17:53 2017 (r326771) +++ head/stand/mips/beri/loader/main.c Mon Dec 11 16:18:05 2017 (r326772) @@ -149,7 +149,7 @@ main(int argc, char *argv[], char *envv[], struct boot printf("bootpath=\"%s\"\n", bootpath); #endif - interact(NULL); + interact(); return (0); } Modified: head/stand/ofw/common/main.c ============================================================================== --- head/stand/ofw/common/main.c Mon Dec 11 16:17:53 2017 (r326771) +++ head/stand/ofw/common/main.c Mon Dec 11 16:18:05 2017 (r326772) @@ -157,7 +157,7 @@ main(int (*openfirm)(void *)) archsw.arch_readin = ofw_readin; archsw.arch_autoload = ofw_autoload; - interact(NULL); /* doesn't return */ + interact(); /* doesn't return */ OF_exit(); Modified: head/stand/powerpc/kboot/main.c ============================================================================== --- head/stand/powerpc/kboot/main.c Mon Dec 11 16:17:53 2017 (r326771) +++ head/stand/powerpc/kboot/main.c Mon Dec 11 16:18:05 2017 (r326772) @@ -122,7 +122,7 @@ main(int argc, const char **argv) setenv("loaddev", bootdev, 1); setenv("LINES", "24", 1); - interact(NULL); /* doesn't return */ + interact(); /* doesn't return */ return (0); } Modified: head/stand/powerpc/ps3/main.c ============================================================================== --- head/stand/powerpc/ps3/main.c Mon Dec 11 16:17:53 2017 (r326771) +++ head/stand/powerpc/ps3/main.c Mon Dec 11 16:18:05 2017 (r326772) @@ -140,7 +140,7 @@ main(void) setenv("LINES", "24", 1); setenv("hw.platform", "ps3", 1); - interact(NULL); /* doesn't return */ + interact(); /* doesn't return */ return (0); } Modified: head/stand/sparc64/loader/main.c ============================================================================== --- head/stand/sparc64/loader/main.c Mon Dec 11 16:17:53 2017 (r326771) +++ head/stand/sparc64/loader/main.c Mon Dec 11 16:18:05 2017 (r326772) @@ -902,7 +902,7 @@ main(int (*openfirm)(void *)) printf("bootpath=\"%s\"\n", bootpath); /* Give control to the machine independent loader code. */ - interact(NULL); + interact(); return (1); } Modified: head/stand/userboot/userboot/main.c ============================================================================== --- head/stand/userboot/userboot/main.c Mon Dec 11 16:17:53 2017 (r326771) +++ head/stand/userboot/userboot/main.c Mon Dec 11 16:18:05 2017 (r326772) @@ -142,7 +142,7 @@ loader_main(struct loader_callbacks *cb, void *arg, in if (setjmp(jb)) return; - interact(NULL); /* doesn't return */ + interact(); /* doesn't return */ exit(0); } From owner-svn-src-all@freebsd.org Mon Dec 11 16:18:48 2017 Return-Path: Delivered-To: svn-src-all@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 9B1BCE96A7C; Mon, 11 Dec 2017 16:18:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 421656CC2A; Mon, 11 Dec 2017 16:18:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vBBGIds3099560 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 Dec 2017 18:18:42 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vBBGIds3099560 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vBBGIdc7099559; Mon, 11 Dec 2017 18:18:39 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 11 Dec 2017 18:18:39 +0200 From: Konstantin Belousov To: rgrimes@freebsd.org Cc: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Message-ID: <20171211161839.GM2272@kib.kiev.ua> References: <20171211152219.GL2272@kib.kiev.ua> <201712111533.vBBFX8sl081789@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201712111533.vBBFX8sl081789@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 16:18:48 -0000 On Mon, Dec 11, 2017 at 07:33:08AM -0800, Rodney W. Grimes wrote: > > On Mon, Dec 11, 2017 at 07:09:10AM -0800, Rodney W. Grimes wrote: > > > The current comment about a pcb, I thought that code was changed > > > so we only put the pointer to a pcb on the stack. > > > > pcb is on top of the stack, followed by the userspace FPU registers save > > area. I do not see any sense in existence of pcb in modern kernel, it is > > a remnant of the user area that was swappable. Currently pcb is swappable > > as well, but the value of this is much less then the overhead we pay by > > the stack space reduction. > > How about KSTACK_PAGES should be KSTAKE_BYTES/PAGESIZE, and we > need a much better formula for define of KSTACK_BYTES so that > these facts are more accurately defined? The FPU save area size depends on CPU we booted on, so if we increase (or decrease) it statically, we make a decision that is not good for one or another generation of processors. > > And a compile time assert if this ever growes to something unreasonable > that would cause other issues. So far it is an overkill, Intel did not passed the page boundary with all extensions defined. > > I fully agree with you that just bumping KSTACK_PAGES is very much > the wrong way to fix the i386 issue of certain code not running, > it is that code that should be examined for over usage of the stack. In fact there is a tunable which I added to avoid recompiling kernel if specific load requires large stack, keeping ZFS in mind. > > I can assert that the base i386 system is very usable for tons of > things without this change, I have at least 30 VM's running FreeBSD > 11.1/i386 in some very small footprints, typically 64MB, that have > zero issues. But then they are not using any of the code that > sited as problem areas. > > > FPU save area is the on of the problem which makes us increase the amd64 > > stack size, AVX or even AVX512 make the things much worse. It is unlikely > > that somebody would run 32bit kernel on machine capable of that extensions, > > i.e. Haswell or Skylake. > > Your igonoring the virutalization world, host is a skylake or haswell, guest > is i386 as it has small memory needs and no use to waste half of all pointers. If you are serious about avoiding the waste, then you would also disable unused extensions eating save area space, e.g. AVX512. AVX might be still useful (but not required) if AESNI or SHA extensions are used. > > We need to break the developers model that i386 is dead and that i386 is > not running on extremly modern hardware due to the factor of virtualization. > > Output from one of my VM's running inside bhyve: > > # uname -a > FreeBSD filestore.dnsmgr.net 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 04:10:47 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 > > # dmesg | head -24 > Copyright (c) 1992-2017 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017 > root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 > FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0) > VT(vga): resolution 640x480 > info: [drm] Initialized drm 1.1.0 20060810 > CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz (2494.39-MHz K8-class CPU) This is quite old processor, IvyBridge is 6 generations old :). From owner-svn-src-all@freebsd.org Mon Dec 11 16:21:25 2017 Return-Path: Delivered-To: svn-src-all@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 8A12EE96C7F; Mon, 11 Dec 2017 16:21:25 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 066F76CF69; Mon, 11 Dec 2017 16:21:24 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBBGLIvF007123 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2017 17:21:19 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: kostikbel@gmail.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBBGLCFv027739 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 11 Dec 2017 23:21:12 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Konstantin Belousov References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <20171211105242.GH2272@kib.kiev.ua> <5A2E6608.5090205@grosbein.net> <20171211150827.GJ2272@kib.kiev.ua> Cc: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A2EB072.6050803@grosbein.net> Date: Mon, 11 Dec 2017 23:21:06 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20171211150827.GJ2272@kib.kiev.ua> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 16:21:25 -0000 11.12.2017 22:08, Konstantin Belousov пишет: > On Mon, Dec 11, 2017 at 06:03:36PM +0700, Eugene Grosbein wrote: >> I do not try to contradict other usage patterns. In fact, I'm eager to know >> a practical example of such pattern: a task, an application, anything real? > Plain workstation use, like X11+browser+editor+some other programs easily > allocates 1000+ threads. It was still possible to use 32bit x86 for that, > of course in max memory config without PAE, and without ZFS. Add some > load that involves network, for instance torrent client, to establish the > pressure on KVA. > > I am almost sure that users would get troubles now. Understood. While I'm sure that modern internet browsers make it unconfortable to browse with less than 4G total RAM (e.g. 2GB) available for the system thus requiring amd64, I can imagine some old hardware without 64bit-enabled CPU used as workstation. We should add Release Notes and UPDATING entry for such i386 users about setting "kern.kstack_pages=2" back in /boot/loader.conf (or 3?) and warn them against combined usage of ZFS/SCTP/IPSEC until these subsystems get fixed to not abuse kernel stack. From owner-svn-src-all@freebsd.org Mon Dec 11 16:28:24 2017 Return-Path: Delivered-To: svn-src-all@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 99A0EE96EA9; Mon, 11 Dec 2017 16:28:24 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F8146D346; Mon, 11 Dec 2017 16:28:23 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBBGSE5J007169 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2017 17:28:15 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: rgrimes@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBBGSBY4029392 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 11 Dec 2017 23:28:11 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: rgrimes@freebsd.org, Conrad Meyer References: <201712111509.vBBF9Aha081695@pdx.rh.CN85.dnsmgr.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A2EB216.50209@grosbein.net> Date: Mon, 11 Dec 2017 23:28:06 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201712111509.vBBF9Aha081695@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 16:28:24 -0000 11.12.2017 22:09, Rodney W. Grimes write: > THis is a mistake, there is a huge worled of i386 deployment, not all > the world needs, or even wants amd64, especially in teh virtualization > world when you are running anything with less than 4G of memory, which > I would argue is a huge depolyement base. It is very easy for FreeBSD11/i386 to crash due to overflow of kernel stack no matter if it is virtualized or not. And that's very bad. Please take a look at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219476 for details. From owner-svn-src-all@freebsd.org Mon Dec 11 16:45:34 2017 Return-Path: Delivered-To: svn-src-all@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 7B575E97708; Mon, 11 Dec 2017 16:45:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 586E96DF68; Mon, 11 Dec 2017 16:45:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 8ADAF1684C; Mon, 11 Dec 2017 16:45:33 +0000 (UTC) Date: Mon, 11 Dec 2017 16:45:33 +0000 From: Alexey Dokuchaev To: Eugene Grosbein Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Message-ID: <20171211164533.GA7960@FreeBSD.org> References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <20171211105242.GH2272@kib.kiev.ua> <5A2E6608.5090205@grosbein.net> <20171211150827.GJ2272@kib.kiev.ua> <5A2EB072.6050803@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5A2EB072.6050803@grosbein.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 16:45:34 -0000 On Mon, Dec 11, 2017 at 11:21:06PM +0700, Eugene Grosbein wrote: > 11.12.2017 22:08, Konstantin Belousov пишет: > > Plain workstation use, like X11+browser+editor+some other programs easily > > allocates 1000+ threads. It was still possible to use 32bit x86 for that, > > of course in max memory config without PAE, and without ZFS. Add some > > load that involves network, for instance torrent client, to establish the > > pressure on KVA. > > > > I am almost sure that users would get troubles now. > > Understood. While I'm sure that modern internet browsers make it > uncomfortable to browse with less than 4G total RAM (e.g. 2GB) available > for the system thus requiring amd64, Browsing just fine on 2G RAM with Firefox, both under GNU/Linux and FreeBSD. Where does this "uncomfortable to browse with less than 4G total RAM" false narrative come from? :-/ ./danfe From owner-svn-src-all@freebsd.org Mon Dec 11 17:00:53 2017 Return-Path: Delivered-To: svn-src-all@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 4A404E97C67; Mon, 11 Dec 2017 17:00:53 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D29226E8A0; Mon, 11 Dec 2017 17:00:52 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBBH0hdL007418 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2017 18:00:44 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: danfe@FreeBSD.org Received: from [10.58.0.4] (dadv@[10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBBH0et9038259 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 12 Dec 2017 00:00:40 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Alexey Dokuchaev References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <20171211105242.GH2272@kib.kiev.ua> <5A2E6608.5090205@grosbein.net> <20171211150827.GJ2272@kib.kiev.ua> <5A2EB072.6050803@grosbein.net> <20171211164533.GA7960@FreeBSD.org> Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer From: Eugene Grosbein Message-ID: <5A2EB9B8.6010504@grosbein.net> Date: Tue, 12 Dec 2017 00:00:40 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20171211164533.GA7960@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 17:00:53 -0000 11.12.2017 23:45, Alexey Dokuchaev wrote: >> Understood. While I'm sure that modern internet browsers make it >> uncomfortable to browse with less than 4G total RAM (e.g. 2GB) available >> for the system thus requiring amd64, > > Browsing just fine on 2G RAM with Firefox, both under GNU/Linux and FreeBSD. > Where does this "uncomfortable to browse with less than 4G total RAM" false > narrative come from? :-/ My own experience. I use FreeBSD/amd64 as my desktop and workstation since 1999 and Firefox under FreeBSD always leaks memory like animal female. Some Firefox releases are little better than others but it's always greedy memory hog. From owner-svn-src-all@freebsd.org Mon Dec 11 17:33:05 2017 Return-Path: Delivered-To: svn-src-all@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 3F14DE9857F; Mon, 11 Dec 2017 17:33:05 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14F866FB22; Mon, 11 Dec 2017 17:33:04 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBBHX2QF082237; Mon, 11 Dec 2017 09:33:02 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBBHX2a0082236; Mon, 11 Dec 2017 09:33:02 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712111733.vBBHX2a0082236@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326758 - in head/sys/i386: conf include In-Reply-To: <5A2EB9B8.6010504@grosbein.net> To: Eugene Grosbein Date: Mon, 11 Dec 2017 09:33:02 -0800 (PST) CC: Alexey Dokuchaev , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 17:33:05 -0000 [ Charset UTF-8 unsupported, converting... ] > 11.12.2017 23:45, Alexey Dokuchaev wrote: > > >> Understood. While I'm sure that modern internet browsers make it > >> uncomfortable to browse with less than 4G total RAM (e.g. 2GB) available > >> for the system thus requiring amd64, > > > > Browsing just fine on 2G RAM with Firefox, both under GNU/Linux and FreeBSD. > > Where does this "uncomfortable to browse with less than 4G total RAM" false > > narrative come from? :-/ > > My own experience. I use FreeBSD/amd64 as my desktop and workstation since 1999 > and Firefox under FreeBSD always leaks memory like animal female. > Some Firefox releases are little better than others but it's always greedy memory hog. I suspect your amd64 version of firefox leaks memory 1.8 times faster than my i386 version of firefox??? Do you run any i386? They (mozilla) did finally wake up and realize it is a memory pig and did this quantum thing, but in the process broke a lot of things in the process, should we call this progrress by regression? I browse quiet confortable in 3.25G on a 32Bit OS on even an old E5800, using the pig that is FireFox 45.3.0 ESR. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Dec 11 17:58:15 2017 Return-Path: Delivered-To: svn-src-all@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 3503AE98E6F; Mon, 11 Dec 2017 17:58:15 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DF2B7084B; Mon, 11 Dec 2017 17:58:14 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBBHwCYU082323; Mon, 11 Dec 2017 09:58:12 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBBHwBlD082322; Mon, 11 Dec 2017 09:58:11 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712111758.vBBHwBlD082322@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326758 - in head/sys/i386: conf include In-Reply-To: <20171211161839.GM2272@kib.kiev.ua> To: Konstantin Belousov Date: Mon, 11 Dec 2017 09:58:11 -0800 (PST) CC: rgrimes@freebsd.org, Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 17:58:15 -0000 ... > > > > We need to break the developers model that i386 is dead and that i386 is > > not running on extremly modern hardware due to the factor of virtualization. > > > > Output from one of my VM's running inside bhyve: > > > > # uname -a > > FreeBSD filestore.dnsmgr.net 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 04:10:47 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 > > > > # dmesg | head -24 > > Copyright (c) 1992-2017 The FreeBSD Project. > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > > The Regents of the University of California. All rights reserved. > > FreeBSD is a registered trademark of The FreeBSD Foundation. > > FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017 > > root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 > > FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0) > > VT(vga): resolution 640x480 > > info: [drm] Initialized drm 1.1.0 20060810 > > CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz (2494.39-MHz K8-class CPU) > This is quite old processor, IvyBridge is 6 generations old :). I think you missed the point, this is a i386 guest running on an amd64 host inside of a hypervisor, bottom line, your gona see advanced amd64 features in i386 running in such situations, and we should probably stop ignoreing this fact and embrace it as reality. Another words you are going to see i386 running on the 6 generation newer CPU that I dont have, and to say that this is unlikely is just a false statement. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Dec 11 18:04:05 2017 Return-Path: Delivered-To: svn-src-all@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 D1E06E99151; Mon, 11 Dec 2017 18:04:05 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1AA770D36; Mon, 11 Dec 2017 18:04:05 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBI44i3074965; Mon, 11 Dec 2017 18:04:04 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBI44ZI074962; Mon, 11 Dec 2017 18:04:04 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201712111804.vBBI44ZI074962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 11 Dec 2017 18:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326773 - in head/sys: conf dev/syscon X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sys: conf dev/syscon X-SVN-Commit-Revision: 326773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 18:04:05 -0000 Author: kevans Date: Mon Dec 11 18:04:04 2017 New Revision: 326773 URL: https://svnweb.freebsd.org/changeset/base/326773 Log: Add generic 'syscon' driver Upstream dts for allwinner will require a syscon driver, since the emac node coming in 4.15 will be using xref to /soc/syscon for configuring the emac clock. Add a generic syscon driver to attach to /soc/syscon for use by if_awg, providing basic read/write functionality to consumers. syscon driver will also be used by arm64 at least for A64+H5 emac/if_awg. Written by: mmel Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D13295 Added: head/sys/dev/syscon/ head/sys/dev/syscon/syscon.c (contents, props changed) head/sys/dev/syscon/syscon_if.m (contents, props changed) Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Dec 11 16:18:05 2017 (r326772) +++ head/sys/conf/files Mon Dec 11 18:04:04 2017 (r326773) @@ -3109,6 +3109,8 @@ dev/stg/tmc18c30_subr.c optional stg dev/stge/if_stge.c optional stge dev/sym/sym_hipd.c optional sym \ dependency "$S/dev/sym/sym_{conf,defs}.h" +dev/syscon/syscon.c optional fdt syscon +dev/syscon/syscon_if.m optional fdt syscon dev/syscons/blank/blank_saver.c optional blank_saver dev/syscons/daemon/daemon_saver.c optional daemon_saver dev/syscons/dragon/dragon_saver.c optional dragon_saver Added: head/sys/dev/syscon/syscon.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/syscon/syscon.c Mon Dec 11 18:04:04 2017 (r326773) @@ -0,0 +1,185 @@ +/*- + * Copyright (c) 2015 Michal Meloun + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * This is a generic syscon driver, whose purpose is to provide access to + * various unrelated bits packed in a single register space. It is usually used + * as a fallback to more specific driver, but works well enough for simple + * access. + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include "syscon_if.h" + +#define SYSCON_LOCK(_sc) mtx_lock(&(_sc)->mtx) +#define SYSCON_UNLOCK(_sc) mtx_unlock(&(_sc)->mtx) +#define SYSCON_LOCK_INIT(_sc) mtx_init(&(_sc)->mtx, \ + device_get_nameunit((_sc)->dev), "syscon", MTX_DEF) +#define SYSCON_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->mtx); +#define SYSCON_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->mtx, MA_OWNED); +#define SYSCON_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->mtx, MA_NOTOWNED); + +struct syscon_softc { + device_t dev; + struct resource *mem_res; + struct mtx mtx; +}; + +static struct ofw_compat_data compat_data[] = { + {"syscon", 1}, + {NULL, 0} +}; + +static uint32_t +syscon_read_4(device_t dev, device_t consumer, bus_size_t offset) +{ + struct syscon_softc *sc; + uint32_t val; + + sc = device_get_softc(dev); + + SYSCON_LOCK(sc); + val = bus_read_4(sc->mem_res, offset); + SYSCON_UNLOCK(sc); + return (val); +} + +static void +syscon_write_4(device_t dev, device_t consumer, bus_size_t offset, uint32_t val) +{ + struct syscon_softc *sc; + + sc = device_get_softc(dev); + + SYSCON_LOCK(sc); + bus_write_4(sc->mem_res, offset, val); + SYSCON_UNLOCK(sc); +} + +static void +syscon_modify_4(device_t dev, device_t consumer, bus_size_t offset, + uint32_t clear_bits, uint32_t set_bits) +{ + struct syscon_softc *sc; + uint32_t val; + + sc = device_get_softc(dev); + + SYSCON_LOCK(sc); + val = bus_read_4(sc->mem_res, offset); + val &= ~clear_bits; + val |= ~set_bits; + bus_write_4(sc->mem_res, offset, val); + SYSCON_UNLOCK(sc); +} + +static int +syscon_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "syscon"); + return (BUS_PROBE_GENERIC); +} + +static int +syscon_attach(device_t dev) +{ + struct syscon_softc *sc; + int rid; + phandle_t node; + + sc = device_get_softc(dev); + sc->dev = dev; + node = ofw_bus_get_node(sc->dev); + + SYSCON_LOCK_INIT(sc); + + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->mem_res == NULL) { + device_printf(dev, "Cannot allocate memory resource\n"); + return (ENXIO); + } + + OF_device_register_xref(OF_xref_from_node(node), dev); + + return (0); +} + +static int +syscon_detach(device_t dev) +{ + struct syscon_softc *sc; + + sc = device_get_softc(dev); + + OF_device_register_xref(OF_xref_from_device(dev), NULL); + + SYSCON_LOCK_DESTROY(sc); + if (sc->mem_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); + return (0); +} + +static device_method_t syscon_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, syscon_probe), + DEVMETHOD(device_attach, syscon_attach), + DEVMETHOD(device_detach, syscon_detach), + + /* Syscon interface */ + DEVMETHOD(syscon_read_4, syscon_read_4), + DEVMETHOD(syscon_write_4, syscon_write_4), + DEVMETHOD(syscon_modify_4, syscon_modify_4), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(syscon, syscon_driver, syscon_methods, + sizeof(struct syscon_softc)); +static devclass_t syscon_devclass; +EARLY_DRIVER_MODULE(syscon, simplebus, syscon_driver, syscon_devclass, 0, 0, + BUS_PASS_BUS + BUS_PASS_ORDER_LATE); +MODULE_VERSION(syscon, 1); Added: head/sys/dev/syscon/syscon_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/syscon/syscon_if.m Mon Dec 11 18:04:04 2017 (r326773) @@ -0,0 +1,55 @@ +#- +# Copyright (c) 2015 Michal Meloun +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#include + +INTERFACE syscon; + +/** + * Accessor functions for syscon register space + */ +METHOD uint32_t read_4 { + device_t dev; + device_t consumer; + bus_size_t offset; +}; + +METHOD void write_4 { + device_t dev; + device_t consumer; + bus_size_t offset; + uint32_t val; +}; + +METHOD void modify_4 { + device_t dev; + device_t consumer; + bus_size_t offset; + uint32_t clear_bits; + uint32_t set_bits; +}; From owner-svn-src-all@freebsd.org Mon Dec 11 18:14:14 2017 Return-Path: Delivered-To: svn-src-all@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 076C4E997A7; Mon, 11 Dec 2017 18:14:14 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E83FF71786; Mon, 11 Dec 2017 18:14:13 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net ([149.142.15.7]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id vBBIE53D021444 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 11 Dec 2017 10:14:05 -0800 Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon To: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201712111804.vBBI44ZI074962@repo.freebsd.org> From: Nathan Whitehorn Message-ID: Date: Mon, 11 Dec 2017 10:14:04 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <201712111804.vBBI44ZI074962@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Sonic-CAuth: UmFuZG9tSVbZH/snKpVcmd4+IIKy9XGZdoWyqtbMPyo/XrfGot0NWlSwyQ1l6mLx2RNQgJtE7BnPSo/z+YJZM/6LBDQQjvvGHDIaOXoVgUw= X-Sonic-ID: C;AjWLEp/e5xGTypdP6JRttw== M;rqPeEp/e5xGTypdP6JRttw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 18:14:14 -0000 I think this name might confuse people looking for "syscons". Can it be renamed? Also, if it is ARM-specific, maybe it belongs in sys/arm? -Nathan On 12/11/17 10:04, Kyle Evans wrote: > Author: kevans > Date: Mon Dec 11 18:04:04 2017 > New Revision: 326773 > URL: https://svnweb.freebsd.org/changeset/base/326773 > > Log: > Add generic 'syscon' driver > > Upstream dts for allwinner will require a syscon driver, since the emac node > coming in 4.15 will be using xref to /soc/syscon for configuring the emac > clock. Add a generic syscon driver to attach to /soc/syscon for use by > if_awg, providing basic read/write functionality to consumers. > > syscon driver will also be used by arm64 at least for A64+H5 emac/if_awg. > > Written by: mmel > Reviewed by: manu > Differential Revision: https://reviews.freebsd.org/D13295 > > Added: > head/sys/dev/syscon/ > head/sys/dev/syscon/syscon.c (contents, props changed) > head/sys/dev/syscon/syscon_if.m (contents, props changed) > Modified: > head/sys/conf/files > > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Mon Dec 11 16:18:05 2017 (r326772) > +++ head/sys/conf/files Mon Dec 11 18:04:04 2017 (r326773) > @@ -3109,6 +3109,8 @@ dev/stg/tmc18c30_subr.c optional stg > dev/stge/if_stge.c optional stge > dev/sym/sym_hipd.c optional sym \ > dependency "$S/dev/sym/sym_{conf,defs}.h" > +dev/syscon/syscon.c optional fdt syscon > +dev/syscon/syscon_if.m optional fdt syscon > dev/syscons/blank/blank_saver.c optional blank_saver > dev/syscons/daemon/daemon_saver.c optional daemon_saver > dev/syscons/dragon/dragon_saver.c optional dragon_saver > > Added: head/sys/dev/syscon/syscon.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/syscon/syscon.c Mon Dec 11 18:04:04 2017 (r326773) > @@ -0,0 +1,185 @@ > +/*- > + * Copyright (c) 2015 Michal Meloun > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +/* > + * This is a generic syscon driver, whose purpose is to provide access to > + * various unrelated bits packed in a single register space. It is usually used > + * as a fallback to more specific driver, but works well enough for simple > + * access. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#include > +#include > + > +#include "syscon_if.h" > + > +#define SYSCON_LOCK(_sc) mtx_lock(&(_sc)->mtx) > +#define SYSCON_UNLOCK(_sc) mtx_unlock(&(_sc)->mtx) > +#define SYSCON_LOCK_INIT(_sc) mtx_init(&(_sc)->mtx, \ > + device_get_nameunit((_sc)->dev), "syscon", MTX_DEF) > +#define SYSCON_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->mtx); > +#define SYSCON_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->mtx, MA_OWNED); > +#define SYSCON_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->mtx, MA_NOTOWNED); > + > +struct syscon_softc { > + device_t dev; > + struct resource *mem_res; > + struct mtx mtx; > +}; > + > +static struct ofw_compat_data compat_data[] = { > + {"syscon", 1}, > + {NULL, 0} > +}; > + > +static uint32_t > +syscon_read_4(device_t dev, device_t consumer, bus_size_t offset) > +{ > + struct syscon_softc *sc; > + uint32_t val; > + > + sc = device_get_softc(dev); > + > + SYSCON_LOCK(sc); > + val = bus_read_4(sc->mem_res, offset); > + SYSCON_UNLOCK(sc); > + return (val); > +} > + > +static void > +syscon_write_4(device_t dev, device_t consumer, bus_size_t offset, uint32_t val) > +{ > + struct syscon_softc *sc; > + > + sc = device_get_softc(dev); > + > + SYSCON_LOCK(sc); > + bus_write_4(sc->mem_res, offset, val); > + SYSCON_UNLOCK(sc); > +} > + > +static void > +syscon_modify_4(device_t dev, device_t consumer, bus_size_t offset, > + uint32_t clear_bits, uint32_t set_bits) > +{ > + struct syscon_softc *sc; > + uint32_t val; > + > + sc = device_get_softc(dev); > + > + SYSCON_LOCK(sc); > + val = bus_read_4(sc->mem_res, offset); > + val &= ~clear_bits; > + val |= ~set_bits; > + bus_write_4(sc->mem_res, offset, val); > + SYSCON_UNLOCK(sc); > +} > + > +static int > +syscon_probe(device_t dev) > +{ > + > + if (!ofw_bus_status_okay(dev)) > + return (ENXIO); > + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) > + return (ENXIO); > + > + device_set_desc(dev, "syscon"); > + return (BUS_PROBE_GENERIC); > +} > + > +static int > +syscon_attach(device_t dev) > +{ > + struct syscon_softc *sc; > + int rid; > + phandle_t node; > + > + sc = device_get_softc(dev); > + sc->dev = dev; > + node = ofw_bus_get_node(sc->dev); > + > + SYSCON_LOCK_INIT(sc); > + > + rid = 0; > + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, > + RF_ACTIVE); > + if (sc->mem_res == NULL) { > + device_printf(dev, "Cannot allocate memory resource\n"); > + return (ENXIO); > + } > + > + OF_device_register_xref(OF_xref_from_node(node), dev); > + > + return (0); > +} > + > +static int > +syscon_detach(device_t dev) > +{ > + struct syscon_softc *sc; > + > + sc = device_get_softc(dev); > + > + OF_device_register_xref(OF_xref_from_device(dev), NULL); > + > + SYSCON_LOCK_DESTROY(sc); > + if (sc->mem_res != NULL) > + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); > + return (0); > +} > + > +static device_method_t syscon_methods[] = { > + /* Device interface */ > + DEVMETHOD(device_probe, syscon_probe), > + DEVMETHOD(device_attach, syscon_attach), > + DEVMETHOD(device_detach, syscon_detach), > + > + /* Syscon interface */ > + DEVMETHOD(syscon_read_4, syscon_read_4), > + DEVMETHOD(syscon_write_4, syscon_write_4), > + DEVMETHOD(syscon_modify_4, syscon_modify_4), > + > + DEVMETHOD_END > +}; > + > +DEFINE_CLASS_0(syscon, syscon_driver, syscon_methods, > + sizeof(struct syscon_softc)); > +static devclass_t syscon_devclass; > +EARLY_DRIVER_MODULE(syscon, simplebus, syscon_driver, syscon_devclass, 0, 0, > + BUS_PASS_BUS + BUS_PASS_ORDER_LATE); > +MODULE_VERSION(syscon, 1); > > Added: head/sys/dev/syscon/syscon_if.m > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/syscon/syscon_if.m Mon Dec 11 18:04:04 2017 (r326773) > @@ -0,0 +1,55 @@ > +#- > +# Copyright (c) 2015 Michal Meloun > +# All rights reserved. > +# > +# Redistribution and use in source and binary forms, with or without > +# modification, are permitted provided that the following conditions > +# are met: > +# 1. Redistributions of source code must retain the above copyright > +# notice, this list of conditions and the following disclaimer. > +# 2. Redistributions in binary form must reproduce the above copyright > +# notice, this list of conditions and the following disclaimer in the > +# documentation and/or other materials provided with the distribution. > +# > +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +# SUCH DAMAGE. > +# > +# $FreeBSD$ > +# > + > +#include > + > +INTERFACE syscon; > + > +/** > + * Accessor functions for syscon register space > + */ > +METHOD uint32_t read_4 { > + device_t dev; > + device_t consumer; > + bus_size_t offset; > +}; > + > +METHOD void write_4 { > + device_t dev; > + device_t consumer; > + bus_size_t offset; > + uint32_t val; > +}; > + > +METHOD void modify_4 { > + device_t dev; > + device_t consumer; > + bus_size_t offset; > + uint32_t clear_bits; > + uint32_t set_bits; > +}; > From owner-svn-src-all@freebsd.org Mon Dec 11 18:34:44 2017 Return-Path: Delivered-To: svn-src-all@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 AD805E9A3F1 for ; Mon, 11 Dec 2017 18:34:44 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E20072B53 for ; Mon, 11 Dec 2017 18:34:44 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: ee766853-dea1-11e7-93a5-cd02e7dc7692 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id ee766853-dea1-11e7-93a5-cd02e7dc7692; Mon, 11 Dec 2017 18:34:33 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id vBBIYaGr006303; Mon, 11 Dec 2017 11:34:36 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1513017276.5897.17.camel@freebsd.org> Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon From: Ian Lepore To: Nathan Whitehorn , Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 11 Dec 2017 11:34:36 -0700 In-Reply-To: References: <201712111804.vBBI44ZI074962@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 18:34:44 -0000 On Mon, 2017-12-11 at 10:14 -0800, Nathan Whitehorn wrote: > I think this name might confuse people looking for "syscons". Can it > be  > renamed? Also, if it is ARM-specific, maybe it belongs in sys/arm? > -Nathan > > On 12/11/17 10:04, Kyle Evans wrote: > > > > Author: kevans > > Date: Mon Dec 11 18:04:04 2017 > > New Revision: 326773 > > URL: https://svnweb.freebsd.org/changeset/base/326773 > > > > Log: > >    Add generic 'syscon' driver > >     It's definitely not arm-specific.  It's the modern linux/fdt way of letting drivers access MMIO spaces they don't own (in terms of those ranges being included in a reg property that would cause us to set up rman resources for the device). I'm not sure I would have made a new directory in dev/ for it though... it's such a trivial little thing I would think it belongs with the dev/extres stuff. -- Ian From owner-svn-src-all@freebsd.org Mon Dec 11 18:52:38 2017 Return-Path: Delivered-To: svn-src-all@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 88AC3E9AC6A; Mon, 11 Dec 2017 18:52:38 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0660B7381F; Mon, 11 Dec 2017 18:52:36 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBBIqQ34008151 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2017 19:52:27 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: rgrimes@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBBIqN1S070001 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 12 Dec 2017 01:52:23 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: rgrimes@freebsd.org References: <201712111733.vBBHX2a0082236@pdx.rh.CN85.dnsmgr.net> Cc: Alexey Dokuchaev , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer From: Eugene Grosbein Message-ID: <5A2ED3E1.1060908@grosbein.net> Date: Tue, 12 Dec 2017 01:52:17 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201712111733.vBBHX2a0082236@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 18:52:38 -0000 12.12.2017 0:33, Rodney W. Grimes пишет: > [ Charset UTF-8 unsupported, converting... ] >> 11.12.2017 23:45, Alexey Dokuchaev wrote: >> >>>> Understood. While I'm sure that modern internet browsers make it >>>> uncomfortable to browse with less than 4G total RAM (e.g. 2GB) available >>>> for the system thus requiring amd64, >>> >>> Browsing just fine on 2G RAM with Firefox, both under GNU/Linux and FreeBSD. >>> Where does this "uncomfortable to browse with less than 4G total RAM" false >>> narrative come from? :-/ >> >> My own experience. I use FreeBSD/amd64 as my desktop and workstation since 1999 >> and Firefox under FreeBSD always leaks memory like animal female. >> Some Firefox releases are little better than others but it's always greedy memory hog. > > I suspect your amd64 version of firefox leaks memory 1.8 times faster than > my i386 version of firefox??? Don't know. > Do you run any i386? Now I run FreeBSD 11/i386 as my home router with IPSEC and torrent client, and I run several virtualized routers with IPSEC tunnels, jabber and mail server, squid and ZFS for src/obj/ports compression and they all easily crash unless kern.kstack_pages raised upto 4. Same for some other my i386 installations having IPSEC tunnels. In times of 8.0-STABLE I realised than while it's definitley *possible* to run Firefox plus Thunderbird plus couple of small Virtualbox instances using i386, it is much more comfortable with amd64 and 8GB of RAM, so I migrated my desktop and workstation to 8.0-STABLE/amd64 and never looked back :-) From owner-svn-src-all@freebsd.org Mon Dec 11 18:52:47 2017 Return-Path: Delivered-To: svn-src-all@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 75BF0E9AC9C; Mon, 11 Dec 2017 18:52:47 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 065077389E; Mon, 11 Dec 2017 18:52:46 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from [IPv6:2003:cd:6be2:1e00:f0bf:d227:496f:40c1] (p200300CD6BE21E00F0BFD227496F40C1.dip0.t-ipconnect.de [IPv6:2003:cd:6be2:1e00:f0bf:d227:496f:40c1]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id F26B671E3F90A; Mon, 11 Dec 2017 19:52:40 +0100 (CET) From: Michael Tuexen Message-Id: <7A052A1A-EFB4-489D-B8DF-C8080AD59A20@fh-muenster.de> Content-Type: multipart/signed; boundary="Apple-Mail=_56BF839B-7AEA-4AD5-BAFD-3F54C26E752B"; protocol="application/pkcs7-signature"; micalg=sha1 Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Date: Mon, 11 Dec 2017 19:52:38 +0100 In-Reply-To: <5A2EB072.6050803@grosbein.net> Cc: Konstantin Belousov , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Eugene Grosbein References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <20171211105242.GH2272@kib.kiev.ua> <5A2E6608.5090205@grosbein.net> <20171211150827.GJ2272@kib.kiev.ua> <5A2EB072.6050803@grosbein.net> X-Mailer: Apple Mail (2.3445.5.20) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 18:52:47 -0000 --Apple-Mail=_56BF839B-7AEA-4AD5-BAFD-3F54C26E752B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 11. Dec 2017, at 17:21, Eugene Grosbein wrote: >=20 > 11.12.2017 22:08, Konstantin Belousov =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> On Mon, Dec 11, 2017 at 06:03:36PM +0700, Eugene Grosbein wrote: >>> I do not try to contradict other usage patterns. In fact, I'm eager = to know >>> a practical example of such pattern: a task, an application, = anything real? >> Plain workstation use, like X11+browser+editor+some other programs = easily >> allocates 1000+ threads. It was still possible to use 32bit x86 for = that, >> of course in max memory config without PAE, and without ZFS. Add = some >> load that involves network, for instance torrent client, to establish = the >> pressure on KVA. >>=20 >> I am almost sure that users would get troubles now. >=20 > Understood. While I'm sure that modern internet browsers make it = unconfortable > to browse with less than 4G total RAM (e.g. 2GB) available for the = system thus requiring amd64, > I can imagine some old hardware without 64bit-enabled CPU used as = workstation. >=20 > We should add Release Notes and UPDATING entry for such i386 users = about > setting "kern.kstack_pages=3D2" back in /boot/loader.conf (or 3?) > and warn them against combined usage of ZFS/SCTP/IPSEC until these = subsystems get fixed > to not abuse kernel stack. Not sure about IPSEC and ZFS. But I was NOT able to reproduce the issue = by just using an SCTP association on a 32-bit VM using FreeBSD 11.1. So right now I = don't know what is wrong and therefore what could be fixed... Best regards Michael >=20 >=20 >=20 --Apple-Mail=_56BF839B-7AEA-4AD5-BAFD-3F54C26E752B Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIQkDCCBNUw ggO9oAMCAQICCFBOxvU9EbRkMA0GCSqGSIb3DQEBCwUAMHExCzAJBgNVBAYTAkRFMRwwGgYDVQQK ExNEZXV0c2NoZSBUZWxla29tIEFHMR8wHQYDVQQLExZULVRlbGVTZWMgVHJ1c3QgQ2VudGVyMSMw IQYDVQQDExpEZXV0c2NoZSBUZWxla29tIFJvb3QgQ0EgMjAeFw0xNDA3MjIxMjA4MjZaFw0xOTA3 MDkyMzU5MDBaMFoxCzAJBgNVBAYTAkRFMRMwEQYDVQQKEwpERk4tVmVyZWluMRAwDgYDVQQLEwdE Rk4tUEtJMSQwIgYDVQQDExtERk4tVmVyZWluIFBDQSBHbG9iYWwgLSBHMDEwggEiMA0GCSqGSIb3 DQEBAQUAA4IBDwAwggEKAoIBAQDpm8NnhfkNrvWNVMOWUDU9YuluTO2U1wBblSJ01CDrNI/W7MAx BAuZgeKmFNJSoCgjhIt0iQReW+DieMF4yxbLKDU5ey2QRdDtoAB6fL9KDhsAw4bpXCsxEXsM84Ik Q4wcOItqaACa7txPeKvSxhObdq3u3ibo7wGvdA/BCaL2a869080UME/15eOkyGKbghoDJzANAmVg Te3RCSMqljVYJ9N2xnG2kB3E7f81hn1vM7PbD8URwoqDoZRdQWvY0hD1TP3KUazZve+Sg7va64sW VlZDz+HVEz2mHycwzUlU28kTNJpxdcVs6qcLmPkhnSevPqM5OUhqjK3JmfvDEvK9AgMBAAGjggGG MIIBgjAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFEm3xs/oPR9/6kR7Eyn38QpwPt5kMB8GA1Ud IwQYMBaAFDHDeRu69VPXF+CJei0XbAqzK50zMBIGA1UdEwEB/wQIMAYBAf8CAQIwYgYDVR0gBFsw WTARBg8rBgEEAYGtIYIsAQEEAgIwEQYPKwYBBAGBrSGCLAEBBAMAMBEGDysGAQQBga0hgiwBAQQD ATAPBg0rBgEEAYGtIYIsAQEEMA0GCysGAQQBga0hgiweMD4GA1UdHwQ3MDUwM6AxoC+GLWh0dHA6 Ly9wa2kwMzM2LnRlbGVzZWMuZGUvcmwvRFRfUk9PVF9DQV8yLmNybDB4BggrBgEFBQcBAQRsMGow LAYIKwYBBQUHMAGGIGh0dHA6Ly9vY3NwMDMzNi50ZWxlc2VjLmRlL29jc3ByMDoGCCsGAQUFBzAC hi5odHRwOi8vcGtpMDMzNi50ZWxlc2VjLmRlL2NydC9EVF9ST09UX0NBXzIuY2VyMA0GCSqGSIb3 DQEBCwUAA4IBAQBjICj9nCGGcr45Rlk5MiW8qQGbDczKfUGchm0KbiyzE1l1sTOSG2EnFv/DstU1 gvuEKgFJvWa7Zi+ywgZdbj9u4wFaW8pDY1yVtuExpx/VB19N5mWCTjL5w3x6S81NXHTuIfJ1AuxS PtLJatOQI25JZzW+f01WpOzML8+3oZeocj7JvEDWWqQIPda8gsO3tzKOsSyOam23NQIZz/U5RFhj pyQAELC7/E6vbi84u6VXST/YblBvLJeW3B1GmmWJz67M8uXZn1OzPqEvkqnYC8aEHwTG6x7on321 e6UC8STFJGMRNMxakyAqeYg6JUKQqWU7fIbTEhUjKfws2sw5W1QXMIIFojCCBIqgAwIBAgIHF6Qk oQlIMzANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJERTETMBEGA1UEChMKREZOLVZlcmVpbjEQ MA4GA1UECxMHREZOLVBLSTEkMCIGA1UEAxMbREZOLVZlcmVpbiBQQ0EgR2xvYmFsIC0gRzAxMB4X DTE0MDUyNzE0NTQwOVoXDTE5MDcwOTIzNTkwMFowgcYxCzAJBgNVBAYTAkRFMRwwGgYDVQQIExNO b3JkcmhlaW4tV2VzdGZhbGVuMREwDwYDVQQHEwhNdWVuc3RlcjEgMB4GA1UEChMXRmFjaGhvY2hz Y2h1bGUgTXVlbnN0ZXIxIzAhBgNVBAsTGkRhdGVudmVyYXJiZWl0dW5nc3plbnRyYWxlMR0wGwYD VQQDExRGSCBNdWVuc3RlciBDQSAtIEcwMTEgMB4GCSqGSIb3DQEJARYRY2FAZmgtbXVlbnN0ZXIu ZGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4eWyu8GzsIv0iowf2v/9BT0SmCFNX /eyQe5BncOk1j6XIlY5bnNu1S5uBe3uVgekgTh3gJyVNlaoIfCgAjqCrNJIaNQq5fr/S6L8uFeaU O8IF/C4RH5P7f9Hn2GUueEjmJhg9CI3LBAhrfAmEEtNmuVfDycN2MjngwDNxUNRfuXbWxuhkgDqJ 0ztJeayHGhFDrGx88eyStx40xy+0c0OFWdWxzBFQlBRHnl+zRftj3c9qy6BY+/fGaA2vV1oKr3h5 X6eyU1T8YlpP1NDe4bylqAteX01sM2Qciu8UAPnNc7Sb93TQjhCFRVDIS3CdN6AOpwz5YWEld6ey CdmFZ7pvAgMBAAGjggH+MIIB+jASBgNVHRMBAf8ECDAGAQH/AgEBMA4GA1UdDwEB/wQEAwIBBjAR BgNVHSAECjAIMAYGBFUdIAAwHQYDVR0OBBYEFArzW7zkMYDWNUKJptPDzzfe0d/XMB8GA1UdIwQY MBaAFEm3xs/oPR9/6kR7Eyn38QpwPt5kMBwGA1UdEQQVMBOBEWNhQGZoLW11ZW5zdGVyLmRlMIGI BgNVHR8EgYAwfjA9oDugOYY3aHR0cDovL2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9vdC1jYS9w dWIvY3JsL2NhY3JsLmNybDA9oDugOYY3aHR0cDovL2NkcDIucGNhLmRmbi5kZS9nbG9iYWwtcm9v dC1jYS9wdWIvY3JsL2NhY3JsLmNybDCB1wYIKwYBBQUHAQEEgcowgccwMwYIKwYBBQUHMAGGJ2h0 dHA6Ly9vY3NwLnBjYS5kZm4uZGUvT0NTUC1TZXJ2ZXIvT0NTUDBHBggrBgEFBQcwAoY7aHR0cDov L2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9vdC1jYS9wdWIvY2FjZXJ0L2NhY2VydC5jcnQwRwYI KwYBBQUHMAKGO2h0dHA6Ly9jZHAyLnBjYS5kZm4uZGUvZ2xvYmFsLXJvb3QtY2EvcHViL2NhY2Vy dC9jYWNlcnQuY3J0MA0GCSqGSIb3DQEBCwUAA4IBAQDeRwM11kpvuRIPuzWXLapr/ZBtB76V3cuF l45x/Kx0u03yjB4GaBPcxihn4P1z5KhRYkDBMo8HXkOgbL59aF6VdOlCurEgZvghKvUkKOCyWeYx S9rTGPBkbGiNn2ATVuLXzF8rDf50ynAIu3otstOOv+3Ifqi1pzCva1nO64khQA5Gd5/BNyu+YHbW f8ERAf9leu5a7yVI7cv1gCZAHpWJpkUKmfawyY4sAJ2hbGZRBvdACOxrfbuMdSOzPneT2rlmvH+D 7M6DmzVabLYk6UtAxQhldd/T/qsHkWvaWXHt0Eb9STs2Fl03Ls7M3NyLQLhaeR3ysNURYcaEfaB+ lxN+MIIGDTCCBPWgAwIBAgIHG5mIdDexozANBgkqhkiG9w0BAQsFADCBxjELMAkGA1UEBhMCREUx HDAaBgNVBAgTE05vcmRyaGVpbi1XZXN0ZmFsZW4xETAPBgNVBAcTCE11ZW5zdGVyMSAwHgYDVQQK ExdGYWNoaG9jaHNjaHVsZSBNdWVuc3RlcjEjMCEGA1UECxMaRGF0ZW52ZXJhcmJlaXR1bmdzemVu dHJhbGUxHTAbBgNVBAMTFEZIIE11ZW5zdGVyIENBIC0gRzAxMSAwHgYJKoZIhvcNAQkBFhFjYUBm aC1tdWVuc3Rlci5kZTAeFw0xNjA3MDQwNzA2MTNaFw0xOTA3MDQwNzA2MTNaMHwxCzAJBgNVBAYT AkRFMSAwHgYDVQQKDBdGYWNoaG9jaHNjaHVsZSBNdWVuc3RlcjEyMDAGA1UECwwpRmFjaGJlcmVp Y2ggRWxla3Ryb3RlY2huaWsgdW5kIEluZm9ybWF0aWsxFzAVBgNVBAMMDk1pY2hhZWwgVHVleGVu MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzJoaUG3Zm24XxA/zNg2sbFcL56w8xqMg +X6G7UsYec3YEncnlkw3jgE5nDefos7UVoCA7wPjFTj8AQt5xfpXElnbM45IPy5Ng7g6dS7biGSM VRACPXe1PrjgApRAwwGmCPvALnZXkmKP6Zlf+3VLfz9YWIIaeKu3jFM2Lk6Y3gr5U1l8bjHSawOo WMlfvSsXXLT38zKW7Uz9jS278j0OqHANBPgsE6/LJoCWFInwlvybxhO3nGU7OteUGaPikqzvjLsL YgpHDi0WjMZfVx/UtUSzZ4EJvmJTBeuVwyKnCbrawnfwYPTQQ6VE1OkAzmsMByBbEwJ996RtG//T XCG06QIDAQABo4ICRzCCAkMwQAYDVR0gBDkwNzARBg8rBgEEAYGtIYIsAQEEAwUwEQYPKwYBBAGB rSGCLAIBBAMBMA8GDSsGAQQBga0hgiwBAQQwCQYDVR0TBAIwADAOBgNVHQ8BAf8EBAMCBeAwHQYD VR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMB0GA1UdDgQWBBTQHa9qhKgSZgCCAPThZkXaEaJ/ dTAfBgNVHSMEGDAWgBQK81u85DGA1jVCiabTw8833tHf1zAgBgNVHREEGTAXgRV0dWV4ZW5AZmgt bXVlbnN0ZXIuZGUwgYgGA1UdHwSBgDB+MD2gO6A5hjdodHRwOi8vY2RwMS5wY2EuZGZuLmRlL2Zo LW11ZW5zdGVyLWNhL3B1Yi9jcmwvY2FjcmwuY3JsMD2gO6A5hjdodHRwOi8vY2RwMi5wY2EuZGZu LmRlL2ZoLW11ZW5zdGVyLWNhL3B1Yi9jcmwvY2FjcmwuY3JsMIHXBggrBgEFBQcBAQSByjCBxzAz BggrBgEFBQcwAYYnaHR0cDovL29jc3AucGNhLmRmbi5kZS9PQ1NQLVNlcnZlci9PQ1NQMEcGCCsG AQUFBzAChjtodHRwOi8vY2RwMS5wY2EuZGZuLmRlL2ZoLW11ZW5zdGVyLWNhL3B1Yi9jYWNlcnQv Y2FjZXJ0LmNydDBHBggrBgEFBQcwAoY7aHR0cDovL2NkcDIucGNhLmRmbi5kZS9maC1tdWVuc3Rl ci1jYS9wdWIvY2FjZXJ0L2NhY2VydC5jcnQwDQYJKoZIhvcNAQELBQADggEBAEj2/6x4kzoCVIiu aaminPrOHxACyoYsmSRjYPQpgW5xRj/FlolO1nG+ZZ11sqTb3TdCGD69ko5/zs8eGKnv/i0VLCHF g1JLfpaxElN5RrR/cqRJrbzKshF9aUkBODF8vlf9BCeimMK3fifjbbWRyxHssfEECffujD7/Yvta NYMO46Roz39lIK2s37IVFq3V5RWzUeTuwpP9t8lOxirOi9eK2OYI/dh0HjR2S5Dr9nMR1dNulrhz jlFxGc+opefGScrRR9Ec0eqTXlbt1Q9UzNIYVS+OGZY8/bBbprwXVTmwSp8dygEULkIaMbLsaTaW 6TehuL8ousPJkL52SOENgSkxggQpMIIEJQIBATCB0jCBxjELMAkGA1UEBhMCREUxHDAaBgNVBAgT E05vcmRyaGVpbi1XZXN0ZmFsZW4xETAPBgNVBAcTCE11ZW5zdGVyMSAwHgYDVQQKExdGYWNoaG9j aHNjaHVsZSBNdWVuc3RlcjEjMCEGA1UECxMaRGF0ZW52ZXJhcmJlaXR1bmdzemVudHJhbGUxHTAb BgNVBAMTFEZIIE11ZW5zdGVyIENBIC0gRzAxMSAwHgYJKoZIhvcNAQkBFhFjYUBmaC1tdWVuc3Rl ci5kZQIHG5mIdDexozAJBgUrDgMCGgUAoIICKzAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwG CSqGSIb3DQEJBTEPFw0xNzEyMTExODUyMzhaMCMGCSqGSIb3DQEJBDEWBBR0hHuhgLy0zgrNb0SO MmD/snczYTCB4wYJKwYBBAGCNxAEMYHVMIHSMIHGMQswCQYDVQQGEwJERTEcMBoGA1UECBMTTm9y ZHJoZWluLVdlc3RmYWxlbjERMA8GA1UEBxMITXVlbnN0ZXIxIDAeBgNVBAoTF0ZhY2hob2Noc2No dWxlIE11ZW5zdGVyMSMwIQYDVQQLExpEYXRlbnZlcmFyYmVpdHVuZ3N6ZW50cmFsZTEdMBsGA1UE AxMURkggTXVlbnN0ZXIgQ0EgLSBHMDExIDAeBgkqhkiG9w0BCQEWEWNhQGZoLW11ZW5zdGVyLmRl AgcbmYh0N7GjMIHlBgsqhkiG9w0BCRACCzGB1aCB0jCBxjELMAkGA1UEBhMCREUxHDAaBgNVBAgT E05vcmRyaGVpbi1XZXN0ZmFsZW4xETAPBgNVBAcTCE11ZW5zdGVyMSAwHgYDVQQKExdGYWNoaG9j aHNjaHVsZSBNdWVuc3RlcjEjMCEGA1UECxMaRGF0ZW52ZXJhcmJlaXR1bmdzemVudHJhbGUxHTAb BgNVBAMTFEZIIE11ZW5zdGVyIENBIC0gRzAxMSAwHgYJKoZIhvcNAQkBFhFjYUBmaC1tdWVuc3Rl ci5kZQIHG5mIdDexozANBgkqhkiG9w0BAQEFAASCAQA96YDVGbSRhdWmbqjRZzSdk1sz1fef3Hys iXtRdMiqWf1R6GodW0tMRBL4VZ8M+68Di2X78jTntWLD9C3+0q773fSLKJ4KY2m0YdvYmgz9+u5m 9YukQhV5OU93KiWAV/8xAYt7IwUbUJJYZ7dfjjb+Z+hTIlQWt2XYn5k/tDpM0BKTUPGjADQGqYOK fyuqbYX/hnTA7hARqkGeNJrpbrQIIWgvNS2S4uaoOXhjZyFvsmZlGcK7DmME6MUirGclKyaZiQ9f wSvQA+KEgpytV6SM4p+bCnxYar4N8vXEJrwNv652Wk2wjJBok3VLrxvrMKjNzaSN15T6SczdZ048 FVZ5AAAAAAAA --Apple-Mail=_56BF839B-7AEA-4AD5-BAFD-3F54C26E752B-- From owner-svn-src-all@freebsd.org Mon Dec 11 19:02:07 2017 Return-Path: Delivered-To: svn-src-all@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 8D372E9B359; Mon, 11 Dec 2017 19:02:07 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 20A9873F89; Mon, 11 Dec 2017 19:02:06 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBBJ1ur0008248 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2017 20:01:57 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: tuexen@fh-muenster.de Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBBJ1rX7072758 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 12 Dec 2017 02:01:53 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Michael Tuexen References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <20171211105242.GH2272@kib.kiev.ua> <5A2E6608.5090205@grosbein.net> <20171211150827.GJ2272@kib.kiev.ua> <5A2EB072.6050803@grosbein.net> <7A052A1A-EFB4-489D-B8DF-C8080AD59A20@fh-muenster.de> Cc: Konstantin Belousov , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A2ED61C.5060209@grosbein.net> Date: Tue, 12 Dec 2017 02:01:48 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <7A052A1A-EFB4-489D-B8DF-C8080AD59A20@fh-muenster.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 19:02:07 -0000 12.12.2017 1:52, Michael Tuexen wrote: > Not sure about IPSEC and ZFS. But I was NOT able to reproduce the issue by just using > an SCTP association on a 32-bit VM using FreeBSD 11.1. So right now I don't know what > is wrong and therefore what could be fixed... You just got lucky. Kernel stack abuse by multiple parts of FreeBSD kernel it matter of fact. But it is not like you always get a panic because sometimes network traffic is passed through NETISR queues to reduce stack usage and sometimes it is not, depending on several run-time factors. You may find it stable with one NIC driver and crashing with another even just because of different stack usage. From owner-svn-src-all@freebsd.org Mon Dec 11 19:12:41 2017 Return-Path: Delivered-To: svn-src-all@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 66B55E9B89C; Mon, 11 Dec 2017 19:12:41 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A245747CB; Mon, 11 Dec 2017 19:12:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBBJCb5X082665; Mon, 11 Dec 2017 11:12:37 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBBJCaFO082664; Mon, 11 Dec 2017 11:12:36 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712111912.vBBJCaFO082664@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326758 - in head/sys/i386: conf include In-Reply-To: <5A2ED61C.5060209@grosbein.net> To: Eugene Grosbein Date: Mon, 11 Dec 2017 11:12:36 -0800 (PST) CC: Michael Tuexen , Konstantin Belousov , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 19:12:41 -0000 > 12.12.2017 1:52, Michael Tuexen wrote: > > > Not sure about IPSEC and ZFS. But I was NOT able to reproduce the issue by just using > > an SCTP association on a 32-bit VM using FreeBSD 11.1. So right now I don't know what > > is wrong and therefore what could be fixed... > > You just got lucky. Kernel stack abuse by multiple parts of FreeBSD kernel it matter of fact. > But it is not like you always get a panic because sometimes network traffic > is passed through NETISR queues to reduce stack usage and sometimes it is not, > depending on several run-time factors. You may find it stable with one NIC driver > and crashing with another even just because of different stack usage. > I agree with that, there is and has been a kernel stack space issue on i386 for some time. But lets all agree just cranking the size of the kernel stack up is a poor long term solution as the larger you crank this the less number of processes you can have due to limited KVA. So, first off, ZFS, well that is fairly well documented to not be a good idea on i386, and well documented to be a bad idea with only 4G of memory. So make sure that this stays documented, along with what one should tweak to make it work, most of which is already in https://wiki.freebsd.org/ZFSTuningGuide#i386 someone please verify that you really need to increase KSTACK, cause last time I played with ZFS on i386 I just used that tuning guide and all was happy. If it is found necessary to add KSTACK pages, document that above and include in that document the side effects of doing so. As far as IPSEC and SCTP, maybe someone can take a once over through the code looking for stack abuse with local variables that really should be malloced, passing large stuff in function call arguments rather than a pointer. Possibly even doing some dtrace to find out how close we get to the limits. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Dec 11 19:21:41 2017 Return-Path: Delivered-To: svn-src-all@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 08465E9BAFC; Mon, 11 Dec 2017 19:21:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D69F374AA9; Mon, 11 Dec 2017 19:21:40 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBJLe70009782; Mon, 11 Dec 2017 19:21:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBJLdfm009775; Mon, 11 Dec 2017 19:21:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712111921.vBBJLdfm009775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 11 Dec 2017 19:21:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326774 - in head/sys: amd64/amd64 cddl/contrib/opensolaris/uts/common/sys cddl/contrib/opensolaris/uts/intel/dtrace cddl/contrib/opensolaris/uts/powerpc/dtrace i386/i386 powerpc/powerp... X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: amd64/amd64 cddl/contrib/opensolaris/uts/common/sys cddl/contrib/opensolaris/uts/intel/dtrace cddl/contrib/opensolaris/uts/powerpc/dtrace i386/i386 powerpc/powerpc sys X-SVN-Commit-Revision: 326774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 19:21:41 -0000 Author: markj Date: Mon Dec 11 19:21:39 2017 New Revision: 326774 URL: https://svnweb.freebsd.org/changeset/base/326774 Log: Pass the trap frame to fasttrap hooks. The DTrace fasttrap entry points expect a struct reg containing the register values of the calling thread. Perform the conversion in fasttrap rather than in the trap handler: this reduces the number of ifdefs and avoids wasting stack space for traps that don't involve DTrace. MFC after: 2 weeks Modified: head/sys/amd64/amd64/trap.c head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c head/sys/i386/i386/trap.c head/sys/powerpc/powerpc/trap.c head/sys/sys/dtrace_bsd.h Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon Dec 11 18:04:04 2017 (r326773) +++ head/sys/amd64/amd64/trap.c Mon Dec 11 19:21:39 2017 (r326774) @@ -164,9 +164,6 @@ SYSCTL_INT(_machdep, OID_AUTO, uprintf_signal, CTLFLAG void trap(struct trapframe *frame) { -#ifdef KDTRACE_HOOKS - struct reg regs; -#endif ksiginfo_t ksi; struct thread *td; struct proc *p; @@ -278,9 +275,8 @@ trap(struct trapframe *frame) enable_intr(); #ifdef KDTRACE_HOOKS if (type == T_BPTFLT) { - fill_frame_regs(frame, ®s); if (dtrace_pid_probe_ptr != NULL && - dtrace_pid_probe_ptr(®s) == 0) + dtrace_pid_probe_ptr(frame) == 0) return; } #endif @@ -406,9 +402,8 @@ trap(struct trapframe *frame) #ifdef KDTRACE_HOOKS case T_DTRACE_RET: enable_intr(); - fill_frame_regs(frame, ®s); if (dtrace_return_probe_ptr != NULL) - dtrace_return_probe_ptr(®s); + dtrace_return_probe_ptr(frame); return; #endif } Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h Mon Dec 11 18:04:04 2017 (r326773) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h Mon Dec 11 19:21:39 2017 (r326774) @@ -221,9 +221,9 @@ extern int fasttrap_tracepoint_init(proc_t *, fasttrap extern int fasttrap_tracepoint_install(proc_t *, fasttrap_tracepoint_t *); extern int fasttrap_tracepoint_remove(proc_t *, fasttrap_tracepoint_t *); -struct reg; -extern int fasttrap_pid_probe(struct reg *); -extern int fasttrap_return_probe(struct reg *); +struct trapframe; +extern int fasttrap_pid_probe(struct trapframe *); +extern int fasttrap_return_probe(struct trapframe *); extern uint64_t fasttrap_pid_getarg(void *, dtrace_id_t, void *, int, int); extern uint64_t fasttrap_usdt_getarg(void *, dtrace_id_t, void *, int, int); Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon Dec 11 18:04:04 2017 (r326773) +++ head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon Dec 11 19:21:39 2017 (r326774) @@ -961,14 +961,12 @@ fasttrap_do_seg(fasttrap_tracepoint_t *tp, struct reg } int -fasttrap_pid_probe(struct reg *rp) +fasttrap_pid_probe(struct trapframe *tf) { - proc_t *p = curproc; -#ifndef illumos + struct reg reg, *rp; + proc_t *p = curproc, *pp; struct rm_priotracker tracker; - proc_t *pp; -#endif - uintptr_t pc = rp->r_rip - 1; + uintptr_t pc; uintptr_t new_pc = 0; fasttrap_bucket_t *bucket; #ifdef illumos @@ -979,6 +977,11 @@ fasttrap_pid_probe(struct reg *rp) dtrace_icookie_t cookie; uint_t is_enabled = 0; + fill_frame_regs(tf, ®); + rp = ® + + pc = rp->r_rip - 1; + /* * It's possible that a user (in a veritable orgy of bad planning) * could redirect this thread's flow of control before it reached the @@ -1783,12 +1786,16 @@ done: } int -fasttrap_return_probe(struct reg *rp) +fasttrap_return_probe(struct trapframe *tf) { + struct reg reg, *rp; proc_t *p = curproc; uintptr_t pc = curthread->t_dtrace_pc; uintptr_t npc = curthread->t_dtrace_npc; + fill_frame_regs(tf, ®); + rp = ® + curthread->t_dtrace_pc = 0; curthread->t_dtrace_npc = 0; curthread->t_dtrace_scrpc = 0; @@ -1808,9 +1815,7 @@ fasttrap_return_probe(struct reg *rp) /* * We set rp->r_rip to the address of the traced instruction so * that it appears to dtrace_probe() that we're on the original - * instruction, and so that the user can't easily detect our - * complex web of lies. dtrace_return_probe() (our caller) - * will correctly set %pc after we return. + * instruction. */ rp->r_rip = pc; Modified: head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Mon Dec 11 18:04:04 2017 (r326773) +++ head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Mon Dec 11 19:21:39 2017 (r326774) @@ -328,8 +328,9 @@ fasttrap_branch_taken(int bo, int bi, struct reg *regs int -fasttrap_pid_probe(struct reg *rp) +fasttrap_pid_probe(struct trapframe *frame) { + struct reg reg, *rp; struct rm_priotracker tracker; proc_t *p = curproc; uintptr_t pc = rp->pc; @@ -340,6 +341,9 @@ fasttrap_pid_probe(struct reg *rp) dtrace_icookie_t cookie; uint_t is_enabled = 0; + fill_regs(curthread, ®); + rp = ® + /* * It's possible that a user (in a veritable orgy of bad planning) * could redirect this thread's flow of control before it reached the @@ -515,8 +519,9 @@ done: } int -fasttrap_return_probe(struct reg *rp) +fasttrap_return_probe(struct trapframe *tf) { + struct reg reg, *rp; proc_t *p = curproc; uintptr_t pc = curthread->t_dtrace_pc; uintptr_t npc = curthread->t_dtrace_npc; @@ -526,12 +531,13 @@ fasttrap_return_probe(struct reg *rp) curthread->t_dtrace_scrpc = 0; curthread->t_dtrace_astpc = 0; + fill_regs(curthread, ®); + rp = ® + /* * We set rp->pc to the address of the traced instruction so * that it appears to dtrace_probe() that we're on the original - * instruction, and so that the user can't easily detect our - * complex web of lies. dtrace_return_probe() (our caller) - * will correctly set %pc after we return. + * instruction. */ rp->pc = pc; @@ -539,4 +545,3 @@ fasttrap_return_probe(struct reg *rp) return (0); } - Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Mon Dec 11 18:04:04 2017 (r326773) +++ head/sys/i386/i386/trap.c Mon Dec 11 19:21:39 2017 (r326774) @@ -177,9 +177,6 @@ SYSCTL_INT(_machdep, OID_AUTO, uprintf_signal, CTLFLAG void trap(struct trapframe *frame) { -#ifdef KDTRACE_HOOKS - struct reg regs; -#endif ksiginfo_t ksi; struct thread *td; struct proc *p; @@ -327,9 +324,8 @@ trap(struct trapframe *frame) enable_intr(); #ifdef KDTRACE_HOOKS if (type == T_BPTFLT) { - fill_frame_regs(frame, ®s); if (dtrace_pid_probe_ptr != NULL && - dtrace_pid_probe_ptr(®s) == 0) + dtrace_pid_probe_ptr(frame) == 0) return; } #endif @@ -497,9 +493,8 @@ user_trctrap_out: #ifdef KDTRACE_HOOKS case T_DTRACE_RET: enable_intr(); - fill_frame_regs(frame, ®s); if (dtrace_return_probe_ptr != NULL) - dtrace_return_probe_ptr(®s); + dtrace_return_probe_ptr(frame); return; #endif } Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Mon Dec 11 18:04:04 2017 (r326773) +++ head/sys/powerpc/powerpc/trap.c Mon Dec 11 19:21:39 2017 (r326774) @@ -303,9 +303,7 @@ trap(struct trapframe *frame) inst = fuword32((const void *)frame->srr0); if (inst == 0x0FFFDDDD && dtrace_pid_probe_ptr != NULL) { - struct reg regs; - fill_regs(td, ®s); - (*dtrace_pid_probe_ptr)(®s); + (*dtrace_pid_probe_ptr)(frame); break; } #endif Modified: head/sys/sys/dtrace_bsd.h ============================================================================== --- head/sys/sys/dtrace_bsd.h Mon Dec 11 18:04:04 2017 (r326773) +++ head/sys/sys/dtrace_bsd.h Mon Dec 11 19:21:39 2017 (r326774) @@ -39,7 +39,6 @@ struct trapframe; struct thread; struct vattr; struct vnode; -struct reg; int dtrace_trap(struct trapframe *, u_int); @@ -60,9 +59,9 @@ typedef void (*dtrace_doubletrap_func_t)(void); extern dtrace_doubletrap_func_t dtrace_doubletrap_func; /* Pid provider hooks */ -typedef int (*dtrace_pid_probe_ptr_t)(struct reg *); +typedef int (*dtrace_pid_probe_ptr_t)(struct trapframe *); extern dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; -typedef int (*dtrace_return_probe_ptr_t)(struct reg *); +typedef int (*dtrace_return_probe_ptr_t)(struct trapframe *); extern dtrace_return_probe_ptr_t dtrace_return_probe_ptr; /* Virtual time hook function type. */ From owner-svn-src-all@freebsd.org Mon Dec 11 19:33:42 2017 Return-Path: Delivered-To: svn-src-all@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 E3F18E9BE77 for ; Mon, 11 Dec 2017 19:33:42 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FD2275223; Mon, 11 Dec 2017 19:33:42 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBBJXVp2008451 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2017 20:33:32 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: rgrimes@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBBJXRTT081930 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 12 Dec 2017 02:33:27 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: rgrimes@freebsd.org References: <201712111912.vBBJCaFO082664@pdx.rh.CN85.dnsmgr.net> Cc: Michael Tuexen , Konstantin Belousov , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A2EDD82.1040404@grosbein.net> Date: Tue, 12 Dec 2017 02:33:22 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201712111912.vBBJCaFO082664@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 19:33:43 -0000 12.12.2017 2:12, Rodney W. Grimes wrote: >>> Not sure about IPSEC and ZFS. But I was NOT able to reproduce the issue by just using >>> an SCTP association on a 32-bit VM using FreeBSD 11.1. So right now I don't know what >>> is wrong and therefore what could be fixed... >> >> You just got lucky. Kernel stack abuse by multiple parts of FreeBSD kernel it matter of fact. >> But it is not like you always get a panic because sometimes network traffic >> is passed through NETISR queues to reduce stack usage and sometimes it is not, >> depending on several run-time factors. You may find it stable with one NIC driver >> and crashing with another even just because of different stack usage. >> > > I agree with that, there is and has been a kernel stack space issue on > i386 for some time. But lets all agree just cranking the size of the > kernel stack up is a poor long term solution as the larger you crank > this the less number of processes you can have due to limited KVA. OTOH, it seems to be totally unrealistic to hope the problem can be solved in feasible future as such crashes were not fixed for several *years* (at least since 10.x era). > So, first off, ZFS, well that is fairly well documented to not be > a good idea on i386, and well documented to be a bad idea with only > 4G of memory. That's just incorrect. With 4 kstack pages, you could utilize ZFS for compressed src/obj/ports with virtualized FreeBSD 9 and 1GB memory using following loader.conf settings: zfs_load="YES" vfs.zfs.arc_max="40M" vfs.zfs.vdev.cache.size="8M" vfs.zfs.prefetch_disable="1" And that was pretty stable as ARC was really limited. This was broken in 10.x and later so that ARC grows order of magnitude (x10) larger, though. > So make sure that this stays documented, along with > what one should tweak to make it work, most of which is already in > https://wiki.freebsd.org/ZFSTuningGuide#i386 > someone please verify that you really need to increase KSTACK, cause > last time I played with ZFS on i386 I just used that tuning guide and > all was happy. If it is found necessary to add KSTACK pages, document > that above and include in that document the side effects of doing so. > > As far as IPSEC and SCTP, maybe someone can take a once over through > the code looking for stack abuse with local variables that > really should be malloced, passing large stuff in function call > arguments rather than a pointer. > > Possibly even doing some dtrace to find out how close we get to the limits. That's not just ZFS, IPSEC or SCTP. It spreads all over kernel parts: wifi subsystem and drivers, libkern/zlib, crypto, scsi/cam/da/ada drivers, vm subsystem itself, NFS etc. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219476 From owner-svn-src-all@freebsd.org Mon Dec 11 20:01:29 2017 Return-Path: Delivered-To: svn-src-all@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 BB3B1E9CBC9; Mon, 11 Dec 2017 20:01:29 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8769C76421; Mon, 11 Dec 2017 20:01:29 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBK1SAD022920; Mon, 11 Dec 2017 20:01:28 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBK1SDo022919; Mon, 11 Dec 2017 20:01:28 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201712112001.vBBK1SDo022919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Mon, 11 Dec 2017 20:01:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326775 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 326775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 20:01:29 -0000 Author: shurd Date: Mon Dec 11 20:01:28 2017 New Revision: 326775 URL: https://svnweb.freebsd.org/changeset/base/326775 Log: Increment encap_pad_mbuf_fail when m_dup() fails in padding Previously, the counter was only incremented when m_append() failed. Since the function can also fail on m_dup() now, increment the counter there as well. Sponsored by: Limelight Networks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Dec 11 19:21:39 2017 (r326774) +++ head/sys/net/iflib.c Mon Dec 11 20:01:28 2017 (r326775) @@ -3127,6 +3127,7 @@ iflib_ether_pad(device_t dev, struct mbuf **m_head, ui if (new_head == NULL) { m_freem(*m_head); device_printf(dev, "cannot pad short frame, m_dup() failed"); + DBG_COUNTER_INC(encap_pad_mbuf_fail); return ENOMEM; } m_freem(*m_head); From owner-svn-src-all@freebsd.org Mon Dec 11 20:04:41 2017 Return-Path: Delivered-To: svn-src-all@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 ACF0FE9CC6F; Mon, 11 Dec 2017 20:04:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 580607663E; Mon, 11 Dec 2017 20:04:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBK4ep7026673; Mon, 11 Dec 2017 20:04:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBK4e0a026671; Mon, 11 Dec 2017 20:04:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712112004.vBBK4e0a026671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 11 Dec 2017 20:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326776 - in head/contrib/llvm/tools/clang: include/clang/Sema lib/Sema X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/contrib/llvm/tools/clang: include/clang/Sema lib/Sema X-SVN-Commit-Revision: 326776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 20:04:41 -0000 Author: dim Date: Mon Dec 11 20:04:40 2017 New Revision: 326776 URL: https://svnweb.freebsd.org/changeset/base/326776 Log: Pull in r320396 from upstream clang trunk (by Malcolm Parsons): [Sema] Fix crash in unused-lambda-capture warning for VLAs Summary: Clang was crashing when diagnosing an unused-lambda-capture for a VLA because From.getVariable() is null for the capture of a VLA bound. Warning about the VLA bound capture is not helpful, so only warn for the VLA itself. Fixes: PR35555 Reviewers: aaron.ballman, dim, rsmith Reviewed By: aaron.ballman, dim Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41016 This fixes a segfault when building recent audio/zynaddsubfx port versions. Reported by: hps MFC after: 3 days Modified: head/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h head/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp Modified: head/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h ============================================================================== --- head/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h Mon Dec 11 20:01:28 2017 (r326775) +++ head/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h Mon Dec 11 20:04:40 2017 (r326776) @@ -560,6 +560,7 @@ class CapturingScopeInfo : public FunctionScopeInfo { void markUsed(bool IsODRUse) { (IsODRUse ? ODRUsed : NonODRUsed) = true; } VarDecl *getVariable() const { + assert(isVariableCapture()); return VarAndNestedAndThis.getPointer(); } Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp Mon Dec 11 20:01:28 2017 (r326775) +++ head/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp Mon Dec 11 20:04:40 2017 (r326776) @@ -1469,6 +1469,9 @@ void Sema::DiagnoseUnusedLambdaCapture(const LambdaSco if (CaptureHasSideEffects(From)) return; + if (From.isVLATypeCapture()) + return; + auto diag = Diag(From.getLocation(), diag::warn_unused_lambda_capture); if (From.isThisCapture()) diag << "'this'"; From owner-svn-src-all@freebsd.org Mon Dec 11 20:21:36 2017 Return-Path: Delivered-To: svn-src-all@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 5E109E9D631; Mon, 11 Dec 2017 20:21:36 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27494772B7; Mon, 11 Dec 2017 20:21:36 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBKLZ7E033423; Mon, 11 Dec 2017 20:21:35 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBKLZsu033422; Mon, 11 Dec 2017 20:21:35 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712112021.vBBKLZsu033422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 11 Dec 2017 20:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326777 - stable/11/sys/cam/scsi X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sys/cam/scsi X-SVN-Commit-Revision: 326777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 20:21:36 -0000 Author: asomers Date: Mon Dec 11 20:21:35 2017 New Revision: 326777 URL: https://svnweb.freebsd.org/changeset/base/326777 Log: MFC r325959: Add assertion in probedone() that we're holding the device lock. Submitted by: ken Reviewed by: asomers Sponsored by: Spectra Logic Corp Modified: stable/11/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_xpt.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_xpt.c Mon Dec 11 20:04:40 2017 (r326776) +++ stable/11/sys/cam/scsi/scsi_xpt.c Mon Dec 11 20:21:35 2017 (r326777) @@ -1128,6 +1128,7 @@ probedone(struct cam_periph *periph, union ccb *done_c softc = (probe_softc *)periph->softc; path = done_ccb->ccb_h.path; priority = done_ccb->ccb_h.pinfo.priority; + cam_periph_assert(periph, MA_OWNED); switch (softc->action) { case PROBE_TUR: From owner-svn-src-all@freebsd.org Mon Dec 11 20:24:30 2017 Return-Path: Delivered-To: svn-src-all@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 E9703E9D7A1; Mon, 11 Dec 2017 20:24:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B273F775B3; Mon, 11 Dec 2017 20:24:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBKOTa1035251; Mon, 11 Dec 2017 20:24:29 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBKOTFG035250; Mon, 11 Dec 2017 20:24:29 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712112024.vBBKOTFG035250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 11 Dec 2017 20:24:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326778 - stable/11/sbin/camcontrol X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sbin/camcontrol X-SVN-Commit-Revision: 326778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 20:24:31 -0000 Author: asomers Date: Mon Dec 11 20:24:29 2017 New Revision: 326778 URL: https://svnweb.freebsd.org/changeset/base/326778 Log: MFC r326032: Print ZAC device type in "camcontrol identify" output ZAC (Zoned-device ATA Command set) is the standard for addressing SMR (shingled magnetic recording) devices over SATA. Drives indicate their support for ZAC in their IDENTIFY block. Print whether and how a drive supports ZAC in the output of "camcontrol identify". Reviewed by: ken, imp Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13171 Modified: stable/11/sbin/camcontrol/camcontrol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.c Mon Dec 11 20:21:35 2017 (r326777) +++ stable/11/sbin/camcontrol/camcontrol.c Mon Dec 11 20:24:29 2017 (r326778) @@ -1391,6 +1391,18 @@ atacapprint(struct ata_params *parm) parm->media_rotation_rate); } + printf("Zoned-Device Commands "); + switch (parm->support3 & ATA_SUPPORT_ZONE_MASK) { + case ATA_SUPPORT_ZONE_DEV_MANAGED: + printf("device managed\n"); + break; + case ATA_SUPPORT_ZONE_HOST_AWARE: + printf("host aware\n"); + break; + default: + printf("no\n"); + } + printf("\nFeature " "Support Enabled Value Vendor\n"); printf("read ahead %s %s\n", From owner-svn-src-all@freebsd.org Mon Dec 11 20:30:59 2017 Return-Path: Delivered-To: svn-src-all@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 CD4ADE9D9BF; Mon, 11 Dec 2017 20:30:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96DE9779CD; Mon, 11 Dec 2017 20:30:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBKUwOn035573; Mon, 11 Dec 2017 20:30:58 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBKUwP3035572; Mon, 11 Dec 2017 20:30:58 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712112030.vBBKUwP3035572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 11 Dec 2017 20:30:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326779 - stable/11/sys/cam/scsi X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sys/cam/scsi X-SVN-Commit-Revision: 326779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 20:30:59 -0000 Author: asomers Date: Mon Dec 11 20:30:58 2017 New Revision: 326779 URL: https://svnweb.freebsd.org/changeset/base/326779 Log: MFC r326036: da(4): Short-circuit unnecessary BIO_FLUSH commands sys/cam/scsi/scsi_da.c Complete BIO_FLUSH commands immediately if the da(4) device hasn't been written to since the last flush. If we haven't written to the device, there is no reason to send a flush. Submitted by: gibbs Reviewed by: imp Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13106 Modified: stable/11/sys/cam/scsi/scsi_da.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_da.c Mon Dec 11 20:24:29 2017 (r326778) +++ stable/11/sys/cam/scsi/scsi_da.c Mon Dec 11 20:30:58 2017 (r326779) @@ -2994,6 +2994,18 @@ more: } case BIO_FLUSH: /* + * If we don't support sync cache, or the disk + * isn't dirty, FLUSH is a no-op. Use the + * allocated * CCB for the next bio if one is + * available. + */ + if ((softc->quirks & DA_Q_NO_SYNC_CACHE) != 0 || + (softc->flags & DA_FLAG_DIRTY) == 0) { + biodone(bp); + goto skipstate; + } + + /* * BIO_FLUSH doesn't currently communicate * range data, so we synchronize the cache * over the whole disk. We also force @@ -3008,6 +3020,15 @@ more: /*lb_count*/0, SSD_FULL_SIZE, da_default_timeout*1000); + /* + * Clear the dirty flag before sending the command. + * Either this sync cache will be successful, or it + * will fail after a retry. If it fails, it is + * unlikely to be successful if retried later, so + * we'll save ourselves time by just marking the + * device clean. + */ + softc->flags &= ~DA_FLAG_DIRTY; break; case BIO_ZONE: { int error, queue_ccb; From owner-svn-src-all@freebsd.org Mon Dec 11 20:33:12 2017 Return-Path: Delivered-To: svn-src-all@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 E90B0E9DCDE; Mon, 11 Dec 2017 20:33:12 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B146678007; Mon, 11 Dec 2017 20:33:12 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBKXBli039514; Mon, 11 Dec 2017 20:33:11 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBKXBbY039512; Mon, 11 Dec 2017 20:33:11 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712112033.vBBKXBbY039512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 11 Dec 2017 20:33:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326780 - in stable/11: etc/mtree usr.bin/head usr.bin/head/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: etc/mtree usr.bin/head usr.bin/head/tests X-SVN-Commit-Revision: 326780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 20:33:13 -0000 Author: asomers Date: Mon Dec 11 20:33:11 2017 New Revision: 326780 URL: https://svnweb.freebsd.org/changeset/base/326780 Log: MFC r326039: Add ATF tests for head(1) Submitted by: Fred Schlecter Reviewed by: asomers, jilles Differential Revision: https://github.com/freebsd/freebsd/pull/127 Added: stable/11/usr.bin/head/tests/ - copied from r326039, head/usr.bin/head/tests/ Modified: stable/11/etc/mtree/BSD.tests.dist stable/11/usr.bin/head/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Mon Dec 11 20:30:58 2017 (r326779) +++ stable/11/etc/mtree/BSD.tests.dist Mon Dec 11 20:33:11 2017 (r326780) @@ -646,6 +646,8 @@ .. gzip .. + head + .. ident .. join Modified: stable/11/usr.bin/head/Makefile ============================================================================== --- stable/11/usr.bin/head/Makefile Mon Dec 11 20:30:58 2017 (r326779) +++ stable/11/usr.bin/head/Makefile Mon Dec 11 20:33:11 2017 (r326780) @@ -1,6 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= head + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests .include From owner-svn-src-all@freebsd.org Mon Dec 11 20:36:02 2017 Return-Path: Delivered-To: svn-src-all@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 D9034E9DE1A; Mon, 11 Dec 2017 20:36:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E7B7781AE; Mon, 11 Dec 2017 20:36:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBKa19N039667; Mon, 11 Dec 2017 20:36:01 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBKa1bS039666; Mon, 11 Dec 2017 20:36:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712112036.vBBKa1bS039666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 11 Dec 2017 20:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326781 - stable/11/usr.sbin/periodic X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/usr.sbin/periodic X-SVN-Commit-Revision: 326781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 20:36:03 -0000 Author: asomers Date: Mon Dec 11 20:36:01 2017 New Revision: 326781 URL: https://svnweb.freebsd.org/changeset/base/326781 Log: MFC r326041: periodic: fix exit status for nonexistent arguments When called with an absolute pathname, periodic should attempt to execute every script in that directory. If the directory does not exist, it should print an error and exit 1. Due to a copy/paste mistake in r231568, it exits 0 in that case. Reported by: devel/hs-ShellCheck Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13070 Modified: stable/11/usr.sbin/periodic/periodic.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/periodic/periodic.sh ============================================================================== --- stable/11/usr.sbin/periodic/periodic.sh Mon Dec 11 20:33:11 2017 (r326780) +++ stable/11/usr.sbin/periodic/periodic.sh Mon Dec 11 20:36:01 2017 (r326781) @@ -103,7 +103,7 @@ case $arg in dirlist="$arg" else echo "$0: $arg not found" >&2 - continue + exit 1 fi ;; *) dirlist= From owner-svn-src-all@freebsd.org Mon Dec 11 20:47:28 2017 Return-Path: Delivered-To: svn-src-all@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 73869E9E0E6; Mon, 11 Dec 2017 20:47:28 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ABD5786B0; Mon, 11 Dec 2017 20:47:28 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBKlRAp043737; Mon, 11 Dec 2017 20:47:27 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBKlROC043733; Mon, 11 Dec 2017 20:47:27 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712112047.vBBKlROC043733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 11 Dec 2017 20:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326782 - in stable/11: lib/libcam/tests sys/cam X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: lib/libcam/tests sys/cam X-SVN-Commit-Revision: 326782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 20:47:28 -0000 Author: asomers Date: Mon Dec 11 20:47:26 2017 New Revision: 326782 URL: https://svnweb.freebsd.org/changeset/base/326782 Log: MFC r304443, r326034, r326065 r304443 by imp: Improve the pattern matching so that internal *'s work, as well as [set] notation. This fixes pattern matching for recently added drives that would set the NCQ Trim being broken incorrectly. PR: 210686 Tested-by: Tomoaki AOKI r326034: Fix multiple bugs in cam_strmatch * Wrongly matches strings that are shorter than the pattern * Fails to match negative character sets * Fails to match character sets that aren't at the end of the pattern * Fails to match character ranges Reviewed by: imp Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13173 r326065: Fix uninitialized variable from 326034 Reported by: Coverity CID: 1382887 X-MFC-With: 326034 Sponsored by: Spectra Logic Corp Added: stable/11/lib/libcam/tests/cam_test.c - copied unchanged from r326034, head/lib/libcam/tests/cam_test.c Modified: stable/11/lib/libcam/tests/Makefile stable/11/lib/libcam/tests/libcam_test.c stable/11/sys/cam/cam.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libcam/tests/Makefile ============================================================================== --- stable/11/lib/libcam/tests/Makefile Mon Dec 11 20:36:01 2017 (r326781) +++ stable/11/lib/libcam/tests/Makefile Mon Dec 11 20:47:26 2017 (r326782) @@ -1,6 +1,7 @@ # $FreeBSD$ ATF_TESTS_C+= libcam_test +ATF_TESTS_C+= cam_test LIBADD+= cam Copied: stable/11/lib/libcam/tests/cam_test.c (from r326034, head/lib/libcam/tests/cam_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libcam/tests/cam_test.c Mon Dec 11 20:47:26 2017 (r326782, copy of r326034, head/lib/libcam/tests/cam_test.c) @@ -0,0 +1,111 @@ +/*- + * Copyright (c) 2017 Spectra Logic Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* Tests functions in sys/cam/cam.c */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +#define ATF_CHECK_NE(x, y) ATF_CHECK((x) != (y)) + +ATF_TC_WITHOUT_HEAD(cam_strmatch); +ATF_TC_BODY(cam_strmatch, tc) +{ + /* Basic fixed patterns */ + ATF_CHECK_EQ(0, cam_strmatch("foo", "foo", 3)); + ATF_CHECK_NE(0, cam_strmatch("foo", "bar", 3)); + ATF_CHECK_NE(0, cam_strmatch("foo", "foobar", 3)); + + /* The str is not necessarily null-terminated */ + ATF_CHECK_EQ(0, cam_strmatch("fooxuehfxeuf", "foo", 3)); + ATF_CHECK_NE(0, cam_strmatch("foo\0bar", "foo", 7)); + + /* Eat trailing spaces, which get added by SAT */ + ATF_CHECK_EQ(0, cam_strmatch("foo ", "foo", 16)); + + /* '*' matches everything, like shell globbing */ + ATF_CHECK_EQ(0, cam_strmatch("foobar", "foo*", 6)); + ATF_CHECK_EQ(0, cam_strmatch("foobar", "*bar", 6)); + ATF_CHECK_NE(0, cam_strmatch("foobar", "foo*x", 6)); + ATF_CHECK_EQ(0, cam_strmatch("foobarbaz", "*bar*", 9)); + /* Even NUL */ + ATF_CHECK_EQ(0, cam_strmatch("foo\0bar", "foo*", 7)); + /* Or nothing */ + ATF_CHECK_EQ(0, cam_strmatch("foo", "foo*", 3)); + /* But stuff after the * still must match */ + ATF_CHECK_NE(0, cam_strmatch("foo", "foo*x", 3)); + + /* '?' matches exactly one single character */ + ATF_CHECK_EQ(0, cam_strmatch("foobar", "foo?ar", 6)); + ATF_CHECK_NE(0, cam_strmatch("foo", "foo?", 3)); + /* Even NUL */ + ATF_CHECK_EQ(0, cam_strmatch("foo\0bar", "foo?bar", 7)); + + /* '[]' contains a set of characters */ + ATF_CHECK_EQ(0, cam_strmatch("foobar", "foo[abc]ar", 6)); + ATF_CHECK_EQ(0, cam_strmatch("foobar", "foo[b]ar", 6)); + ATF_CHECK_NE(0, cam_strmatch("foobar", "foo[ac]ar", 6)); + + /* '[]' can contain a range of characters, too */ + ATF_CHECK_EQ(0, cam_strmatch("foobar", "foo[a-c]ar", 6)); + ATF_CHECK_EQ(0, cam_strmatch("fooxar", "foo[a-cx]ar", 6)); + ATF_CHECK_NE(0, cam_strmatch("foodar", "foo[a-c]ar", 6)); + + /* Back-to-back '[]' character sets */ + ATF_CHECK_EQ(0, cam_strmatch("foobar", "fo[a-z][abc]ar", 6)); + ATF_CHECK_NE(0, cam_strmatch("foAbar", "fo[a-z][abc]ar", 6)); + ATF_CHECK_NE(0, cam_strmatch("foodar", "fo[a-z][abc]ar", 6)); + + /* A '^' negates a set of characters */ + ATF_CHECK_NE(0, cam_strmatch("foobar", "foo[^abc]ar", 6)); + ATF_CHECK_NE(0, cam_strmatch("foobar", "foo[^b]ar", 6)); + ATF_CHECK_EQ(0, cam_strmatch("foobar", "foo[^ac]ar", 6)); + ATF_CHECK_NE(0, cam_strmatch("foobar", "foo[^a-c]ar", 6)); + ATF_CHECK_NE(0, cam_strmatch("fooxar", "foo[^a-cx]ar", 6)); + ATF_CHECK_EQ(0, cam_strmatch("foodar", "foo[^a-c]ar", 6)); + + /* Outside of '[]' a ']' is just an ordinary character */ + ATF_CHECK_EQ(0, cam_strmatch("f]o", "f]o", 3)); + ATF_CHECK_NE(0, cam_strmatch("foo", "f]o", 3)); + + /* Matching a literal '[' requires specifying a range */ + ATF_CHECK_EQ(0, cam_strmatch("f[o", "f[[]o", 3)); + ATF_CHECK_NE(0, cam_strmatch("foo", "f[[]o", 3)); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, cam_strmatch); + + return (atf_no_error()); +} Modified: stable/11/lib/libcam/tests/libcam_test.c ============================================================================== --- stable/11/lib/libcam/tests/libcam_test.c Mon Dec 11 20:36:01 2017 (r326781) +++ stable/11/lib/libcam/tests/libcam_test.c Mon Dec 11 20:47:26 2017 (r326782) @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +/* Tests functions in lib/libcam/camlib.c */ + #include __FBSDID("$FreeBSD$"); Modified: stable/11/sys/cam/cam.c ============================================================================== --- stable/11/sys/cam/cam.c Mon Dec 11 20:36:01 2017 (r326781) +++ stable/11/sys/cam/cam.c Mon Dec 11 20:47:26 2017 (r326782) @@ -207,32 +207,89 @@ cam_strvis_sbuf(struct sbuf *sb, const u_int8_t *src, /* * Compare string with pattern, returning 0 on match. * Short pattern matches trailing blanks in name, - * wildcard '*' in pattern matches rest of name, - * wildcard '?' matches a single non-space character. + * Shell globbing rules apply: * matches 0 or more characters, + * ? matchces one character, [...] denotes a set to match one char, + * [^...] denotes a complimented set to match one character. + * Spaces in str used to match anything in the pattern string + * but was removed because it's a bug. No current patterns require + * it, as far as I know, but it's impossible to know what drives + * returned. + * + * Each '*' generates recursion, so keep the number of * in check. */ int cam_strmatch(const u_int8_t *str, const u_int8_t *pattern, int str_len) { - while (*pattern != '\0'&& str_len > 0) { - + while (*pattern != '\0' && str_len > 0) { if (*pattern == '*') { - return (0); - } - if ((*pattern != *str) - && (*pattern != '?' || *str == ' ')) { + pattern++; + if (*pattern == '\0') + return (0); + do { + if (cam_strmatch(str, pattern, str_len) == 0) + return (0); + str++; + str_len--; + } while (str_len > 0); return (1); + } else if (*pattern == '[') { + int negate_range, ok; + uint8_t pc = UCHAR_MAX; + uint8_t sc; + + ok = 0; + sc = *str++; + str_len--; + pattern++; + if ((negate_range = (*pattern == '^')) != 0) + pattern++; + while ((*pattern != ']') && *pattern != '\0') { + if (*pattern == '-') { + if (pattern[1] == '\0') /* Bad pattern */ + return (1); + if (sc >= pc && sc <= pattern[1]) + ok = 1; + pattern++; + } else if (*pattern == sc) + ok = 1; + pc = *pattern; + pattern++; + } + if (ok == negate_range) + return (1); + pattern++; + } else if (*pattern == '?') { + /* + * NB: || *str == ' ' of the old code is a bug and was + * removed. If you add it back, keep this the last if + * before the naked else */ + pattern++; + str++; + str_len--; + } else { + if (*str != *pattern) + return (1); + pattern++; + str++; + str_len--; } + } + + /* '*' is allowed to match nothing, so gobble it */ + while (*pattern == '*') pattern++; - str++; - str_len--; + + if ( *pattern != '\0') { + /* Pattern not fully consumed. Not a match */ + return (1); } + + /* Eat trailing spaces, which get added by SAT */ while (str_len > 0 && *str == ' ') { str++; str_len--; } - if (str_len > 0 && *str == 0) - str_len = 0; return (str_len); } From owner-svn-src-all@freebsd.org Mon Dec 11 22:55:52 2017 Return-Path: Delivered-To: svn-src-all@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 899C9EA1B32; Mon, 11 Dec 2017 22:55:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 543097DC93; Mon, 11 Dec 2017 22:55:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBMtplb098279; Mon, 11 Dec 2017 22:55:51 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBMtpuO098278; Mon, 11 Dec 2017 22:55:51 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201712112255.vBBMtpuO098278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 11 Dec 2017 22:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326783 - head/sys/dev/syscon X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/dev/syscon X-SVN-Commit-Revision: 326783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 22:55:52 -0000 Author: kevans Date: Mon Dec 11 22:55:51 2017 New Revision: 326783 URL: https://svnweb.freebsd.org/changeset/base/326783 Log: Correct a typo in syscon driver 'modify' logic Not previously caught because the current consumer (not yet in tree) doesn't use the 'modify' bits (yet). Reported by: rpokala Modified: head/sys/dev/syscon/syscon.c Modified: head/sys/dev/syscon/syscon.c ============================================================================== --- head/sys/dev/syscon/syscon.c Mon Dec 11 20:47:26 2017 (r326782) +++ head/sys/dev/syscon/syscon.c Mon Dec 11 22:55:51 2017 (r326783) @@ -104,7 +104,7 @@ syscon_modify_4(device_t dev, device_t consumer, bus_ SYSCON_LOCK(sc); val = bus_read_4(sc->mem_res, offset); val &= ~clear_bits; - val |= ~set_bits; + val |= set_bits; bus_write_4(sc->mem_res, offset, val); SYSCON_UNLOCK(sc); } From owner-svn-src-all@freebsd.org Mon Dec 11 23:15:45 2017 Return-Path: Delivered-To: svn-src-all@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 4F188EA21CF; Mon, 11 Dec 2017 23:15:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19CB57E89A; Mon, 11 Dec 2017 23:15:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBBNFiCR006685; Mon, 11 Dec 2017 23:15:44 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBBNFiLO006684; Mon, 11 Dec 2017 23:15:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712112315.vBBNFiLO006684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 11 Dec 2017 23:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326784 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 326784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 23:15:45 -0000 Author: imp Date: Mon Dec 11 23:15:43 2017 New Revision: 326784 URL: https://svnweb.freebsd.org/changeset/base/326784 Log: Revert part of 362772. It was causing problems for includes and making the menus disappear. Sponsored by: Netflix Modified: head/stand/common/interp_forth.c Modified: head/stand/common/interp_forth.c ============================================================================== --- head/stand/common/interp_forth.c Mon Dec 11 22:55:51 2017 (r326783) +++ head/stand/common/interp_forth.c Mon Dec 11 23:15:43 2017 (r326784) @@ -354,7 +354,7 @@ interp_forth_incl(void *ctx, const char *filename) "can't open %s\n", filename); return (CMD_ERROR); } - return (ficlExecFD(softc->bf_vm, fd) == 0 ? CMD_OK : CMD_ERROR); + return (ficlExecFD(softc->bf_vm, fd)); } From owner-svn-src-all@freebsd.org Tue Dec 12 00:51:40 2017 Return-Path: Delivered-To: svn-src-all@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 7C9B5E819A8; Tue, 12 Dec 2017 00:51:40 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CFB81B9E; Tue, 12 Dec 2017 00:51:40 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBC0pdJW043905; Tue, 12 Dec 2017 00:51:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBC0pdrX043904; Tue, 12 Dec 2017 00:51:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712120051.vBC0pdrX043904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 12 Dec 2017 00:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326785 - vendor-sys/illumos/dist/uts/common/dtrace X-SVN-Group: vendor-sys X-SVN-Commit-Author: markj X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/dtrace X-SVN-Commit-Revision: 326785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 00:51:40 -0000 Author: markj Date: Tue Dec 12 00:51:39 2017 New Revision: 326785 URL: https://svnweb.freebsd.org/changeset/base/326785 Log: 8880 improve DTrace error checking illumos/illumos-gate@2cf374268f3e1c9e9be6367466b183d27632583a https://github.com/illumos/illumos-gate/commit/2cf374268f3e1c9e9be6367466b183d27632583a https://www.illumos.org/issues/8880 Reviewed by: Tim Kordas Reviewed by: Bryan Cantrill Reviewed by: Richard Lowe Approved by: Dan McDonald Author: Jerry Jelinek Modified: vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c Modified: vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c Mon Dec 11 23:15:43 2017 (r326784) +++ vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c Tue Dec 12 00:51:39 2017 (r326785) @@ -13119,6 +13119,7 @@ static int dtrace_dof_relocate(dof_hdr_t *dof, dof_sec_t *sec, uint64_t ubase) { uintptr_t daddr = (uintptr_t)dof; + uintptr_t ts_end; dof_relohdr_t *dofr = (dof_relohdr_t *)(uintptr_t)(daddr + sec->dofs_offset); dof_sec_t *ss, *rs, *ts; @@ -13134,6 +13135,7 @@ dtrace_dof_relocate(dof_hdr_t *dof, dof_sec_t *sec, ui ss = dtrace_dof_sect(dof, DOF_SECT_STRTAB, dofr->dofr_strtab); rs = dtrace_dof_sect(dof, DOF_SECT_RELTAB, dofr->dofr_relsec); ts = dtrace_dof_sect(dof, DOF_SECT_NONE, dofr->dofr_tgtsec); + ts_end = (uintptr_t)ts + sizeof (dof_sec_t); if (ss == NULL || rs == NULL || ts == NULL) return (-1); /* dtrace_dof_error() has been called already */ @@ -13156,6 +13158,11 @@ dtrace_dof_relocate(dof_hdr_t *dof, dof_sec_t *sec, ui case DOF_RELO_SETX: if (r->dofr_offset >= ts->dofs_size || r->dofr_offset + sizeof (uint64_t) > ts->dofs_size) { + dtrace_dof_error(dof, "bad relocation offset"); + return (-1); + } + + if (taddr >= (uintptr_t)ts && taddr < ts_end) { dtrace_dof_error(dof, "bad relocation offset"); return (-1); } From owner-svn-src-all@freebsd.org Tue Dec 12 01:19:10 2017 Return-Path: Delivered-To: svn-src-all@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 47595E82B5A; Tue, 12 Dec 2017 01:19:10 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 142AF2B96; Tue, 12 Dec 2017 01:19:10 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBC1J9cH056277; Tue, 12 Dec 2017 01:19:09 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBC1J9wO056276; Tue, 12 Dec 2017 01:19:09 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201712120119.vBC1J9wO056276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 12 Dec 2017 01:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326786 - head/usr.bin/gzip X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.bin/gzip X-SVN-Commit-Revision: 326786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 01:19:10 -0000 Author: cem Date: Tue Dec 12 01:19:08 2017 New Revision: 326786 URL: https://svnweb.freebsd.org/changeset/base/326786 Log: gzip(1): Remove duplicate close() CID: 1383560 Reported by: Coverity Sponsored by: Dell EMC Isilon Modified: head/usr.bin/gzip/gzip.c Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Tue Dec 12 00:51:39 2017 (r326785) +++ head/usr.bin/gzip/gzip.c Tue Dec 12 01:19:08 2017 (r326786) @@ -1444,7 +1444,6 @@ file_uncompress(char *file, char *outfile, size_t outs goto lose; } if (fstat(fd, &isb) != 0) { - close(fd); maybe_warn("can't stat %s", file); goto lose; } From owner-svn-src-all@freebsd.org Tue Dec 12 01:19:22 2017 Return-Path: Delivered-To: svn-src-all@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 2645BE82BC0; Tue, 12 Dec 2017 01:19:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BECE82C72; Tue, 12 Dec 2017 01:19:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBC1JIc3056328; Tue, 12 Dec 2017 01:19:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBC1JIsp056327; Tue, 12 Dec 2017 01:19:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712120119.vBC1JIsp056327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 12 Dec 2017 01:19:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326787 - stable/11/contrib/llvm/tools/lld/ELF X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/contrib/llvm/tools/lld/ELF X-SVN-Commit-Revision: 326787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 01:19:22 -0000 Author: emaste Date: Tue Dec 12 01:19:18 2017 New Revision: 326787 URL: https://svnweb.freebsd.org/changeset/base/326787 Log: MFC r326547: lld: make -v behave similarly to GNU ld.bfd Previously, lld exited with an error status if the only option given to the command was -v. GNU linkers gracefully exit in that case. This patch makes lld behave like GNU. Note that even with this patch, lld's -v and --version options behave slightly differently than GNU linkers' counterparts. For example, if you run ld.bfd -v -v, the version string is printed out twice. But that is an edge case that I don't think we need to take care of. Fixes https://bugs.llvm.org/show_bug.cgi?id=31582 Obtained from: LLVM r319717 Modified: stable/11/contrib/llvm/tools/lld/ELF/Driver.cpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/tools/lld/ELF/Driver.cpp ============================================================================== --- stable/11/contrib/llvm/tools/lld/ELF/Driver.cpp Tue Dec 12 01:19:08 2017 (r326786) +++ stable/11/contrib/llvm/tools/lld/ELF/Driver.cpp Tue Dec 12 01:19:18 2017 (r326787) @@ -345,9 +345,10 @@ void LinkerDriver::main(ArrayRef ArgsArr if (Args.hasArg(OPT_v) || Args.hasArg(OPT_version)) message(getLLDVersion() + " (compatible with GNU linkers)"); - // ld.bfd always exits after printing out the version string. - // ld.gold proceeds if a given option is -v. Because gold's behavior - // is more permissive than ld.bfd, we chose what gold does here. + // The behavior of -v or --version is a bit strange, but this is + // needed for compatibility with GNU linkers. + if (Args.hasArg(OPT_v) && !Args.hasArg(OPT_INPUT)) + return; if (Args.hasArg(OPT_version)) return; From owner-svn-src-all@freebsd.org Tue Dec 12 01:20:47 2017 Return-Path: Delivered-To: svn-src-all@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 4BBE1E82E10; Tue, 12 Dec 2017 01:20:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17312304C; Tue, 12 Dec 2017 01:20:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBC1Kk2I056448; Tue, 12 Dec 2017 01:20:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBC1Kkar056447; Tue, 12 Dec 2017 01:20:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712120120.vBC1Kkar056447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 12 Dec 2017 01:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326788 - stable/11/sys/dev/vnic X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/vnic X-SVN-Commit-Revision: 326788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 01:20:47 -0000 Author: emaste Date: Tue Dec 12 01:20:45 2017 New Revision: 326788 URL: https://svnweb.freebsd.org/changeset/base/326788 Log: MFC r326597: vnic: apply hardware L3 checksum only for IPv4 Previously we set the csum_l3 flag for IPv4 and IPv6, but only IPv4 should have header checksumming applied. Prompted by Linux commit fa6d7cb5d76cf0467c61420fc9238045aedfd379. Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/dev/vnic/nicvf_queues.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vnic/nicvf_queues.c ============================================================================== --- stable/11/sys/dev/vnic/nicvf_queues.c Tue Dec 12 01:19:18 2017 (r326787) +++ stable/11/sys/dev/vnic/nicvf_queues.c Tue Dec 12 01:20:45 2017 (r326788) @@ -1802,6 +1802,8 @@ nicvf_sq_add_hdr_subdesc(struct snd_queue *sq, int qen if (mbuf == NULL) return (ENOBUFS); } + if (mbuf->m_pkthdr.csum_flags & CSUM_IP) + hdr->csum_l3 = 1; /* Enable IP csum calculation */ ip = (struct ip *)(mbuf->m_data + ehdrlen); iphlen = ip->ip_hl << 2; @@ -1809,13 +1811,10 @@ nicvf_sq_add_hdr_subdesc(struct snd_queue *sq, int qen proto = ip->ip_p; break; #endif - default: - hdr->csum_l3 = 0; } #if defined(INET6) || defined(INET) if (poff > 0 && mbuf->m_pkthdr.csum_flags != 0) { - hdr->csum_l3 = 1; /* Enable IP csum calculation */ switch (proto) { case IPPROTO_TCP: if ((mbuf->m_pkthdr.csum_flags & CSUM_TCP) == 0) From owner-svn-src-all@freebsd.org Tue Dec 12 01:41:03 2017 Return-Path: Delivered-To: svn-src-all@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 1D819E84533; Tue, 12 Dec 2017 01:41:03 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from mx2.catspoiler.org (mx2.catspoiler.org [IPv6:2607:f740:16::d18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "amnesiac", Issuer "amnesiac" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E480963398; Tue, 12 Dec 2017 01:41:02 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) by mx2.catspoiler.org (8.15.2/8.15.2) with ESMTPS id vBC1f15H040863 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 12 Dec 2017 01:41:06 GMT (envelope-from truckman@FreeBSD.org) Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.15.2/8.15.2) with ESMTPS id vBC1el8W016247 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Dec 2017 17:40:49 -0800 (PST) (envelope-from truckman@FreeBSD.org) Date: Mon, 11 Dec 2017 15:00:37 -0800 (PST) From: Don Lewis Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Eugene Grosbein cc: rgrimes@freebsd.org, Alexey Dokuchaev , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer In-Reply-To: <5A2ED3E1.1060908@grosbein.net> Message-ID: References: <201712111733.vBBHX2a0082236@pdx.rh.CN85.dnsmgr.net> <5A2ED3E1.1060908@grosbein.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=us-ascii Content-Disposition: INLINE X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 01:41:03 -0000 On 12 Dec, Eugene Grosbein wrote: > Now I run FreeBSD 11/i386 as my home router with IPSEC and torrent > client, and I run several virtualized routers with IPSEC tunnels, > jabber and mail server, squid and ZFS for src/obj/ports compression > and they all easily crash unless kern.kstack_pages raised upto 4. Same > for some other my i386 installations having IPSEC tunnels. IPSEC definitely used to wwith with kstack_pages=2 since I ran that way for a number of years. I haven't used IPSEC since I upgraded from FreeBSD 8.x to 10.x a while back, so it could be broken now. From owner-svn-src-all@freebsd.org Tue Dec 12 02:39:45 2017 Return-Path: Delivered-To: svn-src-all@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 9E8BEE87F3A; Tue, 12 Dec 2017 02:39:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 60DAB6604F; Tue, 12 Dec 2017 02:39:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 68DBA42AAAB; Tue, 12 Dec 2017 13:21:53 +1100 (AEDT) Date: Tue, 12 Dec 2017 13:21:52 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326771 - head/usr.sbin/efibootmgr In-Reply-To: <201712111617.vBBGHrCZ027885@repo.freebsd.org> Message-ID: <20171212130425.H1415@besplex.bde.org> References: <201712111617.vBBGHrCZ027885@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=n5yUbEFbmlxqnXSyspkA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 02:39:45 -0000 On Mon, 11 Dec 2017, Warner Losh wrote: > Log: > Unbreak gcc build by using (void) for functions that take no args. You mean "Fix a bug (K&R function definition without even a C99 prototype) that is detected by compilers like gcc with non-broken support for the -W flag that we used to detect such bugs. The bug is only a style bug in this case." > Modified: head/usr.sbin/efibootmgr/efibootmgr.c > ============================================================================== > --- head/usr.sbin/efibootmgr/efibootmgr.c Mon Dec 11 15:33:24 2017 (r326770) > +++ head/usr.sbin/efibootmgr/efibootmgr.c Mon Dec 11 16:17:53 2017 (r326771) > @@ -275,7 +275,7 @@ parse_args(int argc, char *argv[]) > > > static void > -print_order() > +print_order(void) > { > uint32_t attrs; > uint8_t *data; This is a K&R function definition. Since the function is also unprototyped, it has K&R semantics. Since it is defined before it is used, the compiler can see what it does even without -funit-at-a-time. It still has K&R semantics. However, since it is static the compiler can use a non-K&R compatible ABI to call or inline it anyway. Apparently broken compilers use this to suppress the warning, leaving only a style bug. This is a feature if the user didn't explicitly ask for warnings, otherwise a bug. Similarly for the other functions. KNF requires prototypes even for static functions, but this rule is often not followed. It allows the functions to be defined after they are used, in some sort of stable order. With -funit-at-a-time, this doesn't prevent inlining and other optimizations that you ask for (or even inlining that you don't ask for and don't want). Bruce From owner-svn-src-all@freebsd.org Tue Dec 12 02:51:34 2017 Return-Path: Delivered-To: svn-src-all@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 A1AE9E88BE7; Tue, 12 Dec 2017 02:51:34 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 63B3766EC4; Tue, 12 Dec 2017 02:51:33 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 4C9B7EA83EE; Tue, 12 Dec 2017 11:16:18 +1100 (AEDT) Date: Tue, 12 Dec 2017 11:16:17 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Nathan Whitehorn cc: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon In-Reply-To: Message-ID: <20171212111130.S1052@besplex.bde.org> References: <201712111804.vBBI44ZI074962@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=DHOn9E_sP0KH9zf_BPsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 02:51:34 -0000 On Mon, 11 Dec 2017, Nathan Whitehorn wrote: > I think this name might confuse people looking for "syscons". Can it be > renamed? Also, if it is ARM-specific, maybe it belongs in sys/arm? The wouldn't find it since it is not in any man page, GENERIC, or even in NOTES. It is not as bad as some drivers like drm2 that are also not in conf/files* so they are not puttable in GENERIC or NOTES or even in the user's config file. [.. Context lost to top posting] Bruce From owner-svn-src-all@freebsd.org Tue Dec 12 03:16:11 2017 Return-Path: Delivered-To: svn-src-all@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 98456E89DAE; Tue, 12 Dec 2017 03:16:11 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7026D6872D; Tue, 12 Dec 2017 03:16:11 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBC3GAJD009155; Tue, 12 Dec 2017 03:16:10 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBC3GAoh009154; Tue, 12 Dec 2017 03:16:10 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201712120316.vBC3GAoh009154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 12 Dec 2017 03:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326789 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 326789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 03:16:11 -0000 Author: jhibbits Date: Tue Dec 12 03:16:10 2017 New Revision: 326789 URL: https://svnweb.freebsd.org/changeset/base/326789 Log: Decode some PowerPC trap registers Decode on Book-E: * ESR (Exception Syndrome Register) * MCSR (Machine Check Status Register) On AIM: * MSSSR (Memory Subsystem Status Register) Makes it easier to tell at a glance the type of trap and machine check conditions now. Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Tue Dec 12 01:20:45 2017 (r326788) +++ head/sys/powerpc/powerpc/trap.c Tue Dec 12 03:16:10 2017 (r326789) @@ -146,6 +146,26 @@ static struct powerpc_exception powerpc_exceptions[] = { EXC_LAST, NULL } }; +#define ESR_BITMASK \ + "\20" \ + "\040b0\037b1\036b2\035b3\034PIL\033PRR\032PTR\031FP" \ + "\030ST\027b9\026DLK\025ILK\024b12\023b13\022BO\021PIE" \ + "\020b16\017b17\016b18\015b19\014b20\013b21\012b22\011b23" \ + "\010SPE\007EPID\006b26\005b27\004b28\003b29\002b30\001b31" +#define MCSR_BITMASK \ + "\20" \ + "\040MCP\037ICERR\036DCERR\035TLBPERR\034L2MMU_MHIT\033b5\032b6\031b7" \ + "\030b8\027b9\026b10\025NMI\024MAV\023MEA\022b14\021IF" \ + "\020LD\017ST\016LDG\015b19\014b20\013b21\012b22\011b23" \ + "\010b24\007b25\006b26\005b27\004b28\003b29\002TLBSYNC\001BSL2_ERR" +#define MSSSR_BITMASK \ + "\20" \ + "\040b0\037b1\036b2\035b3\034b4\033b5\032b6\031b7" \ + "\030b8\027b9\026b10\025b11\024b12\023L2TAG\022L2DAT\021L3TAG" \ + "\020L3DAT\017APE\016DPE\015TEA\014b20\013b21\012b22\011b23" \ + "\010b24\007b25\006b26\005b27\004b28\003b29\002b30\001b31" + + static const char * trapname(u_int vector) { @@ -443,19 +463,20 @@ printtrap(u_int vector, struct trapframe *frame, int i ver = mfpvr() >> 16; #if defined(AIM) if (MPC745X_P(ver)) - printf(" msssr0 = 0x%lx\n", - (u_long)mfspr(SPR_MSSSR0)); + printf(" msssr0 = 0x%b\n", + (int)mfspr(SPR_MSSSR0), MSSSR_BITMASK); #elif defined(BOOKE) pa = mfspr(SPR_MCARU); pa = (pa << 32) | (u_register_t)mfspr(SPR_MCAR); - printf(" mcsr = 0x%lx\n", (u_long)mfspr(SPR_MCSR)); + printf(" mcsr = 0x%b\n", + (int)mfspr(SPR_MCSR), MCSR_BITMASK); printf(" mcar = 0x%jx\n", (uintmax_t)pa); #endif break; } #ifdef BOOKE - printf(" esr = 0x%" PRIxPTR "\n", - frame->cpu.booke.esr); + printf(" esr = 0x%b\n", + (int)frame->cpu.booke.esr, ESR_BITMASK); #endif printf(" srr0 = 0x%" PRIxPTR "\n", frame->srr0); printf(" srr1 = 0x%lx\n", (u_long)frame->srr1); From owner-svn-src-all@freebsd.org Tue Dec 12 04:08:31 2017 Return-Path: Delivered-To: svn-src-all@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 6A1DAE8B60F; Tue, 12 Dec 2017 04:08:31 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35F8B6A73F; Tue, 12 Dec 2017 04:08:31 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBC48UcC031355; Tue, 12 Dec 2017 04:08:30 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBC48UiW031354; Tue, 12 Dec 2017 04:08:30 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712120408.vBC48UiW031354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 12 Dec 2017 04:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326790 - stable/10/usr.bin/find X-SVN-Group: stable-10 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/10/usr.bin/find X-SVN-Commit-Revision: 326790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 04:08:31 -0000 Author: delphij Date: Tue Dec 12 04:08:30 2017 New Revision: 326790 URL: https://svnweb.freebsd.org/changeset/base/326790 Log: Revert r326763. The change depends on r264387 which was not merged. Pointy hat to: delphij Modified: stable/10/usr.bin/find/function.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/find/function.c ============================================================================== --- stable/10/usr.bin/find/function.c Tue Dec 12 03:16:10 2017 (r326789) +++ stable/10/usr.bin/find/function.c Tue Dec 12 04:08:30 2017 (r326790) @@ -896,13 +896,8 @@ f_fstype(PLAN *plan, FTSENT *entry) } else p = NULL; - if (statfs(entry->fts_accpath, &sb)) { - if (!ignore_readdir_race || errno != ENOENT) { - warn("statfs: %s", entry->fts_accpath); - exitstatus = 1; - } - return 0; - } + if (statfs(entry->fts_accpath, &sb)) + err(1, "%s", entry->fts_accpath); if (p) { p[0] = save[0]; From owner-svn-src-all@freebsd.org Tue Dec 12 06:18:37 2017 Return-Path: Delivered-To: svn-src-all@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 BC144E8EA62; Tue, 12 Dec 2017 06:18:37 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 900066DEDA; Tue, 12 Dec 2017 06:18:37 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 9F7285459; Tue, 12 Dec 2017 06:18:36 +0000 (UTC) Date: Tue, 12 Dec 2017 06:18:36 +0000 From: Alexey Dokuchaev To: Nathan Whitehorn Cc: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon Message-ID: <20171212061836.GA58740@FreeBSD.org> References: <201712111804.vBBI44ZI074962@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 06:18:37 -0000 On Mon, Dec 11, 2017 at 10:14:04AM -0800, Nathan Whitehorn wrote: > I think this name might confuse people looking for "syscons". Can it be > renamed? Also, if it is ARM-specific, maybe it belongs in sys/arm? +1 for rename, it's very confusing now. ./danfe From owner-svn-src-all@freebsd.org Tue Dec 12 06:56:22 2017 Return-Path: Delivered-To: svn-src-all@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 C0071E8F75C; Tue, 12 Dec 2017 06:56:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A2BB6F08A; Tue, 12 Dec 2017 06:56:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBC6uLVN004186; Tue, 12 Dec 2017 06:56:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBC6uL45004185; Tue, 12 Dec 2017 06:56:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712120656.vBC6uL45004185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 12 Dec 2017 06:56:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326791 - head/usr.bin/gzip X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/usr.bin/gzip X-SVN-Commit-Revision: 326791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 06:56:22 -0000 Author: delphij Date: Tue Dec 12 06:56:21 2017 New Revision: 326791 URL: https://svnweb.freebsd.org/changeset/base/326791 Log: Close the correct file descriptor. MFC after: 2 weeks Modified: head/usr.bin/gzip/gzip.c Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Tue Dec 12 04:08:30 2017 (r326790) +++ head/usr.bin/gzip/gzip.c Tue Dec 12 06:56:21 2017 (r326791) @@ -1718,7 +1718,7 @@ file_uncompress(char *file, char *outfile, size_t outs if (fd != -1) close(fd); if (zfd != -1 && zfd != STDOUT_FILENO) - close(fd); + close(zfd); return -1; } From owner-svn-src-all@freebsd.org Tue Dec 12 08:02:54 2017 Return-Path: Delivered-To: svn-src-all@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 80155E91163; Tue, 12 Dec 2017 08:02:54 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 129C0712F7; Tue, 12 Dec 2017 08:02:53 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBC82m0D013786 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2017 09:02:48 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: cem@freebsd.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBC82i4K096121; Tue, 12 Dec 2017 15:02:44 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Don Lewis References: <201712111733.vBBHX2a0082236@pdx.rh.CN85.dnsmgr.net> <5A2ED3E1.1060908@grosbein.net> Cc: rgrimes@freebsd.org, Alexey Dokuchaev , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer From: Eugene Grosbein Message-ID: <5A2F8D24.2060203@grosbein.net> Date: Tue, 12 Dec 2017 15:02:44 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 08:02:54 -0000 On 12.12.2017 06:00, Don Lewis wrote: > On 12 Dec, Eugene Grosbein wrote: > >> Now I run FreeBSD 11/i386 as my home router with IPSEC and torrent >> client, and I run several virtualized routers with IPSEC tunnels, >> jabber and mail server, squid and ZFS for src/obj/ports compression >> and they all easily crash unless kern.kstack_pages raised upto 4. Same >> for some other my i386 installations having IPSEC tunnels. > > IPSEC definitely used to wwith with kstack_pages=2 since I ran that way > for a number of years. I haven't used IPSEC since I upgraded from > FreeBSD 8.x to 10.x a while back, so it could be broken now. That's all about FreeBSD 11 code base that growed more "fat" comparing with 8.x times. It is not "broken", it just needs more stack :-) From owner-svn-src-all@freebsd.org Tue Dec 12 08:05:34 2017 Return-Path: Delivered-To: svn-src-all@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 11A0AE91225; Tue, 12 Dec 2017 08:05:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1D9C71495; Tue, 12 Dec 2017 08:05:33 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 34AEC693D; Tue, 12 Dec 2017 08:05:33 +0000 (UTC) Date: Tue, 12 Dec 2017 08:05:33 +0000 From: Alexey Dokuchaev To: Jung-uk Kim Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r291722 - in stable/9: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/des/t crypto/openssl/crypto/evp crypto/openssl/doc crypt... Message-ID: <20171212080533.GA46364@FreeBSD.org> References: <201512032124.tB3LOfEX046377@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201512032124.tB3LOfEX046377@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 08:05:34 -0000 On Thu, Dec 03, 2015 at 09:24:41PM +0000, Jung-uk Kim wrote: > New Revision: 291722 > URL: https://svnweb.freebsd.org/changeset/base/291722 > > Log: > Merge OpenSSL 0.9.8zh. > > Added: > stable/9/crypto/openssl/doc/dir-locals.example.el > - copied unchanged from r291711, vendor-crypto/openssl/dist-0.9.8/doc/dir-locals.example.el > stable/9/crypto/openssl/doc/openssl-c-indent.el > - copied unchanged from r291711, vendor-crypto/openssl/dist-0.9.8/doc/openssl-c-indent.el > Deleted: > stable/9/crypto/openssl/crypto/des/t/test > stable/9/crypto/openssl/test/bctest > stable/9/crypto/openssl/util/pod2mantest > ... Hi, I want to bring OpenSSL in stable/8 on par with stable/9, given that they are both 0.9.8 it should be feasible and makes sense. The latest 0.9.8zh version was merged to stable/9, but not to stable/8. I need some advice on how to perform the merge properly, as SVN does not quite like what I'm doing (per Subversion Primer in the Committer's Guide): $ cd /usr/src/8/crypto/openssl $ svn up $ svn merge --accept=postpone svn+ssh://repo.freebsd.org/base/vendor-crypto/openssl/dist-0.9.8 . svn: E195016: 'svn+ssh://repo.freebsd.org/base/vendor-crypto/openssl/dist-0.9.8@326791' must be ancestrally related to 'svn+ssh://repo.freebsd.org/base/stable/8/crypto/openssl@326791' ./danfe From owner-svn-src-all@freebsd.org Tue Dec 12 08:52:53 2017 Return-Path: Delivered-To: svn-src-all@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 0D34EE91F23; Tue, 12 Dec 2017 08:52:53 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A00B172A24; Tue, 12 Dec 2017 08:52:52 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [78.138.80.135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id vBC8qnY7000536; Tue, 12 Dec 2017 09:52:49 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id DF963227; Tue, 12 Dec 2017 09:52:48 +0100 (CET) Message-ID: <5A2F98DF.2020400@omnilan.de> Date: Tue, 12 Dec 2017 09:52:47 +0100 From: Harry Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Alexey Dokuchaev CC: Nathan Whitehorn , svn-src-head@freebsd.org, Kyle Evans , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon References: <201712111804.vBBI44ZI074962@repo.freebsd.org> <20171212061836.GA58740@FreeBSD.org> In-Reply-To: <20171212061836.GA58740@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Greylist: ACL 129 matched, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [78.138.80.130]); Tue, 12 Dec 2017 09:52:49 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: 78.138.80.135; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 08:52:53 -0000 Bezüglich Alexey Dokuchaev's Nachricht vom 12.12.2017 07:18 (localtime): > On Mon, Dec 11, 2017 at 10:14:04AM -0800, Nathan Whitehorn wrote: >> I think this name might confuse people looking for "syscons". Can it be >> renamed? Also, if it is ARM-specific, maybe it belongs in sys/arm? > +1 for rename, it's very confusing now. Not that mine would have much weight, but also +1 from here. Stumbled at any commit log yet – mmdevcon corecon[f] chpcon[f] soccon[f] – just to throw in seomthing… -harry From owner-svn-src-all@freebsd.org Tue Dec 12 09:00:13 2017 Return-Path: Delivered-To: svn-src-all@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 99604E92264; Tue, 12 Dec 2017 09:00:13 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 32DDC72C7A; Tue, 12 Dec 2017 09:00:11 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 45cdad0a; Tue, 12 Dec 2017 10:00:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=d7YUzNW+Ot+Nkj2BUEdhlBN/wvU=; b=MuCoUenA59D0X/nID4PykbhFWTiN C+iuJjsNifm+LEfmkEtSJIy+dHvoD+xSWTMb3NP3KgsfYqjZ6G5P+aUJZO6z2COA LOG1DhTnoIKUt0NTH5tsJXMRXkyi4WERXCKl+W0hsRafFO5r2Dk3Ldl6Wvh61yir kD/4Vn0+tf7dUyg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=oEi1ofFd0eiV47IK4lBfd1JdfqHznibat17qespZAjQALuLna1954gon iVren6t7GYqXylJ4h9BqNf5YQJ+9ifm6W6nY4lp0QQAp3/t0kBCVcezZW+fTegWM Lnkbg7xEg2NJNxpM+tA2PAdIzI/bNCJYfYsO4i8kytXZSDPtnXI= Received: from arcadia (evadot.gandi.net [217.70.181.36]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 4c328281 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 12 Dec 2017 10:00:08 +0100 (CET) Date: Tue, 12 Dec 2017 10:00:08 +0100 From: Emmanuel Vadot To: Alexey Dokuchaev Cc: Nathan Whitehorn , Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon Message-Id: <20171212100008.4c44fcf78714d5a159937b99@bidouilliste.com> In-Reply-To: <20171212061836.GA58740@FreeBSD.org> References: <201712111804.vBBI44ZI074962@repo.freebsd.org> <20171212061836.GA58740@FreeBSD.org> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 09:00:13 -0000 On Tue, 12 Dec 2017 06:18:36 +0000 Alexey Dokuchaev wrote: > On Mon, Dec 11, 2017 at 10:14:04AM -0800, Nathan Whitehorn wrote: > > I think this name might confuse people looking for "syscons". Can it be > > renamed? Also, if it is ARM-specific, maybe it belongs in sys/arm? > > +1 for rename, it's very confusing now. > > ./danfe It's not confusing. The spec is clear it's named "syscon" so our driver must be named syscon, naming it otherwise would be confusing. What's confusing is the directory name for "sc" named syscons, it's config options are named SC_* and the device is named sc. The only valuable remark in this thread is bde's one saying it's not documented etc ... and yes we do sucks in this area in the arm world. Anyhow, I caught a discussion between mmel@ and kevans@ on IRC saying that we will move the driver into extres after adding some standard stuff common to extres framework. -- Emmanuel Vadot From owner-svn-src-all@freebsd.org Tue Dec 12 09:46:54 2017 Return-Path: Delivered-To: svn-src-all@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 EE3DFE92F2D; Tue, 12 Dec 2017 09:46:54 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8C9F742BB; Tue, 12 Dec 2017 09:46:54 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBC9kr5c075726; Tue, 12 Dec 2017 09:46:53 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBC9krNL075725; Tue, 12 Dec 2017 09:46:53 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201712120946.vBC9krNL075725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Tue, 12 Dec 2017 09:46:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326792 - head/stand/uboot/common X-SVN-Group: head X-SVN-Commit-Author: antoine X-SVN-Commit-Paths: head/stand/uboot/common X-SVN-Commit-Revision: 326792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 09:46:55 -0000 Author: antoine Date: Tue Dec 12 09:46:53 2017 New Revision: 326792 URL: https://svnweb.freebsd.org/changeset/base/326792 Log: Attempt to unbreak buildworld Modified: head/stand/uboot/common/main.c Modified: head/stand/uboot/common/main.c ============================================================================== --- head/stand/uboot/common/main.c Tue Dec 12 06:56:21 2017 (r326791) +++ head/stand/uboot/common/main.c Tue Dec 12 09:46:53 2017 (r326792) @@ -500,7 +500,7 @@ main(int argc, char **argv) archsw.arch_readin = uboot_readin; archsw.arch_autoload = uboot_autoload; - interact(NULL); /* doesn't return */ + interact(); /* doesn't return */ return (0); } From owner-svn-src-all@freebsd.org Tue Dec 12 11:09:47 2017 Return-Path: Delivered-To: svn-src-all@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 5D8F8E945F6; Tue, 12 Dec 2017 11:09:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A7337680B; Tue, 12 Dec 2017 11:09:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCB9k1B009759; Tue, 12 Dec 2017 11:09:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCB9k6P009758; Tue, 12 Dec 2017 11:09:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712121109.vBCB9k6P009758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 12 Dec 2017 11:09:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326793 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 326793 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 11:09:47 -0000 Author: kib Date: Tue Dec 12 11:09:46 2017 New Revision: 326793 URL: https://svnweb.freebsd.org/changeset/base/326793 Log: MFC r326311: Fix index calculation for the page table pages for efirt 1:1 map. Modified: stable/11/sys/amd64/amd64/efirt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/efirt.c ============================================================================== --- stable/11/sys/amd64/amd64/efirt.c Tue Dec 12 09:46:53 2017 (r326792) +++ stable/11/sys/amd64/amd64/efirt.c Tue Dec 12 11:09:46 2017 (r326793) @@ -104,6 +104,7 @@ static struct mtx efi_lock; static pml4_entry_t *efi_pml4; static vm_object_t obj_1t1_pt; static vm_page_t efi_pml4_page; +static vm_pindex_t efi_1t1_idx; static void efi_destroy_1t1_map(void) @@ -126,10 +127,10 @@ efi_destroy_1t1_map(void) } static vm_page_t -efi_1t1_page(vm_pindex_t idx) +efi_1t1_page(void) { - return (vm_page_grab(obj_1t1_pt, idx, VM_ALLOC_NOBUSY | + return (vm_page_grab(obj_1t1_pt, efi_1t1_idx++, VM_ALLOC_NOBUSY | VM_ALLOC_WIRED | VM_ALLOC_ZERO)); } @@ -147,7 +148,7 @@ efi_1t1_pte(vm_offset_t va) pml4_idx = pmap_pml4e_index(va); pml4e = &efi_pml4[pml4_idx]; if (*pml4e == 0) { - m = efi_1t1_page(1 + pml4_idx); + m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); *pml4e = mphys | X86_PG_RW | X86_PG_V; } else { @@ -158,7 +159,7 @@ efi_1t1_pte(vm_offset_t va) pdp_idx = pmap_pdpe_index(va); pdpe += pdp_idx; if (*pdpe == 0) { - m = efi_1t1_page(1 + NPML4EPG + (pml4_idx + 1) * (pdp_idx + 1)); + m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); *pdpe = mphys | X86_PG_RW | X86_PG_V; } else { @@ -169,8 +170,7 @@ efi_1t1_pte(vm_offset_t va) pd_idx = pmap_pde_index(va); pde += pd_idx; if (*pde == 0) { - m = efi_1t1_page(1 + NPML4EPG + NPML4EPG * NPDPEPG + - (pml4_idx + 1) * (pdp_idx + 1) * (pd_idx + 1)); + m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); *pde = mphys | X86_PG_RW | X86_PG_V; } else { @@ -196,8 +196,9 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int obj_1t1_pt = vm_pager_allocate(OBJT_PHYS, NULL, ptoa(1 + NPML4EPG + NPML4EPG * NPDPEPG + NPML4EPG * NPDPEPG * NPDEPG), VM_PROT_ALL, 0, NULL); + efi_1t1_idx = 0; VM_OBJECT_WLOCK(obj_1t1_pt); - efi_pml4_page = efi_1t1_page(0); + efi_pml4_page = efi_1t1_page(); VM_OBJECT_WUNLOCK(obj_1t1_pt); efi_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(efi_pml4_page)); pmap_pinit_pml4(efi_pml4_page); From owner-svn-src-all@freebsd.org Tue Dec 12 11:25:32 2017 Return-Path: Delivered-To: svn-src-all@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 07898E94FC9; Tue, 12 Dec 2017 11:25:32 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4DD8774D5; Tue, 12 Dec 2017 11:25:31 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCBPUdk017992; Tue, 12 Dec 2017 11:25:30 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCBPU8m017991; Tue, 12 Dec 2017 11:25:30 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201712121125.vBCBPU8m017991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 12 Dec 2017 11:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326794 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 326794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 11:25:32 -0000 Author: mmel Date: Tue Dec 12 11:25:30 2017 New Revision: 326794 URL: https://svnweb.freebsd.org/changeset/base/326794 Log: Rework alignment handling in __libc_allocate_tls() for Variant I of TLS layout. There are two versions of variant I of TLS - ARM and aarch64 uses original version of variant I here TP points to start of TCB followed by aligned TLS segment. Both TCB and TLS must be aligned to alignment of TLS section. The TCB[0] points to DTV vector and DTV values are real addresses (without bias). - MIPS, PowerPC and RISC-V use modified version of variant I, where TP points (with bias) to TLS and TCB immediately precedes TLS without any alignment gap. Only TLS should be aligned. The TCB[0] points to DTV vector and DTV values are biased by constant value (0x8000) from real addresses. Take all this in account when allocating memory for TLS structures. MFC after: 1 month Reviewed by: kib, mizhka Tested by: mizhka(on mips) Differential Revision: https://reviews.freebsd.org/D13378 Modified: head/lib/libc/gen/tls.c Modified: head/lib/libc/gen/tls.c ============================================================================== --- head/lib/libc/gen/tls.c Tue Dec 12 11:09:46 2017 (r326793) +++ head/lib/libc/gen/tls.c Tue Dec 12 11:25:30 2017 (r326794) @@ -89,6 +89,12 @@ void __libc_free_tls(void *tls, size_t tcbsize, size_t #define TLS_VARIANT_II #endif +#if defined(__mips__) || defined(__powerpc__) || defined(__riscv) +#define DTV_OFFSET 0x8000 +#else +#define DTV_OFFSET 0 +#endif + #ifndef PIC static size_t tls_static_space; @@ -149,13 +155,70 @@ free_aligned(void *ptr) #ifdef TLS_VARIANT_I +/* + * There are two versions of variant I of TLS + * + * - ARM and aarch64 uses original variant I as is described in [1] and [2], + * where TP points to start of TCB followed by aligned TLS segment. + * Both TCB and TLS must be aligned to alignment of TLS section. The TCB[0] + * points to DTV vector and DTV values are real addresses (without bias). + * Note: for Local Exec TLS Model, the offsets from TP (TCB in this case) to + * TLS variables are computed by linker, so we cannot overalign TLS section. + * + * - MIPS, PowerPC and RISC-V use modified version of variant I, + * described in [3] where TP points (with bias) to TLS and TCB immediately + * precedes TLS without any alignment gap[4]. Only TLS should be aligned. + * The TCB[0] points to DTV vector and DTV values are biased by constant + * value (0x8000) from real addresses[5]. + * + * [1] Ulrich Drepper: ELF Handling for Thread-Local Storage + * www.akkadia.org/drepper/tls.pdf + * + * [2] ARM IHI 0045E: Addenda to, and Errata in, the ABI for the ARM(r) + * Architecture + * infocenter.arm.com/help/topic/com.arm.doc.ihi0045e/IHI0045E_ABI_addenda.pdf + * + * [3] OpenPOWER: Power Architecture 64-Bit ELF V2 ABI Specification + * https://members.openpowerfoundation.org/document/dl/576 + * + * [4] Its unclear if "without any alignment gap" is hard ABI requirement, + * but we must follow this rule due to suboptimal _set_tp() + * (aka _SET_TP) implementation. This function doesn't expect TP but + * TCB as argument. + * + * [5] I'm not able to validate "values are biased" assertions. + */ + #define TLS_TCB_SIZE (2 * sizeof(void *)) /* - * Free Static TLS using the Variant I method. + * Return pointer to allocated TLS block */ +static void * +get_tls_block_ptr(void *tcb, size_t tcbsize) +{ + size_t extra_size, post_size, pre_size, tls_block_size; + + /* Compute fragments sizes. */ + extra_size = tcbsize - TLS_TCB_SIZE; +#if defined(__aarch64__) || defined(__arm__) + post_size = roundup2(TLS_TCB_SIZE, tls_init_align) - TLS_TCB_SIZE; +#else + post_size = 0; +#endif + tls_block_size = tcbsize + post_size; + pre_size = roundup2(tls_block_size, tls_init_align) - tls_block_size; + + return ((char *)tcb - pre_size - extra_size); +} + +/* + * Free Static TLS using the Variant I method. The tcbsize + * and tcbalign parameters must be the same as those used to allocate + * the block. + */ void -__libc_free_tls(void *tcb, size_t tcbsize __unused, size_t tcbalign __unused) +__libc_free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) { Elf_Addr *dtv; Elf_Addr **tls; @@ -163,55 +226,88 @@ __libc_free_tls(void *tcb, size_t tcbsize __unused, si tls = (Elf_Addr **)tcb; dtv = tls[0]; __je_bootstrap_free(dtv); - free_aligned(tls); + free_aligned(get_tls_block_ptr(tcb, tcbsize)); } /* * Allocate Static TLS using the Variant I method. + * + * To handle all above requirements, we setup the following layout for + * TLS block: + * (whole memory block is aligned with MAX(TLS_TCB_ALIGN, tls_init_align)) + * + * +----------+--------------+--------------+-----------+------------------+ + * | pre gap | extended TCB | TCB | post gap | TLS segment | + * | pre_size | extra_size | TLS_TCB_SIZE | post_size | tls_static_space | + * +----------+--------------+--------------+-----------+------------------+ + * + * where: + * extra_size is tcbsize - TLS_TCB_SIZE + * post_size is used to adjust TCB to TLS aligment for first version of TLS + * layout and is always 0 for second version. + * pre_size is used to adjust TCB aligment for first version and to adjust + * TLS alignment for second version. + * */ void * __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) { - Elf_Addr *dtv; - Elf_Addr **tls; + Elf_Addr *dtv, **tcb; + char *tls_block, *tls; + size_t extra_size, maxalign, post_size, pre_size, tls_block_size; if (oldtcb != NULL && tcbsize == TLS_TCB_SIZE) return (oldtcb); tls_assert(tcbalign >= TLS_TCB_ALIGN); - tls_assert(tcbsize == TLS_TCB_SIZE); + maxalign = MAX(tcbalign, tls_init_align); - tcbsize = roundup2(tcbsize, tcbalign); - tls = malloc_aligned(tcbsize + tls_static_space, tcbalign); - if (tls == NULL) { + /* Compute fragmets sizes. */ + extra_size = tcbsize - TLS_TCB_SIZE; +#if defined(__aarch64__) || defined(__arm__) + post_size = roundup2(TLS_TCB_SIZE, tls_init_align) - TLS_TCB_SIZE; +#else + post_size = 0; +#endif + tls_block_size = tcbsize + post_size; + pre_size = roundup2(tls_block_size, tls_init_align) - tls_block_size; + tls_block_size += pre_size + tls_static_space; + + /* Allocate whole TLS block */ + tls_block = malloc_aligned(tls_block_size, maxalign); + if (tls_block == NULL) { tls_msg("__libc_allocate_tls: Out of memory.\n"); abort(); } - memset(tls, 0, tcbsize + tls_static_space); + memset(tls_block, 0, tls_block_size); + tcb = (Elf_Addr **)(tls_block + pre_size + extra_size); + tls = (char *)tcb + TLS_TCB_SIZE + post_size; if (oldtcb != NULL) { - memcpy(tls, oldtcb, tcbsize + tls_static_space); - __je_bootstrap_free(oldtcb); + memcpy(tls_block, get_tls_block_ptr(oldtcb, tcbsize), + tls_block_size); + free_aligned(oldtcb); /* Adjust the DTV. */ - dtv = tls[0]; - dtv[2] = (Elf_Addr)tls + tcbsize; + dtv = tcb[0]; + dtv[2] = (Elf_Addr)(tls + DTV_OFFSET); } else { dtv = __je_bootstrap_malloc(3 * sizeof(Elf_Addr)); if (dtv == NULL) { tls_msg("__libc_allocate_tls: Out of memory.\n"); abort(); } - tls[0] = dtv; + /* Build the DTV. */ + tcb[0] = dtv; dtv[0] = 1; /* Generation. */ dtv[1] = 1; /* Segments count. */ - dtv[2] = (Elf_Addr)tls + tcbsize; + dtv[2] = (Elf_Addr)(tls + DTV_OFFSET); if (tls_init_size > 0) - memcpy((void*)dtv[2], tls_init, tls_init_size); + memcpy(tls, tls_init, tls_init_size); } - return (tls); + return (tcb); } #endif @@ -234,6 +330,7 @@ __libc_free_tls(void *tcb, size_t tcbsize __unused, si * Figure out the size of the initial TLS block so that we can * find stuff which ___tls_get_addr() allocated dynamically. */ + tcbalign = MAX(tcbalign, tls_init_align); size = roundup2(tls_static_space, tcbalign); dtv = ((Elf_Addr**)tcb)[1]; @@ -254,6 +351,7 @@ __libc_allocate_tls(void *oldtls, size_t tcbsize, size Elf_Addr *dtv; Elf_Addr segbase, oldsegbase; + tcbalign = MAX(tcbalign, tls_init_align); size = roundup2(tls_static_space, tcbalign); if (tcbsize < 2 * sizeof(Elf_Addr)) @@ -368,9 +466,7 @@ _init_tls(void) break; } } - - tls = _rtld_allocate_tls(NULL, TLS_TCB_SIZE, - MAX(TLS_TCB_ALIGN, tls_init_align)); + tls = _rtld_allocate_tls(NULL, TLS_TCB_SIZE, TLS_TCB_ALIGN); _set_tp(tls); #endif From owner-svn-src-all@freebsd.org Tue Dec 12 12:49:56 2017 Return-Path: Delivered-To: svn-src-all@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 4B42DE977E3 for ; Tue, 12 Dec 2017 12:49:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (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 16CBE7ACBD for ; Tue, 12 Dec 2017 12:49:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22e.google.com with SMTP id d137so23979784itc.2 for ; Tue, 12 Dec 2017 04:49:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=XYcNAiUH7Y3VVmE6SNDCG15pmEIj8K8zzut7Op334EI=; b=YBPmHQVkWPJYK/lD4SWYpVn1qWLUihqHr8axS9TTpaSy9LTaZGaZgeKSNJ1sBlvYK1 5Evz2GhalWyTUa4r3rCPxl3ZoSBwN4WsyDgcNehg1Jy+G9HG0kooevd+1IaJquG384be 0ZiAb4zI7UP6a03ICIoV8zzE5A8VYGtdFakXm+qn4JJFZl/2GCcE08Mg1DdLSumA5mu5 xjiTO4EeL5eKj3AG4QZY9VMV25sa7XpVw67B8RQ7zHuTuzIPozHLgXS3A726fynkmlWt wDBxFVdzLBbDwH8lO6ewU3c0Op+Veet4i1jINUN6l9PVd0zyTZIj31Re8wiNW4uRA2So VRJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=XYcNAiUH7Y3VVmE6SNDCG15pmEIj8K8zzut7Op334EI=; b=pmocW/0HuiKMAvphqutlSb6gTFFp+fglqTf4vsE9qDu1geLKLVOGvhlpaQrjaZkc1X 52amc/8V5R3diCdtjVHwKN8GxQG4PctqaYGTYt8/A95do58ZYKxeMfGQ0Hm4Ij7ddSCh fng1zfc624i04pTlc4MQjnmzch9NEd3ALK+P7z6yPimsps9XeCpH/+l/FSsNKATCdlMR LPxcNRu6PnXM/HVf3X4oCGqDkpLyZ95txqU8m8HfVccPpNBipgRlCmxNfRwdjKd5aZkO CjuRD6AZLl/qv+m2hg3FvBF31g1x+hf5uAo2I6y9rjNbcHsXyIlZABiufIQv2LM1wwYU RSEw== X-Gm-Message-State: AKGB3mKjlhtTM3bHDFYXz/4/FgM8c4f140I7a3WyZq5cERxnpuKzGIqT 0EAgrpiFEENr9N5HCMLt4uzMvAt5fn9npihC/rczTg== X-Google-Smtp-Source: ACJfBovLNw8juGInq5lbXc7zLTB/7RVkOwQEh2rUMWbXDLDBnLDL4saXnEbKhZTdu4Kbce78jLNwaUujAndh3lR7Dwk= X-Received: by 10.107.104.18 with SMTP id d18mr4596299ioc.136.1513082995142; Tue, 12 Dec 2017 04:49:55 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Tue, 12 Dec 2017 04:49:53 -0800 (PST) X-Originating-IP: [2607:fb90:9ca1:4178:151:5958:8f12:5584] Received: by 10.79.108.204 with HTTP; Tue, 12 Dec 2017 04:49:53 -0800 (PST) In-Reply-To: <201712120946.vBC9krNL075725@repo.freebsd.org> References: <201712120946.vBC9krNL075725@repo.freebsd.org> From: Warner Losh Date: Tue, 12 Dec 2017 05:49:53 -0700 X-Google-Sender-Auth: lZ2T9M-NiVBWU66iij6shL-s8Cg Message-ID: Subject: Re: svn commit: r326792 - head/stand/uboot/common To: Antoine Brodin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 12:49:56 -0000 This commit message sucks. Please use a more descriptive one in the future like "catch up to change rXXXXX that remove the argument from interact." If you want to be snarky, add 'pounty hat to imp' to it. Thats infornative. Your message is utterly useless. It doesn't even say what arch is broken. Warner Warner On Dec 12, 2017 1:47 AM, "Antoine Brodin" wrote: > Author: antoine > Date: Tue Dec 12 09:46:53 2017 > New Revision: 326792 > URL: https://svnweb.freebsd.org/changeset/base/326792 > > Log: > Attempt to unbreak buildworld > > Modified: > head/stand/uboot/common/main.c > > Modified: head/stand/uboot/common/main.c > ============================================================ > ================== > --- head/stand/uboot/common/main.c Tue Dec 12 06:56:21 2017 > (r326791) > +++ head/stand/uboot/common/main.c Tue Dec 12 09:46:53 2017 > (r326792) > @@ -500,7 +500,7 @@ main(int argc, char **argv) > archsw.arch_readin = uboot_readin; > archsw.arch_autoload = uboot_autoload; > > - interact(NULL); /* doesn't return */ > + interact(); /* doesn't return */ > > return (0); > } > > From owner-svn-src-all@freebsd.org Tue Dec 12 12:59:06 2017 Return-Path: Delivered-To: svn-src-all@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 2F455E97D3F; Tue, 12 Dec 2017 12:59:06 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 068387B3B9; Tue, 12 Dec 2017 12:59:05 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCCx5ua057191; Tue, 12 Dec 2017 12:59:05 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCCx4l3057189; Tue, 12 Dec 2017 12:59:04 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201712121259.vBCCx4l3057189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Tue, 12 Dec 2017 12:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r326795 - in stable/8/contrib/gcclibs: include libiberty X-SVN-Group: stable-8 X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: in stable/8/contrib/gcclibs: include libiberty X-SVN-Commit-Revision: 326795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 12:59:06 -0000 Author: danfe (ports committer) Date: Tue Dec 12 12:59:04 2017 New Revision: 326795 URL: https://svnweb.freebsd.org/changeset/base/326795 Log: MFC r301291: libiberty: prevent integer overflow. Take care of very old bug leading to heap-buffer overflow by processing certain file headers via bfd binary. PR: 200888 Obtained from: OpenBSD Approved by: pfg Modified: stable/8/contrib/gcclibs/include/objalloc.h stable/8/contrib/gcclibs/libiberty/objalloc.c Directory Properties: stable/8/contrib/gcclibs/ (props changed) Modified: stable/8/contrib/gcclibs/include/objalloc.h ============================================================================== --- stable/8/contrib/gcclibs/include/objalloc.h Tue Dec 12 11:25:30 2017 (r326794) +++ stable/8/contrib/gcclibs/include/objalloc.h Tue Dec 12 12:59:04 2017 (r326795) @@ -1,5 +1,5 @@ /* objalloc.h -- routines to allocate memory for objects - Copyright 1997, 2001 Free Software Foundation, Inc. + Copyright 1997, 2001-2012 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Solutions. This program is free software; you can redistribute it and/or modify it @@ -91,7 +91,7 @@ extern void *_objalloc_alloc (struct objalloc *, unsig if (__len == 0) \ __len = 1; \ __len = (__len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); \ - (__len <= __o->current_space \ + (__len != 0 && __len <= __o->current_space \ ? (__o->current_ptr += __len, \ __o->current_space -= __len, \ (void *) (__o->current_ptr - __len)) \ Modified: stable/8/contrib/gcclibs/libiberty/objalloc.c ============================================================================== --- stable/8/contrib/gcclibs/libiberty/objalloc.c Tue Dec 12 11:25:30 2017 (r326794) +++ stable/8/contrib/gcclibs/libiberty/objalloc.c Tue Dec 12 12:59:04 2017 (r326795) @@ -1,5 +1,5 @@ /* objalloc.c -- routines to allocate memory for objects - Copyright 1997 Free Software Foundation, Inc. + Copyright 1997-2012 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Solutions. This program is free software; you can redistribute it and/or modify it @@ -112,14 +112,21 @@ objalloc_create (void) /* Allocate space from an objalloc structure. */ PTR -_objalloc_alloc (struct objalloc *o, unsigned long len) +_objalloc_alloc (struct objalloc *o, unsigned long original_len) { + unsigned long len = original_len; + /* We avoid confusion from zero sized objects by always allocating at least 1 byte. */ if (len == 0) len = 1; len = (len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); + + /* CVE-2012-3509: Check for overflow in the alignment operation above + * and then malloc argument below. */ + if (len + CHUNK_HEADER_SIZE < original_len) + return NULL; if (len <= o->current_space) { From owner-svn-src-all@freebsd.org Tue Dec 12 15:31:01 2017 Return-Path: Delivered-To: svn-src-all@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 5168CE9BF52; Tue, 12 Dec 2017 15:31:01 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D787243F; Tue, 12 Dec 2017 15:31:00 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBCFUUd1086786; Tue, 12 Dec 2017 07:30:30 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBCFUU2G086785; Tue, 12 Dec 2017 07:30:30 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712121530.vBCFUU2G086785@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326758 - in head/sys/i386: conf include In-Reply-To: To: Don Lewis Date: Tue, 12 Dec 2017 07:30:30 -0800 (PST) CC: Eugene Grosbein , rgrimes@FreeBSD.org, Alexey Dokuchaev , Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Conrad Meyer Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 15:31:01 -0000 > On 12 Dec, Eugene Grosbein wrote: > > > Now I run FreeBSD 11/i386 as my home router with IPSEC and torrent > > client, and I run several virtualized routers with IPSEC tunnels, > > jabber and mail server, squid and ZFS for src/obj/ports compression > > and they all easily crash unless kern.kstack_pages raised upto 4. Same > > for some other my i386 installations having IPSEC tunnels. > > IPSEC definitely used to wwith with kstack_pages=2 since I ran that way > for a number of years. I haven't used IPSEC since I upgraded from > FreeBSD 8.x to 10.x a while back, so it could be broken now. I think this comes as a regression in 10.x or perhaps later. So that atleast narrows down what has triggered the need for more kernel stack space. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Dec 12 15:40:23 2017 Return-Path: Delivered-To: svn-src-all@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 C40FEE9C317; Tue, 12 Dec 2017 15:40:23 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F5C829CB; Tue, 12 Dec 2017 15:40:23 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBCFeM0h086831; Tue, 12 Dec 2017 07:40:22 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBCFeLFZ086830; Tue, 12 Dec 2017 07:40:21 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712121540.vBCFeLFZ086830@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon In-Reply-To: <20171212100008.4c44fcf78714d5a159937b99@bidouilliste.com> To: Emmanuel Vadot Date: Tue, 12 Dec 2017 07:40:21 -0800 (PST) CC: Alexey Dokuchaev , Nathan Whitehorn , Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 15:40:23 -0000 > On Tue, 12 Dec 2017 06:18:36 +0000 > Alexey Dokuchaev wrote: > > > On Mon, Dec 11, 2017 at 10:14:04AM -0800, Nathan Whitehorn wrote: > > > I think this name might confuse people looking for "syscons". Can it be > > > renamed? Also, if it is ARM-specific, maybe it belongs in sys/arm? > > > > +1 for rename, it's very confusing now. ++1 rename it or expect irrate users > > > > ./danfe > > It's not confusing. The spec is clear it's named "syscon" so our > driver must be named syscon, naming it otherwise would be confusing. > What's confusing is the directory name for "sc" named syscons, it's > config options are named SC_* and the device is named sc. The spec is wrong for dictating what any implementation must call this, the spec does not own the implementation name space. It is called called syscons and uses the variables and driver names sc beacuse that is what we did back in the 90's, drivers typically had 2 character names. > The only valuable remark in this thread is bde's one saying it's not > documented etc ... and yes we do sucks in this area in the arm world. Thank you for your dismissal of input from the community, does that mean your gong to ignore them? > Anyhow, I caught a discussion between mmel@ and kevans@ on IRC saying > that we will move the driver into extres after adding some standard > stuff common to extres framework. FYI why is this so bad an idea to call it syscons: man syscons How do you plan to resolve that name space conflict? AND this man page has existed since 1.0, So 25 years of finger memory, your just not gona do well trying to change that. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Dec 12 15:58:34 2017 Return-Path: Delivered-To: svn-src-all@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 F27B0E9CFAB; Tue, 12 Dec 2017 15:58:34 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 800723AD9; Tue, 12 Dec 2017 15:58:32 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id c680103d; Tue, 12 Dec 2017 16:58:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=MB3TCp7kO0vNYkIpaQt58McrKu0=; b=ENW9ZAi1XIClquK2C9bL/YyVXl8C EIsnkpcOrLQeu9ZR4bk6hsZP1h6zdkUvUa3bxaEcjh5yQe5K3yHSZ604zDCK+qBW wuXFc8ZOqM2RVx3pb4vq6tdHlSDEA6OOnkX4v1AFa3pogNz93O0645fCTHcCtxoC nMCjSo4ZUdck+v0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=lE/4n3ODcxnGfClaucOYCbjstiA+XiHlcCEnH4uNbxtOJhyW4/JfHJNh TFRjzreZ6wCL+mMicX4oC9LOEahtpVbtjjiY6S5zUuOYUAzCRtnlibr6L0rWMqjD C4T+LGcdDltfx3li2CbFThQ/MYqN/MZ0WjgFsOkijyl7KpeK7To= Received: from arcadia (evadot.gandi.net [217.70.181.36]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 2e82c1ad TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 12 Dec 2017 16:58:29 +0100 (CET) Date: Tue, 12 Dec 2017 16:58:28 +0100 From: Emmanuel Vadot To: rgrimes@freebsd.org Cc: "Rodney W. Grimes" , Alexey Dokuchaev , Nathan Whitehorn , Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon Message-Id: <20171212165828.e9a0eb263cc4dca94d0d6ca9@bidouilliste.com> In-Reply-To: <201712121540.vBCFeLFZ086830@pdx.rh.CN85.dnsmgr.net> References: <20171212100008.4c44fcf78714d5a159937b99@bidouilliste.com> <201712121540.vBCFeLFZ086830@pdx.rh.CN85.dnsmgr.net> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 15:58:35 -0000 On Tue, 12 Dec 2017 07:40:21 -0800 (PST) "Rodney W. Grimes" wrote: > > On Tue, 12 Dec 2017 06:18:36 +0000 > > Alexey Dokuchaev wrote: > > > > > On Mon, Dec 11, 2017 at 10:14:04AM -0800, Nathan Whitehorn wrote: > > > > I think this name might confuse people looking for "syscons". Can it be > > > > renamed? Also, if it is ARM-specific, maybe it belongs in sys/arm? > > > > > > +1 for rename, it's very confusing now. > > ++1 rename it or expect irrate users So where exactly in the confusion ? Is it because your tab completion when doing cd sys/dev/sysc will now ask you to type more char ? This is the only place where "syscons" (not syscon) exists. > > > > > > ./danfe > > > > It's not confusing. The spec is clear it's named "syscon" so our > > driver must be named syscon, naming it otherwise would be confusing. > > What's confusing is the directory name for "sc" named syscons, it's > > config options are named SC_* and the device is named sc. > > The spec is wrong for dictating what any implementation must > call this, the spec does not own the implementation name space. > > It is called called syscons and uses the variables and driver > names sc beacuse that is what we did back in the 90's, drivers > typically had 2 character names. > > > The only valuable remark in this thread is bde's one saying it's not > > documented etc ... and yes we do sucks in this area in the arm world. > > Thank you for your dismissal of input from the community, does that > mean your gong to ignore them? > > > Anyhow, I caught a discussion between mmel@ and kevans@ on IRC saying > > that we will move the driver into extres after adding some standard > > stuff common to extres framework. > > FYI why is this so bad an idea to call it syscons: > man syscons > How do you plan to resolve that name space conflict? > AND this man page has existed since 1.0, So 25 years of > finger memory, your just not gona do well trying to change that. The new driver name is "syscon" not "syscons", there is no name space conflict. Again, we will move it to sys/dev/extres, now can we stop whining about small details like that and do some actual work please ? -- Emmanuel Vadot From owner-svn-src-all@freebsd.org Tue Dec 12 16:08:53 2017 Return-Path: Delivered-To: svn-src-all@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 EFDF0E9D5D5 for ; Tue, 12 Dec 2017 16:08:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (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 B0076637F1 for ; Tue, 12 Dec 2017 16:08:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x243.google.com with SMTP id 68so25440111ite.4 for ; Tue, 12 Dec 2017 08:08:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=vjzCsHqPpZpc5Nleba3FO2G+4nRfypzGwiQCTFkZwLg=; b=HhfG+xvCJ+KChrjjz/oDjYHeXTA+BFg86VzJPOktkqUuMN7cAaNCkDc9RFhuduiZDp eS6NWyPwQjTwIElbtvRNxlWT/7baX7BQ3QVYUTrVtLTBnSAtx7kFUHTqJRaJBJeWI3yb IMDuPVxP0Bq+YUVTeumNNAtI1nRm7t2O0x0ePx6TLEXwyjUKgVR6lbw59hbJllppgpaX tr8YQOlO7yoro/BDEJbBxv58afHhy/Cn4HjsH1qiRZ6O/SMhkxsCM9YmGpgWuJkgFHhr Tbm49Q23AtR1zL2lqvldoVqHzwrawI+aJ14b5w5TnuaI6KftJMxDtYlbQ8bSqCrr6qN3 i0ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=vjzCsHqPpZpc5Nleba3FO2G+4nRfypzGwiQCTFkZwLg=; b=jpRh+G/h8O6FpszWKq2xGR5acftvvCuYR27iMwDVWxkNEYkxA9fgnV5dYwnjvrftbw bV/K9EWFGlgM5swmb7VFzP2ItRbp8OeurkXRSp5DchCUnFjwgbjRTeagMuSAQm87pbj6 EbqqTfYVh/oIrnwpBH5ogRm3fmRIP5nj0zpwafm4/SINr5wLB4WVqj7KOjkuy17iTqfl Ra6je47DN83ilXkdCwH5ZNJ+K01FuydL7qsG02jxLnkHBhSLdaWTgBJfzLrJ09+rsq1N vjfUHchd7AYpQwtKrIdw+VR8dopawnsDGCTmL7YpUyj0OPYXRfTiAUmmpx4pNrjoJGzv ewug== X-Gm-Message-State: AKGB3mJ7hzc1OeShysXIWDTJTF9gitMpmSQuxE7uo0oAhBjHVqkzsd8R Y5nlI9oqW+QuifHC7e3uBeOsfbXWrytoNssyBwjbPw== X-Google-Smtp-Source: ACJfBouSQwBA5efKuME/PA5t/h0zLZ2fZgIYkXRgHnV6BAtfnif6GR6v154KPL2X9wwJxqpr2oteSBfCBCgbPCzdT/Q= X-Received: by 10.107.30.81 with SMTP id e78mr5607402ioe.130.1513094932737; Tue, 12 Dec 2017 08:08:52 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Tue, 12 Dec 2017 08:08:52 -0800 (PST) X-Originating-IP: [12.227.204.186] In-Reply-To: <20171212165828.e9a0eb263cc4dca94d0d6ca9@bidouilliste.com> References: <20171212100008.4c44fcf78714d5a159937b99@bidouilliste.com> <201712121540.vBCFeLFZ086830@pdx.rh.CN85.dnsmgr.net> <20171212165828.e9a0eb263cc4dca94d0d6ca9@bidouilliste.com> From: Warner Losh Date: Tue, 12 Dec 2017 09:08:52 -0700 X-Google-Sender-Auth: frLnTzqNKssJq_iWWKeB5TtSdg4 Message-ID: Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon To: Emmanuel Vadot Cc: "Rodney W. Grimes" , "Rodney W. Grimes" , Alexey Dokuchaev , Nathan Whitehorn , Kyle Evans , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 16:08:54 -0000 On Tue, Dec 12, 2017 at 8:58 AM, Emmanuel Vadot wrote: > Again, we will move it to sys/dev/extres, now can we stop whining > about small details like that and do some actual work please ? while true; do echo +1 ; done You have no idea how demotivating chicken !$!% complaining about a name that's perfectly fine can be. Unless it causes and actual problem, don't complain. Things are named similar to other things all the time and we somehow cope when we discover they aren't exactly the same thing. This whole conversation is the very definition of a bike shed: criticism about one minor detail on trumped up reasons by people that did none of the work. Warner From owner-svn-src-all@freebsd.org Tue Dec 12 16:12:53 2017 Return-Path: Delivered-To: svn-src-all@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 8E8A3E9D9E6; Tue, 12 Dec 2017 16:12:53 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2383363E26; Tue, 12 Dec 2017 16:12:52 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBCGCl0A017260 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2017 17:12:47 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: cem@FreeBSD.org Received: from [10.58.0.4] (dadv@[10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBCGChLn042657 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 12 Dec 2017 23:12:43 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: rgrimes@FreeBSD.org, Don Lewis References: <201712121530.vBCFUU2G086785@pdx.rh.CN85.dnsmgr.net> Cc: Alexey Dokuchaev , Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Conrad Meyer From: Eugene Grosbein Message-ID: <5A2FFFFB.4030501@grosbein.net> Date: Tue, 12 Dec 2017 23:12:43 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201712121530.vBCFUU2G086785@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 16:12:53 -0000 12.12.2017 22:30, Rodney W. Grimes: >>> Now I run FreeBSD 11/i386 as my home router with IPSEC and torrent >>> client, and I run several virtualized routers with IPSEC tunnels, >>> jabber and mail server, squid and ZFS for src/obj/ports compression >>> and they all easily crash unless kern.kstack_pages raised upto 4. Same >>> for some other my i386 installations having IPSEC tunnels. >> >> IPSEC definitely used to wwith with kstack_pages=2 since I ran that way >> for a number of years. I haven't used IPSEC since I upgraded from >> FreeBSD 8.x to 10.x a while back, so it could be broken now. > > I think this comes as a regression in 10.x or perhaps later. So that > atleast narrows down what has triggered the need for more kernel stack > space. Once again, that's not about IPSEC only that, indeed, had this kind of "regression" with overhaul of its code between 11.0 and 11.1 releases with r315514. It was already polished in stable/11 with later r319118 plus there is https://reviews.freebsd.org/D9721 that introduces new sysctl net.inet.ipsec.use_netisr=1 to convert long path of direct function calls requiring large stack to queuing of outgoing to-be-encrypted traffic using NETISR at cost of some performance penalty when enabled. But many other parts of kernel think it's OK to allocate big arrays or structures on stack. From owner-svn-src-all@freebsd.org Tue Dec 12 16:30:20 2017 Return-Path: Delivered-To: svn-src-all@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 DE242E9E28F for ; Tue, 12 Dec 2017 16:30:20 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAA58648DD for ; Tue, 12 Dec 2017 16:30:20 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: ba804217-df59-11e7-93a5-cd02e7dc7692 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id ba804217-df59-11e7-93a5-cd02e7dc7692; Tue, 12 Dec 2017 16:30:13 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id vBCGUHTZ001438; Tue, 12 Dec 2017 09:30:17 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1513096217.5897.52.camel@freebsd.org> Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon From: Ian Lepore To: rgrimes@freebsd.org, Emmanuel Vadot Cc: Alexey Dokuchaev , Nathan Whitehorn , Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 12 Dec 2017 09:30:17 -0700 In-Reply-To: <201712121540.vBCFeLFZ086830@pdx.rh.CN85.dnsmgr.net> References: <201712121540.vBCFeLFZ086830@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 16:30:21 -0000 On Tue, 2017-12-12 at 07:40 -0800, Rodney W. Grimes wrote: > > > > On Tue, 12 Dec 2017 06:18:36 +0000 > > Alexey Dokuchaev wrote: > > > > > > > > On Mon, Dec 11, 2017 at 10:14:04AM -0800, Nathan Whitehorn wrote: > > > > > > > > I think this name might confuse people looking for "syscons". Can it be > > > > renamed? Also, if it is ARM-specific, maybe it belongs in sys/arm? > > > +1 for rename, it's very confusing now. > ++1 rename it or expect irrate users > > > > > > > > > > > > ./danfe > >  It's not confusing. The spec is clear it's named "syscon" so our > > driver must be named syscon, naming it otherwise would be confusing. > >  What's confusing is the directory name for "sc" named syscons, it's > > config options are named SC_* and the device is named sc. > The spec is wrong for dictating what any implementation must > call this, the spec does not own the implementation name space. > > It is called called syscons and uses the variables and driver > names sc beacuse that is what we did back in the 90's, drivers > typically had 2 character names. > > > > >  The only valuable remark in this thread is bde's one saying it's not > > documented etc ... and yes we do sucks in this area in the arm world. > Thank you for your dismissal of input from the community, does that > mean your gong to ignore them? > > > > >  Anyhow, I caught a discussion between mmel@ and kevans@ on IRC saying > > that we will move the driver into extres after adding some standard > > stuff common to extres framework. > FYI why is this so bad an idea to call it syscons: > man syscons > How do you plan to resolve that name space conflict? > AND this man page has existed since 1.0,  So 25 years of > finger memory, your just not gona do well trying to change that. > > So a driver named "syscon" that implements the FDT device named "syscon" is somehow a bad idea because it differs from an existing driver directory name by only one character, but you're not bothered by alc/ale, or bce/bfe/bge, or iwi/iwn, or mlx/mly, or any other of the literally dozens of existing drivers whose directory names differ by only 1 character. In addition you defend naming options related to "syscons" as "sc" because 25 years ago, "drivers typically have 2-character names", and I guess that fact magically connects "device sc" to "dev/syscons" in peoples' minds, because... phase of the moon, or what??? This whole discussion feels like it was scripted by Salvador Dali and produced by David Lynch. -- Ian From owner-svn-src-all@freebsd.org Tue Dec 12 17:01:43 2017 Return-Path: Delivered-To: svn-src-all@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 BE805E9F037; Tue, 12 Dec 2017 17:01:43 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 425926594F; Tue, 12 Dec 2017 17:01:42 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBCH15kd087154; Tue, 12 Dec 2017 09:01:05 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBCH153d087153; Tue, 12 Dec 2017 09:01:05 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712121701.vBCH153d087153@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326758 - in head/sys/i386: conf include In-Reply-To: <5A2FFFFB.4030501@grosbein.net> To: Eugene Grosbein Date: Tue, 12 Dec 2017 09:01:05 -0800 (PST) CC: rgrimes@freebsd.org, Don Lewis , Alexey Dokuchaev , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 17:01:43 -0000 [ Charset windows-1252 unsupported, converting... ] > 12.12.2017 22:30, Rodney W. Grimes: > > >>> Now I run FreeBSD 11/i386 as my home router with IPSEC and torrent > >>> client, and I run several virtualized routers with IPSEC tunnels, > >>> jabber and mail server, squid and ZFS for src/obj/ports compression > >>> and they all easily crash unless kern.kstack_pages raised upto 4. Same > >>> for some other my i386 installations having IPSEC tunnels. > >> > >> IPSEC definitely used to wwith with kstack_pages=2 since I ran that way > >> for a number of years. I haven't used IPSEC since I upgraded from > >> FreeBSD 8.x to 10.x a while back, so it could be broken now. > > > > I think this comes as a regression in 10.x or perhaps later. So that > > atleast narrows down what has triggered the need for more kernel stack > > space. > > Once again, that's not about IPSEC only that, indeed, had this kind of "regression" I didnt mean to make it sound like it was IPSEC only, I simply meant to say that in general we have a kstack use regression that appears to have started after 10.x. I hope this clarifies my point. > with overhaul of its code between 11.0 and 11.1 releases with r315514. > It was already polished in stable/11 with later r319118 plus there is > https://reviews.freebsd.org/D9721 that introduces new > sysctl net.inet.ipsec.use_netisr=1 > to convert long path of direct function calls requiring large stack to > queuing of outgoing to-be-encrypted traffic using NETISR > at cost of some performance penalty when enabled. > > But many other parts of kernel think it's OK to allocate big arrays or > structures on stack. We should probably start looking for those, something someone who is offerring help but doesnt know what they might be good at, but can read C code. They could be utililized t simply scan through the code looking for this type of thing and bring it to the attention of a area of expertise commiter. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Dec 12 17:05:40 2017 Return-Path: Delivered-To: svn-src-all@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 2134CE9F1A0; Tue, 12 Dec 2017 17:05:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3FA865C2A; Tue, 12 Dec 2017 17:05:39 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBCH5cls087174; Tue, 12 Dec 2017 09:05:38 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBCH5bHb087173; Tue, 12 Dec 2017 09:05:37 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712121705.vBCH5bHb087173@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon In-Reply-To: <20171212165828.e9a0eb263cc4dca94d0d6ca9@bidouilliste.com> To: Emmanuel Vadot Date: Tue, 12 Dec 2017 09:05:37 -0800 (PST) CC: rgrimes@freebsd.org, Alexey Dokuchaev , Nathan Whitehorn , Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 17:05:40 -0000 > On Tue, 12 Dec 2017 07:40:21 -0800 (PST) > "Rodney W. Grimes" wrote: > > > > On Tue, 12 Dec 2017 06:18:36 +0000 > > > Alexey Dokuchaev wrote: > > > > > > > On Mon, Dec 11, 2017 at 10:14:04AM -0800, Nathan Whitehorn wrote: > > > > > I think this name might confuse people looking for "syscons". Can it be > > > > > renamed? Also, if it is ARM-specific, maybe it belongs in sys/arm? > > > > > > > > +1 for rename, it's very confusing now. > > > > ++1 rename it or expect irrate users > > So where exactly in the confusion ? > > Is it because your tab completion when doing cd sys/dev/sysc will > now ask you to type more char ? > This is the only place where "syscons" (not syscon) exists. My appologies, I did not notice that there infact is a delta of syscon vs syscons. I thought that the name was an exact match. I still not real happy with it, but my objection is retracted. > > > > > > > > ./danfe > > > > > > It's not confusing. The spec is clear it's named "syscon" so our > > > driver must be named syscon, naming it otherwise would be confusing. > > > What's confusing is the directory name for "sc" named syscons, it's > > > config options are named SC_* and the device is named sc. > > > > The spec is wrong for dictating what any implementation must > > call this, the spec does not own the implementation name space. > > > > It is called called syscons and uses the variables and driver > > names sc beacuse that is what we did back in the 90's, drivers > > typically had 2 character names. > > > > > The only valuable remark in this thread is bde's one saying it's not > > > documented etc ... and yes we do sucks in this area in the arm world. > > > > Thank you for your dismissal of input from the community, does that > > mean your gong to ignore them? > > > > > Anyhow, I caught a discussion between mmel@ and kevans@ on IRC saying > > > that we will move the driver into extres after adding some standard > > > stuff common to extres framework. > > > > FYI why is this so bad an idea to call it syscons: > > man syscons > > How do you plan to resolve that name space conflict? > > AND this man page has existed since 1.0, So 25 years of > > finger memory, your just not gona do well trying to change that. > > The new driver name is "syscon" not "syscons", there is no name space > conflict. Again, I am sorry, I did not notice this and thought we had a direct conflict. > > Again, we will move it to sys/dev/extres, now can we stop whining > about small details like that and do some actual work please ? I am glad it is moving, but that was never the reason that someone raised issue. Please stop dismissing concerns, especially if raised by more than one person, as whining, that is not helpful. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Dec 12 17:10:53 2017 Return-Path: Delivered-To: svn-src-all@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 030ADE9F3EC for ; Tue, 12 Dec 2017 17:10:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::235]) (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 B78C365FBA for ; Tue, 12 Dec 2017 17:10:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x235.google.com with SMTP id f190so25909455ita.5 for ; Tue, 12 Dec 2017 09:10:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4Vo9YoRc8a6FsoUsBQnPwusLGL6gl8RgNjqnvyp2JaE=; b=EI3iuh/qAfC7vXKHklMZ3UsNAXRSx4IqXZPP+z1wyVO1BloZdDVkKTTDQhlQgeztFK u+6dqY8SOl4kjF7tiHCXOJASOssrLTLRSDJydJMqRvlSb2dYmzpPZbrmP02TPMdWxdPx TTB7untUVkij5Yp0GM6cl+/yPy6tOhDioIIXYAgWbhvGuLzyyQdJPdMQYP8o/e4HG/uH NWJ/HbjKDXZA6tnjDtTk1+lYAKcHwYJlHxljQIGLwGDwgAjCD3HVduueas171y+qZKbU n7k3bSxXy94DbOUM+h+Zlm7M3VALxVrhiVBG5sHKKpGOM0wHczg5du3xDia/6seKYlAl tHug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=4Vo9YoRc8a6FsoUsBQnPwusLGL6gl8RgNjqnvyp2JaE=; b=GY/VCndNYWSP7zotUf/loZpoTD08HRsXUDiwyCQb6JVkaeNn/ieN3Jm6DZzmcE2DxB RxyNPjJRxpveVsoiQvwREhOFXlO/ZfejBg0jZgTRULTmC2p/oaHG9/7eK26wAA+51DuM IJOdidD4j6s19ZbnWGmCSZL3keoZaHCWS07UEG3iTa4e15HWGRsqezf0Y9p1qGvhBhaG 3z1O2caI+6xK9KX0XnXT+A2U2DH2JlQyqcZnmr3A+VGkIU4o18Esbh2jdEMQV7d6drOr wVQsHMqrFIDld9Wd9Kgcxsm9bXEiVgbi9pWYow648cU4FfcyLMvLFu8ZfqtRAi1HeGqw W1Rg== X-Gm-Message-State: AKGB3mKAMBLjVFl/VY5+SD+pJ4AmiIeP+0EoaZqLxRgdB1UUvznvJjKH FKTTK0bCNKK8LNBRHEYx5Z/5NY8756IBxg0zlZcNkA== X-Google-Smtp-Source: ACJfBovAqGHWhd5CDxg9bogppvanxJj94c3QvHi03/oVV2AK+X7kbhHtXphbTKcqS/JlvbWmZbBLAAtMrvltFML3S8k= X-Received: by 10.36.77.143 with SMTP id l137mr386486itb.50.1513098651897; Tue, 12 Dec 2017 09:10:51 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Tue, 12 Dec 2017 09:10:51 -0800 (PST) X-Originating-IP: [12.227.204.186] In-Reply-To: <201712121705.vBCH5bHb087173@pdx.rh.CN85.dnsmgr.net> References: <20171212165828.e9a0eb263cc4dca94d0d6ca9@bidouilliste.com> <201712121705.vBCH5bHb087173@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Tue, 12 Dec 2017 10:10:51 -0700 X-Google-Sender-Auth: pUzJEBH-5ak_FsSJqKu8vHldKEY Message-ID: Subject: Re: svn commit: r326773 - in head/sys: conf dev/syscon To: "Rodney W. Grimes" Cc: Emmanuel Vadot , Alexey Dokuchaev , Nathan Whitehorn , Kyle Evans , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 17:10:53 -0000 On Tue, Dec 12, 2017 at 10:05 AM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > Please stop dismissing concerns, especially if raised by more > than one person, as whining, that is not helpful. > Except in this case it was totally useless. Totally. It was an emotional reaction devoid of actual technical merit. Therefore, it's whining. Warner From owner-svn-src-all@freebsd.org Tue Dec 12 17:11:08 2017 Return-Path: Delivered-To: svn-src-all@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 04FA9E9F424; Tue, 12 Dec 2017 17:11:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2CD9E6611A; Tue, 12 Dec 2017 17:11:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 96E3F11153; Tue, 12 Dec 2017 17:11:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Tue, 12 Dec 2017 17:11:01 +0000 From: Glen Barber To: Michael Tuexen Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r324686 - stable/11/sys/netinet Message-ID: <20171212171101.GM17600@FreeBSD.org> References: <201710171242.v9HCgHG4030707@repo.freebsd.org> <20171203133946.GJ2272@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="W4pDZ/VvazBYHhxQ" Content-Disposition: inline In-Reply-To: <20171203133946.GJ2272@kib.kiev.ua> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 17:11:08 -0000 --W4pDZ/VvazBYHhxQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 03, 2017 at 03:39:46PM +0200, Konstantin Belousov wrote: > On Tue, Oct 17, 2017 at 12:42:17PM +0000, Michael Tuexen wrote: > > Author: tuexen > > Date: Tue Oct 17 12:42:17 2017 > > New Revision: 324686 > > URL: https://svnweb.freebsd.org/changeset/base/324686 > >=20 > > Log: > > MFC r322648: > > =20 > > Ensure inp_vflag is consistently set for TCP endpoints. > > =20 > > Make sure that the flags INP_IPV4 and INP_IPV6 are consistently set > > for inpcbs used for TCP sockets, no matter if the setting is derived > > from the net.inet6.ip6.v6only sysctl or the IPV6_V6ONLY socket option. > > For UDP this was already done right. > > =20 > > PR: 221385 > >=20 > > Modified: > > stable/11/sys/netinet/tcp_usrreq.c > > Directory Properties: > > stable/11/ (props changed) > >=20 > > Modified: stable/11/sys/netinet/tcp_usrreq.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- stable/11/sys/netinet/tcp_usrreq.c Tue Oct 17 11:20:32 2017 (r32468= 5) > > +++ stable/11/sys/netinet/tcp_usrreq.c Tue Oct 17 12:42:17 2017 (r32468= 6) > > @@ -1899,6 +1899,8 @@ tcp_attach(struct socket *so) > > #ifdef INET6 > > if (inp->inp_vflag & INP_IPV6PROTO) { > > inp->inp_vflag |=3D INP_IPV6; > > + if ((inp->inp_flags & IN6P_IPV6_V6ONLY) =3D=3D 0) > > + inp->inp_vflag |=3D INP_IPV4; > > inp->in6p_hops =3D -1; /* use kernel default */ > > } > > else >=20 > I highly suspect that this commit causes the breakage. Example is taken > from the 'nestat -f inet6 -n' output, but in fact the problem is much > more serious, e.g. squid acls are broken as well: > tcp6 0 0 2001:470:1f14:13.23047 2a03:2880:f003:c.443 ESTABLI= SHED > tcp46 0 0 0.0.0.1.22 69.223.183.85.58766 ESTABLI= SHED >=20 > The tcp46 and 0.0.0.1 values in the second line are clearly nonsensical. >=20 Hi Michael, Following up on this, as there has been no reply from you. Glen --W4pDZ/VvazBYHhxQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAlowDaUACgkQAxRYpUeP 4pMt8w//YS0kijGEY7ngu6Bvy9A3F0LRepy7vzl2f5HW+so30qX/g6D1K3OqBMnH i/YbaIF5ts8/+PqMTt3ImwP103LIlVl9RbJtJftHE9hnyfmMtWWz1IOvjRtqU4Iz OkkgbtMRYoCyG1HMSH8o0UJ2Lf1usyWYVgAAHfIXhnKN9h3uZ1jfKUjPdhehzKY7 EAXERJ4ab4DWHGS0/f+HXkRLQurSmY4gdW+d9Irl4LsmjHy5iU+lyIcW0l909CAe s9y1ElIxmrzTE8pkz5bestdwPHokxGEfDXM3ZzkfZS/QdM9g4U+Hzf98QKl12bfS Rsx3AAmZ1Pfy68cE1hHBOn3kM2riUlUXpenlWjVWwBl7lK8ono4HEl+idi8TKZlq 10loWmlk16vH9mn51CK2gPnZKteWLk5DolaSqBNl2QXFr4tn31iysoBYgHXG/cko HFksdOWsdRJUwVorvMCPBZaOeisCmZ6bGVi9cmk782/bnvz3ReL6MfKGroXpV6Vc rKmlCi7Fu6cpk9ry5khGJ4eEtkhs49kdWaF5sP9mLzMh+nFMbGzQS6EUYt3PiSYC GuhSrspVIKHLt2he2I3NRIPY94FXWecN4x7IVHmpy9xK/+Lij02h3J1ZggD4shij HI7zdKHvH7HnqAFXPt2vzpcQjzfFXorLIZS0493u2zbaoUXp9bQ= =Ongh -----END PGP SIGNATURE----- --W4pDZ/VvazBYHhxQ-- From owner-svn-src-all@freebsd.org Tue Dec 12 17:24:31 2017 Return-Path: Delivered-To: svn-src-all@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 CB4B0E9FA9A; Tue, 12 Dec 2017 17:24:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95A2F66AE3; Tue, 12 Dec 2017 17:24:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCHOUpK074606; Tue, 12 Dec 2017 17:24:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCHOUp9074605; Tue, 12 Dec 2017 17:24:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712121724.vBCHOUp9074605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 12 Dec 2017 17:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326796 - head/sys/geom/mirror X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/geom/mirror X-SVN-Commit-Revision: 326796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 17:24:31 -0000 Author: markj Date: Tue Dec 12 17:24:30 2017 New Revision: 326796 URL: https://svnweb.freebsd.org/changeset/base/326796 Log: Decrement sc_writes when BIO_DELETE requests complete. Otherwise a gmirror that has received a BIO_DELETE request will never be marked clean (unless sc_writes overflows). MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Tue Dec 12 12:59:04 2017 (r326795) +++ head/sys/geom/mirror/g_mirror.c Tue Dec 12 17:24:30 2017 (r326796) @@ -937,7 +937,7 @@ g_mirror_regular_request(struct bio *bp) pbp = bp->bio_parent; sc = pbp->bio_to->private; bp->bio_from->index--; - if (bp->bio_cmd == BIO_WRITE) + if (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_DELETE) sc->sc_writes--; disk = bp->bio_from->private; if (disk == NULL) { From owner-svn-src-all@freebsd.org Tue Dec 12 17:25:27 2017 Return-Path: Delivered-To: svn-src-all@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 18450E9FB1B; Tue, 12 Dec 2017 17:25:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8BD266C4D; Tue, 12 Dec 2017 17:25:26 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCHPPPi074687; Tue, 12 Dec 2017 17:25:25 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCHPPLj074686; Tue, 12 Dec 2017 17:25:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712121725.vBCHPPLj074686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 12 Dec 2017 17:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326797 - head/sys/geom/mirror X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/geom/mirror X-SVN-Commit-Revision: 326797 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 17:25:27 -0000 Author: markj Date: Tue Dec 12 17:25:25 2017 New Revision: 326797 URL: https://svnweb.freebsd.org/changeset/base/326797 Log: Give g_mirror_event_get() a more accurate name. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Tue Dec 12 17:24:30 2017 (r326796) +++ head/sys/geom/mirror/g_mirror.c Tue Dec 12 17:25:25 2017 (r326797) @@ -219,7 +219,7 @@ g_mirror_event_send(void *arg, int state, int flags) } static struct g_mirror_event * -g_mirror_event_get(struct g_mirror_softc *sc) +g_mirror_event_first(struct g_mirror_softc *sc) { struct g_mirror_event *ep; @@ -555,7 +555,7 @@ g_mirror_destroy_device(struct g_mirror_softc *sc) g_mirror_update_metadata(disk); g_mirror_destroy_disk(disk); } - while ((ep = g_mirror_event_get(sc)) != NULL) { + while ((ep = g_mirror_event_first(sc)) != NULL) { g_mirror_event_remove(sc, ep); if ((ep->e_flags & G_MIRROR_EVENT_DONTWAIT) != 0) g_mirror_event_free(ep); @@ -1877,7 +1877,7 @@ g_mirror_worker(void *arg) * First take a look at events. * This is important to handle events before any I/O requests. */ - ep = g_mirror_event_get(sc); + ep = g_mirror_event_first(sc); if (ep != NULL) { g_mirror_event_remove(sc, ep); if ((ep->e_flags & G_MIRROR_EVENT_DEVICE) != 0) { From owner-svn-src-all@freebsd.org Tue Dec 12 17:25:55 2017 Return-Path: Delivered-To: svn-src-all@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 84699E9FB70; Tue, 12 Dec 2017 17:25:55 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) (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 118F066DA3; Tue, 12 Dec 2017 17:25:54 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f45.google.com with SMTP id f20so24092905lfe.3; Tue, 12 Dec 2017 09:25:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UF0GyTHulBjHCz7PbpXmWLu7EFMfFxqQG4JEIyw4wxU=; b=CciA7knPIGM1paF2pzJowCBbTL5/rVIegfgTc6C7UDSe7y/QoOlPfMojjpREoiFyyo lCg2Vc2+jFTnevZwrarjEIPdTQaUe/npjj1hjslyQczR3xJZSloTTsZXfcMzxwlcm8zC reR1GXLzOpaQQAWQdmb3lTKQi9yeQJgY1LOzWFhOhp1NrkJvfN8PhE5G7FqLO8vxt1Jc 6DnVIhtqfOzLp7t1oR1GAy+Tw0PNOiQmUJ9xltIs6k7S8kTtkGhZGMOiX4td2lIDOkdw CNR62s5PNcZDRnAbi93tUhCMteqju/MwXc1LEU5vR/sRcuZdFVhNxjVgoJ3YvraO3UsW H8FA== X-Gm-Message-State: AKGB3mLG5L/L10o4XZWtTHBTDf7lkYUNh4PROXwaxhC0ERHkYkCiuX25 GIkB75v3Urywj+nAoLLxhu9je1oIIVc= X-Google-Smtp-Source: ACJfBosExh9UefQd9if/w7q+pQSjPuiiTxaJ9ossKi12qRzkL3MOxHBSmhFI3aH1r8YDAbuN8w7gCw== X-Received: by 10.46.68.11 with SMTP id r11mr2496928lja.1.1513099552128; Tue, 12 Dec 2017 09:25:52 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id 27sm3287379ljw.94.2017.12.12.09.25.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 09:25:51 -0800 (PST) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: rgrimes@freebsd.org, Eugene Grosbein Cc: Don Lewis , Alexey Dokuchaev , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer References: <201712121701.vBCH153d087153@pdx.rh.CN85.dnsmgr.net> From: Andriy Gapon Message-ID: <9484a39c-21f1-9174-11ce-54088c3f6099@FreeBSD.org> Date: Tue, 12 Dec 2017 19:25:49 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <201712121701.vBCH153d087153@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 17:25:55 -0000 On 12/12/2017 19:01, Rodney W. Grimes wrote: > We should probably start looking for those, something someone who is > offerring help but doesnt know what they might be good at, but can > read C code. They could be utililized t simply scan through the > code looking for this type of thing and bring it to the attention > of a area of expertise commiter. By the way, there are tools that can analyze binary code (e.g. a kernel binary or a module) and determine stack requirements of each function. I think that debug symbols might be required too. I am not sure if there are tools that can analyze stack requirements for possible call chains rather than individual functions. -- Andriy Gapon From owner-svn-src-all@freebsd.org Tue Dec 12 17:29:36 2017 Return-Path: Delivered-To: svn-src-all@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 31456E9FE67; Tue, 12 Dec 2017 17:29:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F284867209; Tue, 12 Dec 2017 17:29:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCHTZaH075016; Tue, 12 Dec 2017 17:29:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCHTZdV075014; Tue, 12 Dec 2017 17:29:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712121729.vBCHTZdV075014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 12 Dec 2017 17:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326798 - head/sys/geom/mirror X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/geom/mirror X-SVN-Commit-Revision: 326798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 17:29:36 -0000 Author: markj Date: Tue Dec 12 17:29:34 2017 New Revision: 326798 URL: https://svnweb.freebsd.org/changeset/base/326798 Log: Address a possible lost wakeup for gmirror events. g_mirror_event_send() acquires the I/O queue lock to deliver a wakeup to the worker thread, and this is done after enqueuing the event. So it's sufficient to check the event queue before atomically releasing the queue lock and going to sleep. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Tue Dec 12 17:25:25 2017 (r326797) +++ head/sys/geom/mirror/g_mirror.c Tue Dec 12 17:29:34 2017 (r326798) @@ -1945,16 +1945,9 @@ g_mirror_worker(void *arg) continue; } } + if (g_mirror_event_first(sc) != NULL) + continue; sx_xunlock(&sc->sc_lock); - /* - * XXX: We can miss an event here, because an event - * can be added without sx-device-lock and without - * mtx-queue-lock. Maybe I should just stop using - * dedicated mutex for events synchronization and - * stick with the queue lock? - * The event will hang here until next I/O request - * or next event is received. - */ MSLEEP(sc, &sc->sc_queue_mtx, PRIBIO | PDROP, "m:w1", timeout * hz); sx_xlock(&sc->sc_lock); From owner-svn-src-all@freebsd.org Tue Dec 12 17:34:37 2017 Return-Path: Delivered-To: svn-src-all@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 5E786EA01C8; Tue, 12 Dec 2017 17:34:37 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26E50679F1; Tue, 12 Dec 2017 17:34:37 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCHYaKo079294; Tue, 12 Dec 2017 17:34:36 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCHYaJq079293; Tue, 12 Dec 2017 17:34:36 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712121734.vBCHYaJq079293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 12 Dec 2017 17:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326799 - head/contrib/less X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/contrib/less X-SVN-Commit-Revision: 326799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 17:34:37 -0000 Author: asomers Date: Tue Dec 12 17:34:35 2017 New Revision: 326799 URL: https://svnweb.freebsd.org/changeset/base/326799 Log: less(1): diff reduction vs upstream No functional change. MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/contrib/less/main.c Modified: head/contrib/less/main.c ============================================================================== --- head/contrib/less/main.c Tue Dec 12 17:29:34 2017 (r326798) +++ head/contrib/less/main.c Tue Dec 12 17:34:35 2017 (r326799) @@ -73,7 +73,6 @@ main(argc, argv) { IFILE ifile; char *s; - extern char *__progname; #ifdef __EMX__ _response(&argc, &argv); From owner-svn-src-all@freebsd.org Tue Dec 12 19:03:45 2017 Return-Path: Delivered-To: svn-src-all@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 6028CE80468 for ; Tue, 12 Dec 2017 19:03:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (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 20DC56C331 for ; Tue, 12 Dec 2017 19:03:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x230.google.com with SMTP id r13so97815iod.2 for ; Tue, 12 Dec 2017 11:03:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=j0dAg8TRB6mkga1RgnhYG94wMBYJAKKnDd/Dh3YR3Kw=; b=oLNIpOr3B5iUqKHFihgkPZG4kBqR8DDRMetRzqyIP+ypJp1lxDIs7UBCmMMJipJmr4 qqaG1vmp7M88QoSWt1pKYPciKhYorV8ObQRIJhhwCcG4KgM2dCMP1UigkNhZUkuts4nU bnUq/gIG5xSTvpEhG4dhQn/Xhaz/DSJ4OAaG9f69Bc/MjY0qyKG1BxGuHgeftbndxCRl al+n4hvi0NNsLJUao0DUV6OUu79hrnuRbeU3aJPwweCOJ+KyAKYOR6rT9B4G0ipwNmwk OO+TJDibnAe5Kb7nwkNroUKUHn3e9ORnR2xqprFVszval9uvdO5AqL160Kp4Jy5IeEcz eMyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=j0dAg8TRB6mkga1RgnhYG94wMBYJAKKnDd/Dh3YR3Kw=; b=pdPoxFVP8j3Z024h/tHjqmTbbbir05+6xcNC/gKjeuQs6YVA06hEQQDjnl76OgreGL MNGr31emnL5ZHx+dFh8+68nA5WyJl6nNzc04N5DVF5ZUynqU5Rh+6+7AFZ+Z1SFANmLJ SqGXFZgu47YE3X3b8KfR7s99xyr0vFv4BeQKgtEIzHNhA15CYe6c6zLlyKdBF+kCedzG Uif3XreASfvkOaMCbzCqXhqTbaovI9f0YMPZ7yBfkmvjok2OHzRXpCB55P8EbSC+OXhO 4oeGQUu0EsjXq95EFkhUF7td3HjVdf7itDGUOFmy8EpBXCkI0W0ZmayRgvig2gZlCi3r Q2Qg== X-Gm-Message-State: AKGB3mIx7ELKuWrP0Z/TmcFtoYKUJBJstQm7C5EHxBte6oxpY50DY6+a 0cfqnFClJ1edrVpejD0gjzbRC5nTKL0TDVA2YeUP2g== X-Google-Smtp-Source: ACJfBovb1qSv1lxpRgTCU3gCam653S946VaPW1ZDdsEaXKaw970dBD2T1du6R9DNmkA0FuLXHPO1v45Xe8Zs5U4jN3k= X-Received: by 10.107.30.81 with SMTP id e78mr6299050ioe.130.1513105424306; Tue, 12 Dec 2017 11:03:44 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Tue, 12 Dec 2017 11:03:43 -0800 (PST) X-Originating-IP: [12.227.204.186] In-Reply-To: References: <201712120946.vBC9krNL075725@repo.freebsd.org> From: Warner Losh Date: Tue, 12 Dec 2017 12:03:43 -0700 X-Google-Sender-Auth: AF8mCw2IeF6gtRcsQRGhRnpeMjw Message-ID: Subject: Re: svn commit: r326792 - head/stand/uboot/common To: Antoine Brodin Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:03:45 -0000 The email I wrote here also sucks. It was unduly harsh. While the commit message should have been better, I was too harsh in trying to express this and giving a better example. Warner On Tue, Dec 12, 2017 at 5:49 AM, Warner Losh wrote: > This commit message sucks. Please use a more descriptive one in the future > like "catch up to change rXXXXX that remove the argument from interact." If > you want to be snarky, add 'pounty hat to imp' to it. Thats infornative. > Your message is utterly useless. It doesn't even say what arch is broken. > > Warner > > Warner > > On Dec 12, 2017 1:47 AM, "Antoine Brodin" wrote: > >> Author: antoine >> Date: Tue Dec 12 09:46:53 2017 >> New Revision: 326792 >> URL: https://svnweb.freebsd.org/changeset/base/326792 >> >> Log: >> Attempt to unbreak buildworld >> >> Modified: >> head/stand/uboot/common/main.c >> >> Modified: head/stand/uboot/common/main.c >> ============================================================ >> ================== >> --- head/stand/uboot/common/main.c Tue Dec 12 06:56:21 2017 >> (r326791) >> +++ head/stand/uboot/common/main.c Tue Dec 12 09:46:53 2017 >> (r326792) >> @@ -500,7 +500,7 @@ main(int argc, char **argv) >> archsw.arch_readin = uboot_readin; >> archsw.arch_autoload = uboot_autoload; >> >> - interact(NULL); /* doesn't return */ >> + interact(); /* doesn't return */ >> >> return (0); >> } >> >> From owner-svn-src-all@freebsd.org Tue Dec 12 19:13:43 2017 Return-Path: Delivered-To: svn-src-all@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 97A82E80B17; Tue, 12 Dec 2017 19:13:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qt0-x234.google.com (mail-qt0-x234.google.com [IPv6:2607:f8b0:400d:c0d::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 6CB7E6CE5F; Tue, 12 Dec 2017 19:13:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qt0-x234.google.com with SMTP id g10so49964647qtj.12; Tue, 12 Dec 2017 11:13:42 -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=k+xzv/q83955CNrZmAo1aDJjBZqBHpVl1CG9x2qtGS4=; b=UD3yrzclvma5vMXiELx6BcjIxy9NTbAXDVx4toMCA3wq7vqWAZ2H+vd3i/Uxbd2xfT Xd5urGOellyJ5lyM5zarNIpLuoymchus3uyAWok8bPxwxys/ba2BfQXzj3f5JsiEGJ2k O/7VBl1K8rq4AjvfpFPh2PjeBnE/Bwf0XuLs1328cwJBJ+hGkNYuhMEIHL9vOEboaD7G 5FQ+UtCkey5X6972lwUwSR1Jlp/Tgp5DA624VpKoJa7VYi0/xgdMUM1vBwg7PWdu70MP OqtqiPviUcaF7W/qkeKAIm+5UgukBaMVBTlkzG91QIYaW+UmBXWxGo38YwNWkIACwW7X P5vg== 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=k+xzv/q83955CNrZmAo1aDJjBZqBHpVl1CG9x2qtGS4=; b=VJ8tLhwEEDs5M4UTwuuchHQeaGbyI/T4avvLQEab+hAhB/XfdC9nF64i45N7Aujw15 kTuVUl3r0tn6Ck4E34w90OBvWur8sJ2FbZTPCStaj/oJMIknVX7eITB2YfmlbZdK0NIH GbE554AAMvMDWbFRViKVQ/tSy1ZnjUrK5SWZJejlCLci1WfEssuRvEeE7RVKMD0WNmL+ UXyotXjEo/EMi3z82RRmsqBNPDf30c/deeODVem2hDuMNL0uKHeoiBn0iGyM1Z5LOFQb 3V/ztzwLC4o2+3+08NCxDnGVMN5mOEswUB3omizRXdqvxdToMDdPB6DoFG0WC0eoUNkP G9Yg== X-Gm-Message-State: AKGB3mJpEdoRprAP25gpplTUc3u8JtWBwkI951E2t0IYliqJdUmr7yEr C7vIsirjdBOHxOsrbfn4lNJq3f5anwUmGO/n4H0= X-Google-Smtp-Source: ACJfBosFhDTJmoU+i6JBOBsl0kA42HlzTumDE2NqR1/YVXH1tR4OtTi2h5RO+6pEx5Chbs2Zz9pgS953b0o4+RR8mPk= X-Received: by 10.200.48.82 with SMTP id g18mr6716183qte.329.1513106020761; Tue, 12 Dec 2017 11:13:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.44.214 with HTTP; Tue, 12 Dec 2017 11:13:39 -0800 (PST) In-Reply-To: References: <201712120946.vBC9krNL075725@repo.freebsd.org> From: Mateusz Guzik Date: Tue, 12 Dec 2017 20:13:39 +0100 Message-ID: Subject: Re: svn commit: r326792 - head/stand/uboot/common To: Warner Losh Cc: Antoine Brodin , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:13:43 -0000 How about you both close one PR as a punishment and we pretend this did not happen. The thing to do was to reply to the offending commit or contact the committer on irc. Only in case of no timely response fixing on your own is the right thing to do. On Tue, Dec 12, 2017 at 8:03 PM, Warner Losh wrote: > The email I wrote here also sucks. It was unduly harsh. While the commit > message should have been better, I was too harsh in trying to express this > and giving a better example. > > Warner > > On Tue, Dec 12, 2017 at 5:49 AM, Warner Losh wrote: > > > This commit message sucks. Please use a more descriptive one in the > future > > like "catch up to change rXXXXX that remove the argument from interact." > If > > you want to be snarky, add 'pounty hat to imp' to it. Thats infornative. > > Your message is utterly useless. It doesn't even say what arch is broken. > > > > Warner > > > > Warner > > > > On Dec 12, 2017 1:47 AM, "Antoine Brodin" wrote: > > > >> Author: antoine > >> Date: Tue Dec 12 09:46:53 2017 > >> New Revision: 326792 > >> URL: https://svnweb.freebsd.org/changeset/base/326792 > >> > >> Log: > >> Attempt to unbreak buildworld > >> > >> Modified: > >> head/stand/uboot/common/main.c > >> > >> Modified: head/stand/uboot/common/main.c > >> ============================================================ > >> ================== > >> --- head/stand/uboot/common/main.c Tue Dec 12 06:56:21 2017 > >> (r326791) > >> +++ head/stand/uboot/common/main.c Tue Dec 12 09:46:53 2017 > >> (r326792) > >> @@ -500,7 +500,7 @@ main(int argc, char **argv) > >> archsw.arch_readin = uboot_readin; > >> archsw.arch_autoload = uboot_autoload; > >> > >> - interact(NULL); /* doesn't return */ > >> + interact(); /* doesn't return */ > >> > >> return (0); > >> } > >> > >> > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > -- Mateusz Guzik From owner-svn-src-all@freebsd.org Tue Dec 12 19:22:11 2017 Return-Path: Delivered-To: svn-src-all@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 B4C98E80FD6; Tue, 12 Dec 2017 19:22:11 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0287C6D51C; Tue, 12 Dec 2017 19:22:10 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBCJLxSE018558 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2017 20:21:59 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: cem@freebsd.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBCJLqjU095520; Wed, 13 Dec 2017 02:21:52 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: rgrimes@freebsd.org References: <201712121701.vBCH153d087153@pdx.rh.CN85.dnsmgr.net> Cc: Don Lewis , Alexey Dokuchaev , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer From: Eugene Grosbein Message-ID: <5A302C50.4000709@grosbein.net> Date: Wed, 13 Dec 2017 02:21:52 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <201712121701.vBCH153d087153@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:22:11 -0000 On 13.12.2017 00:01, Rodney W. Grimes wrote: >> But many other parts of kernel think it's OK to allocate big arrays or >> structures on stack. > > We should probably start looking for those, something someone who is > offerring help but doesnt know what they might be good at, but can > read C code. They could be utililized t simply scan through the > code looking for this type of thing and bring it to the attention > of a area of expertise commiter. These can be found with simple script: cd /usr/src make TARGET_ARCH=i386 KERNCONF=GENERIC buildkernel cd /usr/obj/i386.i386/home/src/sys/GENERIC for o in *.o do objdump -d $o | awk -vn=$o '/sub .*,%esp/ {split ($NF,a,/[,$]/); printf "%u %s %s\n", a[2], a[2], n}' done | sort -rn > top.sub head -50 top.sub | while read d h o do objdump -d $o | fgrep -B7 "$h,%esp" | awk -vo=$o -vd=$d '/>:$/ {print d, o, $2}' done > top2.sub Here is what do we get in top2.sub: 4328 in6_proto.o : 3312 in6_proto.o : 2232 sctp_pcb.o : 2208 xform_esp.o : 2176 ip6_output.o : 2092 ar9300_eeprom.o : 2080 kern_linker.o : 1696 md_ddf.o : 1664 cryptosoft.o : 1592 sctp_auth.o : 1420 zlib.o : 1416 ar9300_paprd.o : 1360 scsi_sa.o : 1352 scsi_da.o : 1344 nfs_nfsdport.o : 1328 vm_object.o : 1320 scsi_cd.o : 1312 scsi_enc_ses.o : 1312 fortuna.o : 1232 cam_periph.o : 1232 bt.o : 1224 zlib.o : 1192 cam_xpt.o : 1184 cam_xpt.o : 1184 ata_da.o : 1168 ata_da.o : 1160 sctp_output.o : 1160 cam_periph.o : 1152 nfs_nfsdserv.o : 1136 sctp_output.o : 1128 nfs_nfsdserv.o : 1088 rt2860.o : 1088 blkback.o : 1080 rt2860.o : 1080 pseudofs_vnops.o : 1072 cardbus_cis.o : ... First column is total stack usage of kernel function (decimal), second is module name and third contains function name it question. From owner-svn-src-all@freebsd.org Tue Dec 12 19:22:53 2017 Return-Path: Delivered-To: svn-src-all@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 A2B5DE81179 for ; Tue, 12 Dec 2017 19:22:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (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 5AD916D7CC for ; Tue, 12 Dec 2017 19:22:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22c.google.com with SMTP id r13so159064iod.2 for ; Tue, 12 Dec 2017 11:22:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cZYMYyG1g/b7V6MfaCnHNR9NWsxjvzRPde72umrEtuU=; b=kcC9f+bc2NB+wppq4snQpw2u8VzKDVpArlNhEIZq6hI1VHfzrB/7m7wkY6sjDzlrPa oaW7kuh/Kgl3Vp9NWh6Ctj/AGqRi/qYkOaQkfMDlOPs0MHul6i2vI5DcrkkawIa4esDn 6KxJpxpYYoVwa/EhGWB5lh+no06QV8E7mqIAzlFF0HTaictEBOr5ct44sW5MNxvH+YEg vh235Rw95SXcLF2fmpqjrsamd6Xj9YDTeu6SZQho8tuHEn9mOdjRsn7ZrSYpnT/9ataM 03baBSK9V+cd5rH40qbesSIoQF2XjK7tqQKsYtNzGzVR6kFawJ8PcrzEWlnX1PW4YMLK u+5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cZYMYyG1g/b7V6MfaCnHNR9NWsxjvzRPde72umrEtuU=; b=X2yk3xcAU9PykWnUJX3IA6CpHNG6/cU2MmgAFDwGvrUd/BPImfUr4EIsiOfDgTpv0z imf5NwX1Y65aUYOeh3HIqcXxb1gNabOwiCtU8azHZcApEM8TUBkQ9KHqpIuZOslFqdPd FSHhvWPDgFlnc4n0IKBhe5Qb8Q3lHIeM9sZIqZCX12Qa+oNZf6kATZZ5gxORFDqtd2a+ jzebNGii31oQtX2sZNdN4rh9aHcXc5WpgNm1EbfV9rkQx6pXeU2SHdX7R5h/6wflX1fF uoNXtaNRgxkBXdHTkdJxt9nv4DiIuoS7p8iBAFkx/Z9z90n53pFLHLEIYnxTI8bkm7qE rOgw== X-Gm-Message-State: AKGB3mJi3JW/0TI95dY4puonKyU8OwurOEbeZ3bkGoxPQB57IbH9m2hx s1fvJRERjOftwnRsckbhTdwpHxZZDI1JFKLy0H2TuQ== X-Google-Smtp-Source: ACJfBotbq4Pg+T6Ubb+1FFwJLlZDvNzJ200HAPe4g0NSGwiWFTLR2wKrqOmzF/a8sDR7DlcruxzvPRJmzcdsAOJbaQo= X-Received: by 10.107.30.81 with SMTP id e78mr6360274ioe.130.1513106572456; Tue, 12 Dec 2017 11:22:52 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Tue, 12 Dec 2017 11:22:51 -0800 (PST) X-Originating-IP: [12.227.204.186] In-Reply-To: References: <201712120946.vBC9krNL075725@repo.freebsd.org> From: Warner Losh Date: Tue, 12 Dec 2017 12:22:51 -0700 X-Google-Sender-Auth: 4U6L1Mff-MVFu7XP1IrS2HbbFtM Message-ID: Subject: Re: svn commit: r326792 - head/stand/uboot/common To: Mateusz Guzik Cc: Antoine Brodin , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:22:53 -0000 On Tue, Dec 12, 2017 at 12:13 PM, Mateusz Guzik wrote: > How about you both close one PR as a punishment and we pretend this did > not happen. > I'll fix 6 CIDs as punishment. Warner > The thing to do was to reply to the offending commit or contact the > committer > on irc. Only in case of no timely response fixing on your own is the right > thing > to do. > > > On Tue, Dec 12, 2017 at 8:03 PM, Warner Losh wrote: > >> The email I wrote here also sucks. It was unduly harsh. While the commit >> message should have been better, I was too harsh in trying to express this >> and giving a better example. >> >> Warner >> >> On Tue, Dec 12, 2017 at 5:49 AM, Warner Losh wrote: >> >> > This commit message sucks. Please use a more descriptive one in the >> future >> > like "catch up to change rXXXXX that remove the argument from >> interact." If >> > you want to be snarky, add 'pounty hat to imp' to it. Thats infornative. >> > Your message is utterly useless. It doesn't even say what arch is >> broken. >> > >> > Warner >> > >> > Warner >> > >> > On Dec 12, 2017 1:47 AM, "Antoine Brodin" wrote: >> > >> >> Author: antoine >> >> Date: Tue Dec 12 09:46:53 2017 >> >> New Revision: 326792 >> >> URL: https://svnweb.freebsd.org/changeset/base/326792 >> >> >> >> Log: >> >> Attempt to unbreak buildworld >> >> >> >> Modified: >> >> head/stand/uboot/common/main.c >> >> >> >> Modified: head/stand/uboot/common/main.c >> >> ============================================================ >> >> ================== >> >> --- head/stand/uboot/common/main.c Tue Dec 12 06:56:21 2017 >> >> (r326791) >> >> +++ head/stand/uboot/common/main.c Tue Dec 12 09:46:53 2017 >> >> (r326792) >> >> @@ -500,7 +500,7 @@ main(int argc, char **argv) >> >> archsw.arch_readin = uboot_readin; >> >> archsw.arch_autoload = uboot_autoload; >> >> >> >> - interact(NULL); /* doesn't return */ >> >> + interact(); /* doesn't return */ >> >> >> >> return (0); >> >> } >> >> >> >> >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" >> > > > > -- > Mateusz Guzik > From owner-svn-src-all@freebsd.org Tue Dec 12 19:25:56 2017 Return-Path: Delivered-To: svn-src-all@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 03E81E81348; Tue, 12 Dec 2017 19:25:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C51EB6DAC0; Tue, 12 Dec 2017 19:25:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCJPsHn026157; Tue, 12 Dec 2017 19:25:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCJPsit026156; Tue, 12 Dec 2017 19:25:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712121925.vBCJPsit026156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Dec 2017 19:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326800 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 326800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:25:56 -0000 Author: imp Date: Tue Dec 12 19:25:54 2017 New Revision: 326800 URL: https://svnweb.freebsd.org/changeset/base/326800 Log: Check return value for set_bootvar and give a good error message. CID: 1383601 Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 17:34:35 2017 (r326799) +++ head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 19:25:54 2017 (r326800) @@ -835,7 +835,8 @@ handle_timeout(int to) uint16_t timeout; le16enc(&timeout, to); - set_bootvar("Timeout", (uint8_t *)&timeout, sizeof(timeout)); + if (set_bootvar("Timeout", (uint8_t *)&timeout, sizeof(timeout)) < 0) + errx(1, "Can't set Timeout for booting."); } int From owner-svn-src-all@freebsd.org Tue Dec 12 19:26:15 2017 Return-Path: Delivered-To: svn-src-all@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 35B17E8138C; Tue, 12 Dec 2017 19:26:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 434C66DBEB; Tue, 12 Dec 2017 19:26:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCJQA6m026218; Tue, 12 Dec 2017 19:26:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCJQAnY026217; Tue, 12 Dec 2017 19:26:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712121926.vBCJQAnY026217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Dec 2017 19:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326801 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 326801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:26:16 -0000 Author: imp Date: Tue Dec 12 19:26:10 2017 New Revision: 326801 URL: https://svnweb.freebsd.org/changeset/base/326801 Log: Don't leak new_data. CID: 1383605 Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 19:25:54 2017 (r326800) +++ head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 19:26:10 2017 (r326801) @@ -361,6 +361,7 @@ set_boot_order(char *order) free(cp); if (set_bootvar("BootOrder", (uint8_t*)new_data, size) < 0) err(1, "Unabke to set BootOrder to %s", order); + free(new_data); } static void From owner-svn-src-all@freebsd.org Tue Dec 12 19:26:18 2017 Return-Path: Delivered-To: svn-src-all@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 BD9D7E813A5; Tue, 12 Dec 2017 19:26:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 400F56DBF8; Tue, 12 Dec 2017 19:26:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCJQFCd026269; Tue, 12 Dec 2017 19:26:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCJQFJf026268; Tue, 12 Dec 2017 19:26:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712121926.vBCJQFJf026268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Dec 2017 19:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326802 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 326802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:26:18 -0000 Author: imp Date: Tue Dec 12 19:26:15 2017 New Revision: 326802 URL: https://svnweb.freebsd.org/changeset/base/326802 Log: Fix resource leak. Free converted description after printing it. Also minor style sort of local vars. CID: 1383606 Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 19:26:10 2017 (r326801) +++ head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 19:26:15 2017 (r326802) @@ -783,9 +783,10 @@ print_boot_vars(bool verbose) * as a command epilogue */ struct entry *v; - uint32_t attrs, load_attrs; uint8_t *data; + char *d; size_t size; + uint32_t attrs, load_attrs; int ret; ret = efi_get_variable(EFI_GLOBAL_GUID, "BootNext", &data, &size, &attrs); @@ -812,9 +813,9 @@ print_boot_vars(bool verbose) if (ret < 0) continue; /* we must have deleted it */ load_attrs = le32dec(data); + d = get_descr(data); printf("%s%c %s", v->name, - ((load_attrs & LOAD_OPTION_ACTIVE) ? '*': ' '), - get_descr(data)); + ((load_attrs & LOAD_OPTION_ACTIVE) ? '*': ' '), d); if (verbose) print_loadopt_str(data, size); else From owner-svn-src-all@freebsd.org Tue Dec 12 19:26:25 2017 Return-Path: Delivered-To: svn-src-all@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 D5320E813E1; Tue, 12 Dec 2017 19:26:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 773CC6DC1C; Tue, 12 Dec 2017 19:26:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCJQOOW026376; Tue, 12 Dec 2017 19:26:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCJQOri026375; Tue, 12 Dec 2017 19:26:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712121926.vBCJQOri026375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Dec 2017 19:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326804 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 326804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:26:26 -0000 Author: imp Date: Tue Dec 12 19:26:24 2017 New Revision: 326804 URL: https://svnweb.freebsd.org/changeset/base/326804 Log: Add sanity testing against maximum sane lengths for device paths for loader and kernel. CID: 1383608 Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 19:26:19 2017 (r326803) +++ head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 19:26:24 2017 (r326804) @@ -650,8 +650,14 @@ make_boot_var(const char *label, const char *loader, c kerneldp = NULL; } llen = efidp_size(loaderdp); + if (llen > MAX_DP_LEN) + errx(1, "Loader path too long."); klen = efidp_size(kerneldp); + if (klen > MAX_DP_LEN) + errx(1, "Kernel path too long."); dp = malloc(llen + klen); + if (dp == NULL) + errx(1, "Can't allocate memory for new device paths"); memcpy(dp, loaderdp, llen); if (kerneldp != NULL) memcpy((char *)dp + llen, kerneldp, klen); From owner-svn-src-all@freebsd.org Tue Dec 12 19:26:25 2017 Return-Path: Delivered-To: svn-src-all@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 D720AE813E3; Tue, 12 Dec 2017 19:26:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04F4A6DC0E; Tue, 12 Dec 2017 19:26:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCJQJQA026323; Tue, 12 Dec 2017 19:26:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCJQJWC026322; Tue, 12 Dec 2017 19:26:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712121926.vBCJQJWC026322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Dec 2017 19:26:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326803 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 326803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:26:26 -0000 Author: imp Date: Tue Dec 12 19:26:19 2017 New Revision: 326803 URL: https://svnweb.freebsd.org/changeset/base/326803 Log: Free load_opt_buf after we're done with it. CID: 1383607 Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 19:26:15 2017 (r326802) +++ head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 19:26:19 2017 (r326803) @@ -684,8 +684,9 @@ make_boot_var(const char *label, const char *loader, c new_ent->name = bootvar; new_ent->guid = EFI_GLOBAL_GUID; LIST_INSERT_HEAD(&efivars, new_ent, entries); - + free(load_opt_buf); free(dp); + return 0; } From owner-svn-src-all@freebsd.org Tue Dec 12 19:26:30 2017 Return-Path: Delivered-To: svn-src-all@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 BC4BDE81416; Tue, 12 Dec 2017 19:26:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B0976DC65; Tue, 12 Dec 2017 19:26:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCJQSEp026428; Tue, 12 Dec 2017 19:26:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCJQSuR026427; Tue, 12 Dec 2017 19:26:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712121926.vBCJQSuR026427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Dec 2017 19:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326805 - head/usr.sbin/efivar X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efivar X-SVN-Commit-Revision: 326805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:26:30 -0000 Author: imp Date: Tue Dec 12 19:26:28 2017 New Revision: 326805 URL: https://svnweb.freebsd.org/changeset/base/326805 Log: Iniailize str so ucs2_to_utf8 won't free stack garbage. CID: 1381037 Sponsored by: Netflix Modified: head/usr.sbin/efivar/efiutil.c Modified: head/usr.sbin/efivar/efiutil.c ============================================================================== --- head/usr.sbin/efivar/efiutil.c Tue Dec 12 19:26:24 2017 (r326804) +++ head/usr.sbin/efivar/efiutil.c Tue Dec 12 19:26:28 2017 (r326805) @@ -125,7 +125,7 @@ efi_print_load_option(uint8_t *data, size_t datalen, i uint16_t fplen; efi_char *descr; efidp dp, edp; - char *str; + char *str = NULL; char buf[1024]; int len; void *opt; From owner-svn-src-all@freebsd.org Tue Dec 12 19:27:54 2017 Return-Path: Delivered-To: svn-src-all@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 C4DF8E814A7; Tue, 12 Dec 2017 19:27:54 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E56A6E0D8; Tue, 12 Dec 2017 19:27:17 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id OqCreCnDHGvLHOqCse98Zv; Tue, 12 Dec 2017 12:27:11 -0700 X-Authority-Analysis: v=2.2 cv=a9pAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=ocR9PWop10UA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=7Qk2ozbKAAAA:8 a=pGLkceISAAAA:8 a=BRVnUJJACJLM7Fuod6UA:9 a=ZTjVsfhs2AXKdQea:21 a=MrEcob16fGksjpNs:21 a=QEXdDO2ut3YA:10 a=IO5VPGILNJynrRFRW5QA:9 a=RVCD4c9FxOc2yFVT:21 a=G4ttqlYFUybfVhI7:21 a=mc6yV5WG7ZIeMsU3:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=1lyxoWkJIXJV6VJUPhuM:22 Received: from [25.81.38.66] (S0106d4ca6d8943b0.gv.shawcable.net [24.68.134.59]) by spqr.komquats.com (Postfix) with ESMTPSA id 3D13A5F1; Tue, 12 Dec 2017 11:27:09 -0800 (PST) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r326792 - head/stand/uboot/common Date: Tue, 12 Dec 2017 11:27:13 -0800 To: Mateusz Guzik , Warner Losh CC: Antoine Brodin , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers Message-Id: <20171212192709.3D13A5F1@spqr.komquats.com> X-CMAE-Envelope: MS4wfGr4uhIQ7BLBa1Q/QKaJQdR7QA/kNALaXRtvUNQZ45/U6kE3oIpt0GfLQ+2xT4Hah2dMwC8AEokxJ4u/N4Q7+qoy3C0O1ulPGIE5d8dGFxr8JXKpjBci d0IVIayBEzlDwx06wFoNTTKlCxLenpLVI3Hhj769+n8IoY6cY96CrzHpiOuPo0/46s64T+w31y3EvE2JJBTpOF9QuYmGNv+JH/3ucSnhxzh/sfcq5BjuhZ2H oOIbGUUr6gpA7NPQ6nk6/hSgOpAjFLefcdeHNrrGh7Le2YGPUdLHKMUoC2cUfe5LTc8773tvVd7DHveBl9OrVDrxxNpqiqRQEyiu6u7N1Kg= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:27:55 -0000 PR 224080??? --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Mateusz Guzik Sent: 12/12/2017 11:13 To: Warner Losh Cc: Antoine Brodin; svn-src-head@freebsd.org; svn-src-all@freebsd.org; src-= committers Subject: Re: svn commit: r326792 - head/stand/uboot/common How about you both close one PR as a punishment and we pretend this did not happen. The thing to do was to reply to the offending commit or contact the committ= er on irc. Only in case of no timely response fixing on your own is the right = thing to do. On Tue, Dec 12, 2017 at 8:03 PM, Warner Losh wrote: The email I wrote here also sucks. It was unduly harsh. While the commit message should have been better, I was too harsh in trying to express this and giving a better example. =20 Warner =20 On Tue, Dec 12, 2017 at 5:49 AM, Warner Losh wrote: =20 > This commit message sucks. Please use a more descriptive one in the futur= e > like "catch up to change rXXXXX that remove the argument from interact."= If > you want to be snarky, add 'pounty hat to imp' to it. Thats infornative. > Your message is utterly useless. It doesn't even say what arch is broken= . > > Warner > > Warner > > On Dec 12, 2017 1:47 AM, "Antoine Brodin" wrote: > >> Author: antoine >> Date: Tue Dec 12 09:46:53 2017 >> New Revision: 326792 >> URL: https://svnweb.freebsd.org/changeset/base/326792 >> >> Log: >> Attempt to unbreak buildworld >> >> Modified: >> head/stand/uboot/common/main.c >> >> Modified: head/stand/uboot/common/main.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- head/stand/uboot/common/main.c Tue Dec 12 06:56:21 2017 >> (r326791) >> +++ head/stand/uboot/common/main.c Tue Dec 12 09:46:53 2017 >> (r326792) >> @@ -500,7 +500,7 @@ main(int argc, char **argv) >> archsw.arch_readin =3D uboot_readin; >> archsw.arch_autoload =3D uboot_autoload; >> >> - interact(NULL); /* doesn't return */ >> + interact(); /* doesn't return */ >> >> return (0); >> } >> >> _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" =20 --=20 Mateusz Guzik = From owner-svn-src-all@freebsd.org Tue Dec 12 19:29:14 2017 Return-Path: Delivered-To: svn-src-all@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 658E1E8164C; Tue, 12 Dec 2017 19:29:14 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FA0D6E3CF; Tue, 12 Dec 2017 19:29:11 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBCJT3PI018650 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2017 20:29:03 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: cem@freebsd.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBCJStno097552; Wed, 13 Dec 2017 02:28:55 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: rgrimes@freebsd.org, Andriy Gapon References: <201712121732.vBCHW5UR087312@pdx.rh.CN85.dnsmgr.net> Cc: Don Lewis , Alexey Dokuchaev , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <5A302DF7.1090706@grosbein.net> Date: Wed, 13 Dec 2017 02:28:55 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <201712121732.vBCHW5UR087312@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:29:14 -0000 On 13.12.2017 00:32, Rodney W. Grimes wrote: >> I am not sure if there are tools that can analyze stack requirements for >> possible call chains rather than individual functions. > > Call graphs can be used to find deep chains. Combine the above > with a call graph and we should be able to come up with some > data. > > This also sounds like a good caniate for GSOC, creation > of a call graph with static analysis of local variable size + > call frame size requirements as a O(1) stack space estimator. "Longitude" of call chain greatly depends of run-time system configuration. For example, application sendto() call can result in variable number of system calls performing IPSEC transformations (ESP, AH, IPCOMP) then custom PFIL processing then multiple NETGRAPH calls then complex WiFi stack operations and each of such calls can result in kernel stack exhaustion. From owner-svn-src-all@freebsd.org Tue Dec 12 19:32:29 2017 Return-Path: Delivered-To: svn-src-all@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 AFCA2E819CC; Tue, 12 Dec 2017 19:32:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87D406EA15; Tue, 12 Dec 2017 19:32:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (unknown [128.57.46.190]) by mail.baldwin.cx (Postfix) with ESMTPSA id DB2A910A8BA; Tue, 12 Dec 2017 14:32:27 -0500 (EST) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Eugene Grosbein , Konstantin Belousov , Conrad Meyer References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: John Baldwin Message-ID: <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> Date: Tue, 12 Dec 2017 14:32:26 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <5A2E5D44.9030904@grosbein.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 12 Dec 2017 14:32:28 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:32:29 -0000 On 12/11/17 5:26 AM, Eugene Grosbein wrote: > On 11.12.2017 16:19, Konstantin Belousov wrote: >> On Mon, Dec 11, 2017 at 04:32:37AM +0000, Conrad Meyer wrote: >>> Author: cem >>> Date: Mon Dec 11 04:32:37 2017 >>> New Revision: 326758 >>> URL: https://svnweb.freebsd.org/changeset/base/326758 >>> >>> Log: >>> i386: Bump KSTACK_PAGES default to match amd64 >> i386 is not amd64, the change is wrong. >> >> i386 has the word size two times smaller than amd64, which makes typical >> frame smaller by 30-40% over same code on amd64. Also i386 has much >> smaller available KVA size (tens of MB) and KVA fragmentation is both >> more severe and more fatal due to this. I expect that your change will >> make any non-trivial load which creates enough threads to either fail >> randomly or deadlock. >> >> If somebody tries to fit large load onto i386 machine, he must know what to >> do and how to configure the kernel to adapt to the load (which does not >> require the recompilation). > > Its very easy to get kernel stack overflow with 11-STABLE/i386 > without any significant load due to abuse of kernel stack in many kernel subsystems > as shown in the https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219476 > > Contrary, "enough threads" seems to be very non-trivial number of threads > and pretty unusual load pattern for i386 as I run several such systems > with kern.kstack_pages=4 for quite long time and have no problems. > No random fails, no deadlocks. And with 2 pages only 11-STABLE/i386 is just unusable > if one utilizes SCTP, IPv6, some WiFi connectivity, IPSEC or even very small ZFS pool. > > I still wonder if there is really such load pattern that creates "enough threads" > for i386 to make 4-pages stack troublesome. I suspect two things are at play in running out of stack in 10.x and later. 1) Usage of XSAVE for AVX, etc. state uses more of the kstack (as kib@ alludes to), and 2) clang. Certainly for MIPS I have found that compiling with clang instead of gcc for mips64 gives a kernel that panics for stack overflow for any use of NFS. It might be that this is due to something MIPS-specific, but it might be worthwhile retesting with kstack_pages=2 and building the kernel with CROSS_TOOLCHAIN=i386-gcc after installing the appropriate package. For people wanting to use 32-bit binaries on a modern x86 box, we should probably add support for the x32 ABI permitting you to use 32-bit pointers but with the full complement of 64-bit registers (and still using the 64-bit kernel so there is not KVA pressure for the kernel itself). -- John Baldwin From owner-svn-src-all@freebsd.org Tue Dec 12 19:45:26 2017 Return-Path: Delivered-To: svn-src-all@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 36310E81F2C; Tue, 12 Dec 2017 19:45:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02BB06F227; Tue, 12 Dec 2017 19:45:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCJjPQR034913; Tue, 12 Dec 2017 19:45:25 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCJjPto034912; Tue, 12 Dec 2017 19:45:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712121945.vBCJjPto034912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Dec 2017 19:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326806 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 326806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 19:45:26 -0000 Author: imp Date: Tue Dec 12 19:45:24 2017 New Revision: 326806 URL: https://svnweb.freebsd.org/changeset/base/326806 Log: Actually insert the free(d) call missed in r326802. Noticed by: rpokala@ Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 19:26:28 2017 (r326805) +++ head/usr.sbin/efibootmgr/efibootmgr.c Tue Dec 12 19:45:24 2017 (r326806) @@ -823,6 +823,7 @@ print_boot_vars(bool verbose) d = get_descr(data); printf("%s%c %s", v->name, ((load_attrs & LOAD_OPTION_ACTIVE) ? '*': ' '), d); + free(d); if (verbose) print_loadopt_str(data, size); else From owner-svn-src-all@freebsd.org Tue Dec 12 20:02:49 2017 Return-Path: Delivered-To: svn-src-all@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 5E7F4E82E3D; Tue, 12 Dec 2017 20:02:49 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29B7A7001B; Tue, 12 Dec 2017 20:02:49 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCK2mf3043042; Tue, 12 Dec 2017 20:02:48 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCK2maV043041; Tue, 12 Dec 2017 20:02:48 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201712122002.vBCK2maV043041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Tue, 12 Dec 2017 20:02:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326807 - head/sys/fs/ext2fs X-SVN-Group: head X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: head/sys/fs/ext2fs X-SVN-Commit-Revision: 326807 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 20:02:49 -0000 Author: fsu Date: Tue Dec 12 20:02:48 2017 New Revision: 326807 URL: https://svnweb.freebsd.org/changeset/base/326807 Log: Fix extattr getters in case of neither uio nor buffer was not passed to VOP_*. Approved by: pfg (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D13359 Modified: head/sys/fs/ext2fs/ext2_extattr.c Modified: head/sys/fs/ext2fs/ext2_extattr.c ============================================================================== --- head/sys/fs/ext2fs/ext2_extattr.c Tue Dec 12 19:45:24 2017 (r326806) +++ head/sys/fs/ext2fs/ext2_extattr.c Tue Dec 12 20:02:48 2017 (r326807) @@ -220,9 +220,10 @@ ext2_extattr_inode_list(struct inode *ip, int attrname return (ENOTSUP); } - if (uio == NULL) + if (size != NULL) *size += name_len + 1; - else { + + if (uio != NULL) { char *name = malloc(name_len + 1, M_TEMP, M_WAITOK); name[0] = name_len; memcpy(&name[1], attr_name, name_len); @@ -286,9 +287,10 @@ ext2_extattr_block_list(struct inode *ip, int attrname return (ENOTSUP); } - if (uio == NULL) + if (size != NULL) *size += name_len + 1; - else { + + if (uio != NULL) { char *name = malloc(name_len + 1, M_TEMP, M_WAITOK); name[0] = name_len; memcpy(&name[1], attr_name, name_len); @@ -361,12 +363,12 @@ ext2_extattr_inode_get(struct inode *ip, int attrnames if (strlen(name) == name_len && 0 == strncmp(attr_name, name, name_len)) { - if (uio == NULL) + if (size != NULL) *size += entry->e_value_size; - else { + + if (uio != NULL) error = uiomove(((char *)EXT2_IFIRST(header)) + entry->e_value_offs, entry->e_value_size, uio); - } brelse(bp); return (error); @@ -428,12 +430,12 @@ ext2_extattr_block_get(struct inode *ip, int attrnames if (strlen(name) == name_len && 0 == strncmp(attr_name, name, name_len)) { - if (uio == NULL) + if (size != NULL) *size += entry->e_value_size; - else { + + if (uio != NULL) error = uiomove(bp->b_data + entry->e_value_offs, entry->e_value_size, uio); - } brelse(bp); return (error); From owner-svn-src-all@freebsd.org Tue Dec 12 20:09:55 2017 Return-Path: Delivered-To: svn-src-all@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 A7DE2E83003; Tue, 12 Dec 2017 20:09:55 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 38B0E7034B; Tue, 12 Dec 2017 20:09:54 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBCK9oZG018965 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2017 21:09:51 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jhb@FreeBSD.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBCK9kdn009716; Wed, 13 Dec 2017 03:09:46 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: John Baldwin , Konstantin Belousov , Conrad Meyer References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A30378A.3040609@grosbein.net> Date: Wed, 13 Dec 2017 03:09:46 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 20:09:55 -0000 On 13.12.2017 02:32, John Baldwin wrote: > Certainly for MIPS I have found that compiling with clang > instead of gcc for mips64 gives a kernel that panics for stack overflow for any > use of NFS. It might be that this is due to something MIPS-specific, but it > might be worthwhile retesting with kstack_pages=2 and building the kernel > with CROSS_TOOLCHAIN=i386-gcc after installing the appropriate package. You may want to check NFS code that uses stack heavily. Here are numbers for i386 (bytes-on-stack, module, what function): 1344 nfs_nfsdport.o : 1152 nfs_nfsdserv.o : 1128 nfs_nfsdserv.o : 952 nfs_nfsdserv.o : 664 nfs_nfsdserv.o : 640 nfs_nfsdserv.o : 624 nfs_nfsdserv.o : 608 nfs_nfsdserv.o : 600 nfs_clvfsops.o : From owner-svn-src-all@freebsd.org Tue Dec 12 20:15:58 2017 Return-Path: Delivered-To: svn-src-all@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 DCCFFE832D2; Tue, 12 Dec 2017 20:15:58 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7A3A7085E; Tue, 12 Dec 2017 20:15:58 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCKFvpi047251; Tue, 12 Dec 2017 20:15:57 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCKFvNk047250; Tue, 12 Dec 2017 20:15:57 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201712122015.vBCKFvNk047250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Tue, 12 Dec 2017 20:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326808 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 326808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 20:15:59 -0000 Author: fsu Date: Tue Dec 12 20:15:57 2017 New Revision: 326808 URL: https://svnweb.freebsd.org/changeset/base/326808 Log: Move buffer size checks outside of the vnode locks. Reviewed by: kib, cem, pfg (mentor) Approved by: pfg (mentor) MFC after: 1 weeks Differential Revision: https://reviews.freebsd.org/D13405 Modified: head/sys/kern/vfs_extattr.c Modified: head/sys/kern/vfs_extattr.c ============================================================================== --- head/sys/kern/vfs_extattr.c Tue Dec 12 20:02:48 2017 (r326807) +++ head/sys/kern/vfs_extattr.c Tue Dec 12 20:15:57 2017 (r326808) @@ -167,6 +167,9 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, co ssize_t cnt; int error; + if (nbytes > IOSIZE_MAX) + return (EINVAL); + error = vn_start_write(vp, &mp, V_WAIT | PCATCH); if (error) return (error); @@ -177,10 +180,6 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, co auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > IOSIZE_MAX) { - error = EINVAL; - goto done; - } auio.uio_resid = nbytes; auio.uio_rw = UIO_WRITE; auio.uio_segflg = UIO_USERSPACE; @@ -330,6 +329,9 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, co size_t size, *sizep; int error; + if (nbytes > IOSIZE_MAX) + return (EINVAL); + vn_lock(vp, LK_SHARED | LK_RETRY); /* @@ -346,10 +348,6 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, co auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > IOSIZE_MAX) { - error = EINVAL; - goto done; - } auio.uio_resid = nbytes; auio.uio_rw = UIO_READ; auio.uio_segflg = UIO_USERSPACE; @@ -638,6 +636,9 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v ssize_t cnt; int error; + if (nbytes > IOSIZE_MAX) + return (EINVAL); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); auiop = NULL; @@ -649,10 +650,6 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > IOSIZE_MAX) { - error = EINVAL; - goto done; - } auio.uio_resid = nbytes; auio.uio_rw = UIO_READ; auio.uio_segflg = UIO_USERSPACE; From owner-svn-src-all@freebsd.org Tue Dec 12 20:22:11 2017 Return-Path: Delivered-To: svn-src-all@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 0D8BDE83755; Tue, 12 Dec 2017 20:22:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEBC470E3B; Tue, 12 Dec 2017 20:22:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCKM9qi050770; Tue, 12 Dec 2017 20:22:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCKM9Kd050769; Tue, 12 Dec 2017 20:22:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712122022.vBCKM9Kd050769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Dec 2017 20:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326809 - head/sys/dev/cardbus X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/cardbus X-SVN-Commit-Revision: 326809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 20:22:11 -0000 Author: imp Date: Tue Dec 12 20:22:09 2017 New Revision: 326809 URL: https://svnweb.freebsd.org/changeset/base/326809 Log: 1k objects on the stack are a bad idea. While it's likely safe in this context, it's also safe to allocate the memory and free it instead. Noticed by: Eugene Grosbein's script Modified: head/sys/dev/cardbus/cardbus_cis.c Modified: head/sys/dev/cardbus/cardbus_cis.c ============================================================================== --- head/sys/dev/cardbus/cardbus_cis.c Tue Dec 12 20:15:57 2017 (r326808) +++ head/sys/dev/cardbus/cardbus_cis.c Tue Dec 12 20:22:09 2017 (r326809) @@ -583,7 +583,7 @@ int cardbus_parse_cis(device_t cbdev, device_t child, struct tuple_callbacks *callbacks, void *argp) { - uint8_t tupledata[MAXTUPLESIZE]; + uint8_t *tupledata; int tupleid = CISTPL_NULL; int len; int expect_linktarget; @@ -591,10 +591,11 @@ cardbus_parse_cis(device_t cbdev, device_t child, struct resource *res; int rid; - bzero(tupledata, MAXTUPLESIZE); + tupledata = malloc(MAXTUPLESIZE, M_DEVBUF, M_WAITOK | M_ZERO); expect_linktarget = TRUE; if ((start = pci_read_config(child, PCIR_CIS, 4)) == 0) { DEVPRINTF((cbdev, "Warning: CIS pointer is 0: (no CIS)\n")); + free(tupledata, M_DEVBUF); return (0); } DEVPRINTF((cbdev, "CIS pointer is %#x\n", start)); @@ -602,6 +603,7 @@ cardbus_parse_cis(device_t cbdev, device_t child, res = cardbus_read_tuple_init(cbdev, child, &start, &rid); if (res == NULL) { device_printf(cbdev, "Unable to allocate resources for CIS\n"); + free(tupledata, M_DEVBUF); return (ENXIO); } @@ -610,6 +612,7 @@ cardbus_parse_cis(device_t cbdev, device_t child, &tupleid, &len, tupledata) != 0) { device_printf(cbdev, "Failed to read CIS.\n"); cardbus_read_tuple_finish(cbdev, child, rid, res); + free(tupledata, M_DEVBUF); return (ENXIO); } @@ -617,6 +620,7 @@ cardbus_parse_cis(device_t cbdev, device_t child, device_printf(cbdev, "Expecting link target, got 0x%x\n", tupleid); cardbus_read_tuple_finish(cbdev, child, rid, res); + free(tupledata, M_DEVBUF); return (EINVAL); } expect_linktarget = decode_tuple(cbdev, child, tupleid, len, @@ -625,10 +629,12 @@ cardbus_parse_cis(device_t cbdev, device_t child, device_printf(cbdev, "Parsing failed with %d\n", expect_linktarget); cardbus_read_tuple_finish(cbdev, child, rid, res); + free(tupledata, M_DEVBUF); return (expect_linktarget); } } while (tupleid != CISTPL_END); cardbus_read_tuple_finish(cbdev, child, rid, res); + free(tupledata, M_DEVBUF); return (0); } From owner-svn-src-all@freebsd.org Tue Dec 12 20:26:13 2017 Return-Path: Delivered-To: svn-src-all@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 AC490E839CE; Tue, 12 Dec 2017 20:26:13 +0000 (UTC) (envelope-from zeising+freebsd@daemonic.se) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2607:f740:d:20::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 709017117A; Tue, 12 Dec 2017 20:26:13 +0000 (UTC) (envelope-from zeising+freebsd@daemonic.se) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 3yxBDM6BX4zDh2p; Tue, 12 Dec 2017 20:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=daemonic.se; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:subject:subject:received :received; s=20151023; t=1513110371; bh=Un8MxWIJn1W63EzIS6QLbxH4 pBFlf1TcPCVSc7Bie+E=; b=Mdvz4frnoXaMp1xwk48LzaJc8NJNZVnAgiREWo1s KSQa+OAdohouZ5jqsYmDdFUXHwPg9farP+j0NOAkVIl/JiWWnq4Xrl7li06Tr0HY Q1AtTr1NFkI0s/vW63mKCiWl3tTQvFHfUTHjKpnC9L2tGu5DOOX+5iVYLx3p+wEs Z18= X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([IPv6:::1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [IPv6:::1]) (amavisd-new, port 10587) with ESMTPS id y5tN74Khmjk6; Tue, 12 Dec 2017 20:26:11 +0000 (UTC) Received: from garnet.daemonic.se (unknown [IPv6:2001:470:dca9:201:9eda:3eff:fe70:24c0]) by mail.daemonic.se (Postfix) with ESMTPSA id 3yxBDM1NwVzDh2m; Tue, 12 Dec 2017 20:26:11 +0000 (UTC) Subject: Re: svn commit: r326792 - head/stand/uboot/common To: Cy Schubert , Mateusz Guzik , Warner Losh Cc: "svn-src-head@freebsd.org" , Antoine Brodin , src-committers , "svn-src-all@freebsd.org" References: <20171212192709.3D13A5F1@spqr.komquats.com> From: Niclas Zeising Message-ID: <675e1e37-81b5-0988-6d25-d585968c717f@daemonic.se> Date: Tue, 12 Dec 2017 21:26:03 +0100 User-Agent: Mutt/1.5.21 MIME-Version: 1.0 In-Reply-To: <20171212192709.3D13A5F1@spqr.komquats.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 20:26:13 -0000 On 12/12/17 20:27, Cy Schubert wrote: > PR 224080??? Yes please. Regards -- Niclas From owner-svn-src-all@freebsd.org Tue Dec 12 20:28:56 2017 Return-Path: Delivered-To: svn-src-all@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 204F3E83B3F; Tue, 12 Dec 2017 20:28:56 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D649471449; Tue, 12 Dec 2017 20:28:55 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCKSsbk051827; Tue, 12 Dec 2017 20:28:54 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCKSsdd051823; Tue, 12 Dec 2017 20:28:54 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201712122028.vBCKSsdd051823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Tue, 12 Dec 2017 20:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326810 - in stable/11: lib/libsysdecode sys/amd64/linux sys/amd64/linux32 sys/i386/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: in stable/11: lib/libsysdecode sys/amd64/linux sys/amd64/linux32 sys/i386/linux X-SVN-Commit-Revision: 326810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 20:28:56 -0000 Author: fsu Date: Tue Dec 12 20:28:54 2017 New Revision: 326810 URL: https://svnweb.freebsd.org/changeset/base/326810 Log: MFC r326282, r326317: Remap ENOATTR to ENODATA in the linuxulator. In the linux ENOADATA is frequently #defined as ENOATTR. The change is required for an xattrs support implementation. Sync bsd_to_linux_errno[] table with i386 and amd64 tables in the sys directory. Discussed with: netchild Requested by: jhb Approved by: pfg (mentor) Modified: stable/11/lib/libsysdecode/errno.c stable/11/sys/amd64/linux/linux_sysvec.c stable/11/sys/amd64/linux32/linux32_sysvec.c stable/11/sys/i386/linux/linux_sysvec.c Modified: stable/11/lib/libsysdecode/errno.c ============================================================================== --- stable/11/lib/libsysdecode/errno.c Tue Dec 12 20:22:09 2017 (r326809) +++ stable/11/lib/libsysdecode/errno.c Tue Dec 12 20:28:54 2017 (r326810) @@ -53,7 +53,7 @@ static int bsd_to_linux_errno[ELAST + 1] = { -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75,-125, -84, -95, -16, -74, + -6, -6, -43, -42, -75,-125, -84, -61, -16, -74, -72, -67, -71 }; #endif Modified: stable/11/sys/amd64/linux/linux_sysvec.c ============================================================================== --- stable/11/sys/amd64/linux/linux_sysvec.c Tue Dec 12 20:22:09 2017 (r326809) +++ stable/11/sys/amd64/linux/linux_sysvec.c Tue Dec 12 20:28:54 2017 (r326810) @@ -147,7 +147,7 @@ static int bsd_to_linux_errno[ELAST + 1] = { -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75,-125, -84, -95, -16, -74, + -6, -6, -43, -42, -75,-125, -84, -61, -16, -74, -72, -67, -71 }; Modified: stable/11/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/11/sys/amd64/linux32/linux32_sysvec.c Tue Dec 12 20:22:09 2017 (r326809) +++ stable/11/sys/amd64/linux32/linux32_sysvec.c Tue Dec 12 20:28:54 2017 (r326810) @@ -146,7 +146,7 @@ static int bsd_to_linux_errno[ELAST + 1] = { -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75,-125, -84, -95, -16, -74, + -6, -6, -43, -42, -75,-125, -84, -61, -16, -74, -72, -67, -71 }; Modified: stable/11/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/11/sys/i386/linux/linux_sysvec.c Tue Dec 12 20:22:09 2017 (r326809) +++ stable/11/sys/i386/linux/linux_sysvec.c Tue Dec 12 20:28:54 2017 (r326810) @@ -145,7 +145,7 @@ static int bsd_to_linux_errno[ELAST + 1] = { -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75,-125, -84, -95, -16, -74, + -6, -6, -43, -42, -75,-125, -84, -61, -16, -74, -72, -67, -71 }; From owner-svn-src-all@freebsd.org Tue Dec 12 20:39:40 2017 Return-Path: Delivered-To: svn-src-all@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 A0C58E84168; Tue, 12 Dec 2017 20:39:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 633CC71B7F; Tue, 12 Dec 2017 20:39:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBCKdcqp088347; Tue, 12 Dec 2017 12:39:38 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBCKdcV8088346; Tue, 12 Dec 2017 12:39:38 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712122039.vBCKdcV8088346@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326809 - head/sys/dev/cardbus In-Reply-To: <201712122022.vBCKM9Kd050769@repo.freebsd.org> To: Warner Losh Date: Tue, 12 Dec 2017 12:39:38 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 20:39:40 -0000 > Author: imp > Date: Tue Dec 12 20:22:09 2017 > New Revision: 326809 > URL: https://svnweb.freebsd.org/changeset/base/326809 > > Log: > 1k objects on the stack are a bad idea. While it's likely safe in this > context, it's also safe to allocate the memory and free it instead. > > Noticed by: Eugene Grosbein's script YEA!!! One down, 20 to go and then see how the kstack issue does? And thank you for quickly fixing this. > Modified: > head/sys/dev/cardbus/cardbus_cis.c > > Modified: head/sys/dev/cardbus/cardbus_cis.c > ============================================================================== > --- head/sys/dev/cardbus/cardbus_cis.c Tue Dec 12 20:15:57 2017 (r326808) > +++ head/sys/dev/cardbus/cardbus_cis.c Tue Dec 12 20:22:09 2017 (r326809) > @@ -583,7 +583,7 @@ int > cardbus_parse_cis(device_t cbdev, device_t child, ... -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Dec 12 20:41:12 2017 Return-Path: Delivered-To: svn-src-all@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 A00D2E84386; Tue, 12 Dec 2017 20:41:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 698AF71F64; Tue, 12 Dec 2017 20:41:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCKfBtW058321; Tue, 12 Dec 2017 20:41:11 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCKfBXG058320; Tue, 12 Dec 2017 20:41:11 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712122041.vBCKfBXG058320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 12 Dec 2017 20:41:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326811 - head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace X-SVN-Commit-Revision: 326811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 20:41:12 -0000 Author: markj Date: Tue Dec 12 20:41:11 2017 New Revision: 326811 URL: https://svnweb.freebsd.org/changeset/base/326811 Log: Correct initialization of pc on powerpc. PR: 224293 Submitted by: Breno Leitao X-MFC with: r326774 Pointy hat: markj Modified: head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Modified: head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Tue Dec 12 20:28:54 2017 (r326810) +++ head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Tue Dec 12 20:41:11 2017 (r326811) @@ -333,7 +333,7 @@ fasttrap_pid_probe(struct trapframe *frame) struct reg reg, *rp; struct rm_priotracker tracker; proc_t *p = curproc; - uintptr_t pc = rp->pc; + uintptr_t pc; uintptr_t new_pc = 0; fasttrap_bucket_t *bucket; fasttrap_tracepoint_t *tp, tp_local; @@ -343,6 +343,7 @@ fasttrap_pid_probe(struct trapframe *frame) fill_regs(curthread, ®); rp = ® + pc = rp->pc; /* * It's possible that a user (in a veritable orgy of bad planning) From owner-svn-src-all@freebsd.org Tue Dec 12 20:49:59 2017 Return-Path: Delivered-To: svn-src-all@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 22EA3E84871; Tue, 12 Dec 2017 20:49:59 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3844725AA; Tue, 12 Dec 2017 20:49:58 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBCKnSmr088418; Tue, 12 Dec 2017 12:49:28 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBCKnSoE088417; Tue, 12 Dec 2017 12:49:28 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712122049.vBCKnSoE088417@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326758 - in head/sys/i386: conf include In-Reply-To: <5A302C50.4000709@grosbein.net> To: Eugene Grosbein Date: Tue, 12 Dec 2017 12:49:28 -0800 (PST) CC: rgrimes@freebsd.org, Don Lewis , Alexey Dokuchaev , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 20:49:59 -0000 > On 13.12.2017 00:01, Rodney W. Grimes wrote: > > >> But many other parts of kernel think it's OK to allocate big arrays or > >> structures on stack. > > > > We should probably start looking for those, something someone who is > > offerring help but doesnt know what they might be good at, but can > > read C code. They could be utililized t simply scan through the > > code looking for this type of thing and bring it to the attention > > of a area of expertise commiter. > > These can be found with simple script: > > cd /usr/src > make TARGET_ARCH=i386 KERNCONF=GENERIC buildkernel > > cd /usr/obj/i386.i386/home/src/sys/GENERIC > for o in *.o > do > objdump -d $o | awk -vn=$o '/sub .*,%esp/ {split ($NF,a,/[,$]/); printf "%u %s %s\n", a[2], a[2], n}' > done | sort -rn > top.sub > > head -50 top.sub | while read d h o > do > objdump -d $o | fgrep -B7 "$h,%esp" | awk -vo=$o -vd=$d '/>:$/ {print d, o, $2}' > done > top2.sub > > Here is what do we get in top2.sub: > > 4328 in6_proto.o : > 3312 in6_proto.o : > 2232 sctp_pcb.o : ... Thank you Thank you THANK YOU! And imp has already removed one of these. I wonder if fxing some of these sctp*.o would lead to the removal of the complaints about that feature filling the stack. > ... > > First column is total stack usage of kernel function (decimal), > second is module name and third contains function name it question. Can we get this put into a CI job? Output anything that gets added to the list of things with a stack usage greater than some N to an email sent. That way new violators get flagged quickly and can be cleaned up by the commiter, then slowly work down this list until things are stable again. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Dec 12 21:56:00 2017 Return-Path: Delivered-To: svn-src-all@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 AC7B2E863BD; Tue, 12 Dec 2017 21:56:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F05D74D50; Tue, 12 Dec 2017 21:55:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (unknown [128.57.46.190]) by mail.baldwin.cx (Postfix) with ESMTPSA id 01A2010AC13; Tue, 12 Dec 2017 16:55:57 -0500 (EST) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Eugene Grosbein , Konstantin Belousov , Conrad Meyer References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: John Baldwin Message-ID: Date: Tue, 12 Dec 2017 16:55:56 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <5A30378A.3040609@grosbein.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 12 Dec 2017 16:55:58 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 21:56:00 -0000 On 12/12/17 3:09 PM, Eugene Grosbein wrote: > On 13.12.2017 02:32, John Baldwin wrote: > >> Certainly for MIPS I have found that compiling with clang >> instead of gcc for mips64 gives a kernel that panics for stack overflow for any >> use of NFS. It might be that this is due to something MIPS-specific, but it >> might be worthwhile retesting with kstack_pages=2 and building the kernel >> with CROSS_TOOLCHAIN=i386-gcc after installing the appropriate package. > > You may want to check NFS code that uses stack heavily. > Here are numbers for i386 (bytes-on-stack, module, what function): > > 1344 nfs_nfsdport.o : > 1152 nfs_nfsdserv.o : > 1128 nfs_nfsdserv.o : > 952 nfs_nfsdserv.o : > 664 nfs_nfsdserv.o : > 640 nfs_nfsdserv.o : > 624 nfs_nfsdserv.o : > 608 nfs_nfsdserv.o : > 600 nfs_clvfsops.o : My point is that you should compare gcc with clang as 10.x switched to clang and that may be a factor in the stack overflows beginning with 10.x. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Dec 12 22:06:25 2017 Return-Path: Delivered-To: svn-src-all@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 18FC4E86A46; Tue, 12 Dec 2017 22:06:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A97EB754DA; Tue, 12 Dec 2017 22:06:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCM6NN7094273; Tue, 12 Dec 2017 22:06:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCM6MBO094260; Tue, 12 Dec 2017 22:06:22 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712122206.vBCM6MBO094260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Dec 2017 22:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326812 - in head/stand: . common efi/loader i386/loader mips/beri/loader ofw/common powerpc/kboot powerpc/ps3 sparc64/loader uboot/common userboot/userboot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: . common efi/loader i386/loader mips/beri/loader ofw/common powerpc/kboot powerpc/ps3 sparc64/loader uboot/common userboot/userboot X-SVN-Commit-Revision: 326812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 22:06:25 -0000 Author: imp Date: Tue Dec 12 22:06:22 2017 New Revision: 326812 URL: https://svnweb.freebsd.org/changeset/base/326812 Log: Revert r326792, r326784, r326772, r326712 Something subtle is creating problems for disk access on ubldr. Back it out unti that can be sorted out. Sponsored by: Netflix Deleted: head/stand/common/interp.h head/stand/common/interp_simple.c Modified: head/stand/common/bootstrap.h head/stand/common/interp.c head/stand/common/interp_forth.c head/stand/efi/loader/main.c head/stand/i386/loader/main.c head/stand/loader.mk head/stand/mips/beri/loader/main.c head/stand/ofw/common/main.c head/stand/powerpc/kboot/main.c head/stand/powerpc/ps3/main.c head/stand/sparc64/loader/main.c head/stand/uboot/common/main.c head/stand/userboot/userboot/main.c Modified: head/stand/common/bootstrap.h ============================================================================== --- head/stand/common/bootstrap.h Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/common/bootstrap.h Tue Dec 12 22:06:22 2017 (r326812) @@ -45,7 +45,7 @@ extern char command_errbuf[COMMAND_ERRBUFSZ]; #define CMD_FATAL 4 /* interp.c */ -void interact(void); +void interact(const char *rc); int include(const char *filename); /* interp_backslash.c */ @@ -53,6 +53,10 @@ char *backslash(const char *str); /* interp_parse.c */ int parse(int *argc, char ***argv, const char *str); + +/* interp_forth.c */ +void bf_init(const char *rc); +int bf_run(char *line); /* boot.c */ int autoboot(int timeout, char *prompt); Modified: head/stand/common/interp.c ============================================================================== --- head/stand/common/interp.c Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/common/interp.c Tue Dec 12 22:06:22 2017 (r326812) @@ -1,6 +1,5 @@ /*- * Copyright (c) 1998 Michael Smith - * Copyright (c) 2011 Wojciech A. Koszek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,6 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + #include __FBSDID("$FreeBSD$"); @@ -36,60 +36,112 @@ __FBSDID("$FreeBSD$"); #include #include #include "bootstrap.h" -#include "interp.h" +#ifdef BOOT_FORTH +#include "ficl.h" +#define RETURN(x) stackPushINT(bf_vm->pStack,!x); return(x) -#define MAXARGS 20 /* maximum number of arguments allowed */ - -struct interp *interp = -#if defined(BOOT_FORTH) - &boot_interp_forth; +extern FICL_VM *bf_vm; #else - &boot_interp_simple; +#define RETURN(x) return(x) #endif +#define MAXARGS 20 /* maximum number of arguments allowed */ + +static void prompt(void); + +#ifndef BOOT_FORTH +static int perform(int argc, char *argv[]); + +/* + * Perform the command + */ int -default_load_config(void *ctx) +perform(int argc, char *argv[]) { - return INTERP_INCL(interp, "/boot/loader.rc"); + int result; + struct bootblk_command **cmdp; + bootblk_cmd_t *cmd; + + if (argc < 1) + return(CMD_OK); + + /* set return defaults; a successful command will override these */ + command_errmsg = command_errbuf; + strcpy(command_errbuf, "no error message"); + cmd = NULL; + result = CMD_ERROR; + + /* search the command set for the command */ + SET_FOREACH(cmdp, Xcommand_set) { + if (((*cmdp)->c_name != NULL) && !strcmp(argv[0], (*cmdp)->c_name)) + cmd = (*cmdp)->c_fn; + } + if (cmd != NULL) { + result = (cmd)(argc, argv); + } else { + command_errmsg = "unknown command"; + } + RETURN(result); } +#endif /* ! BOOT_FORTH */ /* * Interactive mode */ void -interact(void) +interact(const char *rc) { - static char input[256]; /* big enough? */ + static char input[256]; /* big enough? */ +#ifndef BOOT_FORTH + int argc; + char **argv; +#endif - INTERP_INIT(interp); +#ifdef BOOT_FORTH + bf_init((rc) ? "" : NULL); +#endif - /* - * Read our default configuration - */ - INTERP_LOAD_DEF_CONFIG(interp); - printf("\n"); - /* - * Before interacting, we might want to autoboot. - */ - autoboot_maybe(); + if (rc == NULL) { + /* Read our default configuration. */ + include("/boot/loader.rc"); + } else if (*rc != '\0') + include(rc); - /* - * Not autobooting, go manual - */ - printf("\nType '?' for a list of commands, 'help' for more detailed help.\n"); - if (getenv("prompt") == NULL) - setenv("prompt", "${interpret}", 1); - if (getenv("interpret") == NULL) - setenv("interpret", "OK", 1); + printf("\n"); + /* + * Before interacting, we might want to autoboot. + */ + autoboot_maybe(); + + /* + * Not autobooting, go manual + */ + printf("\nType '?' for a list of commands, 'help' for more detailed help.\n"); + if (getenv("prompt") == NULL) + setenv("prompt", "${interpret}", 1); + if (getenv("interpret") == NULL) + setenv("interpret", "OK", 1); + - for (;;) { - input[0] = '\0'; - prompt(); - ngets(input, sizeof(input)); - INTERP_RUN(interp, input); + for (;;) { + input[0] = '\0'; + prompt(); + ngets(input, sizeof(input)); +#ifdef BOOT_FORTH + bf_vm->sourceID.i = 0; + bf_run(input); +#else + if (!parse(&argc, &argv, input)) { + if (perform(argc, argv)) + printf("%s: %s\n", argv[0], command_errmsg); + free(argv); + } else { + printf("parse error\n"); } +#endif + } } /* @@ -106,90 +158,214 @@ COMMAND_SET(include, "include", "read commands from a static int command_include(int argc, char *argv[]) { - int i; - int res; - char **argvbuf; + int i; + int res; + char **argvbuf; - /* - * Since argv is static, we need to save it here. - */ - argvbuf = (char**) calloc((u_int)argc, sizeof(char*)); - for (i = 0; i < argc; i++) - argvbuf[i] = strdup(argv[i]); + /* + * Since argv is static, we need to save it here. + */ + argvbuf = (char**) calloc((u_int)argc, sizeof(char*)); + for (i = 0; i < argc; i++) + argvbuf[i] = strdup(argv[i]); - res=CMD_OK; - for (i = 1; (i < argc) && (res == CMD_OK); i++) - res = INTERP_INCL(interp, argvbuf[i]); + res=CMD_OK; + for (i = 1; (i < argc) && (res == CMD_OK); i++) + res = include(argvbuf[i]); - for (i = 0; i < argc; i++) - free(argvbuf[i]); - free(argvbuf); + for (i = 0; i < argc; i++) + free(argvbuf[i]); + free(argvbuf); - if (res != CMD_OK) - printf("%s", command_errbuf); - - return(res); + return(res); } /* - * Perform the command + * Header prepended to each line. The text immediately follows the header. + * We try to make this short in order to save memory -- the loader has + * limited memory available, and some of the forth files are very long. */ +struct includeline +{ + struct includeline *next; +#ifndef BOOT_FORTH + int flags; + int line; +#define SL_QUIET (1<<0) +#define SL_IGNOREERR (1<<1) +#endif + char text[0]; +}; + int -perform(int argc, char *argv[]) +include(const char *filename) { - int result; - struct bootblk_command **cmdp; - bootblk_cmd_t *cmd; + struct includeline *script, *se, *sp; + char input[256]; /* big enough? */ +#ifdef BOOT_FORTH + int res; + char *cp; + int prevsrcid, fd, line; +#else + int argc,res; + char **argv, *cp; + int fd, flags, line; +#endif - if (argc < 1) - return(CMD_OK); + if (((fd = open(filename, O_RDONLY)) == -1)) { + snprintf(command_errbuf, sizeof(command_errbuf), + "can't open '%s': %s", filename, strerror(errno)); + return(CMD_ERROR); + } - /* set return defaults; a successful command will override these */ - command_errmsg = command_errbuf; - strcpy(command_errbuf, "no error message"); - cmd = NULL; - result = CMD_ERROR; - - /* search the command set for the command */ - SET_FOREACH(cmdp, Xcommand_set) { - if (((*cmdp)->c_name != NULL) && !strcmp(argv[0], (*cmdp)->c_name)) - cmd = (*cmdp)->c_fn; + /* + * Read the script into memory. + */ + script = se = NULL; + line = 0; + + while (fgetstr(input, sizeof(input), fd) >= 0) { + line++; +#ifdef BOOT_FORTH + cp = input; +#else + flags = 0; + /* Discard comments */ + if (strncmp(input+strspn(input, " "), "\\ ", 2) == 0) + continue; + cp = input; + /* Echo? */ + if (input[0] == '@') { + cp++; + flags |= SL_QUIET; } - if (cmd != NULL) { - result = (cmd)(argc, argv); + /* Error OK? */ + if (input[0] == '-') { + cp++; + flags |= SL_IGNOREERR; + } +#endif + /* Allocate script line structure and copy line, flags */ + if (*cp == '\0') + continue; /* ignore empty line, save memory */ + sp = malloc(sizeof(struct includeline) + strlen(cp) + 1); + /* On malloc failure (it happens!), free as much as possible and exit */ + if (sp == NULL) { + while (script != NULL) { + se = script; + script = script->next; + free(se); + } + snprintf(command_errbuf, sizeof(command_errbuf), + "file '%s' line %d: memory allocation failure - aborting", + filename, line); + return (CMD_ERROR); + } + strcpy(sp->text, cp); +#ifndef BOOT_FORTH + sp->flags = flags; + sp->line = line; +#endif + sp->next = NULL; + + if (script == NULL) { + script = sp; } else { - command_errmsg = "unknown command"; + se->next = sp; } - return result; + se = sp; + } + close(fd); + + /* + * Execute the script + */ +#ifndef BOOT_FORTH + argv = NULL; +#else + prevsrcid = bf_vm->sourceID.i; + bf_vm->sourceID.i = fd; +#endif + res = CMD_OK; + for (sp = script; sp != NULL; sp = sp->next) { + +#ifdef BOOT_FORTH + res = bf_run(sp->text); + if (res != VM_OUTOFTEXT) { + snprintf(command_errbuf, sizeof(command_errbuf), + "Error while including %s, in the line:\n%s", + filename, sp->text); + res = CMD_ERROR; + break; + } else + res = CMD_OK; +#else + /* print if not being quiet */ + if (!(sp->flags & SL_QUIET)) { + prompt(); + printf("%s\n", sp->text); + } + + /* Parse the command */ + if (!parse(&argc, &argv, sp->text)) { + if ((argc > 0) && (perform(argc, argv) != 0)) { + /* normal command */ + printf("%s: %s\n", argv[0], command_errmsg); + if (!(sp->flags & SL_IGNOREERR)) { + res=CMD_ERROR; + break; + } + } + free(argv); + argv = NULL; + } else { + printf("%s line %d: parse error\n", filename, sp->line); + res=CMD_ERROR; + break; + } +#endif + } +#ifndef BOOT_FORTH + if (argv != NULL) + free(argv); +#else + bf_vm->sourceID.i = prevsrcid; +#endif + while(script != NULL) { + se = script; + script = script->next; + free(se); + } + return(res); } /* * Emit the current prompt; use the same syntax as the parser * for embedding environment variables. */ -void -prompt(void) +static void +prompt(void) { - char *pr, *p, *cp, *ev; + char *pr, *p, *cp, *ev; + + if ((cp = getenv("prompt")) == NULL) + cp = ">"; + pr = p = strdup(cp); - if ((cp = getenv("prompt")) == NULL) - cp = ">"; - pr = p = strdup(cp); - - while (*p != 0) { - if ((*p == '$') && (*(p+1) == '{')) { - for (cp = p + 2; (*cp != 0) && (*cp != '}'); cp++) - ; - *cp = 0; - ev = getenv(p + 2); - - if (ev != NULL) - printf("%s", ev); - p = cp + 1; - continue; - } - putchar(*p++); + while (*p != 0) { + if ((*p == '$') && (*(p+1) == '{')) { + for (cp = p + 2; (*cp != 0) && (*cp != '}'); cp++) + ; + *cp = 0; + ev = getenv(p + 2); + + if (ev != NULL) + printf("%s", ev); + p = cp + 1; + continue; } - putchar(' '); - free(pr); + putchar(*p++); + } + putchar(' '); + free(pr); } Modified: head/stand/common/interp_forth.c ============================================================================== --- head/stand/common/interp_forth.c Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/common/interp_forth.c Tue Dec 12 22:06:22 2017 (r326812) @@ -1,6 +1,5 @@ /*- * Copyright (c) 1998 Michael Smith - * Copyright (c) 2011 Wojciech A. Koszek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include "bootstrap.h" #include "ficl.h" -#include "interp.h" extern unsigned bootprog_rev; @@ -62,14 +60,9 @@ extern unsigned bootprog_rev; /* * BootForth Interface to Ficl Forth interpreter. */ -struct interp_forth_softc { - FICL_SYSTEM *bf_sys; - FICL_VM *bf_vm; - FICL_WORD *pInterp; -}; -struct interp_forth_softc forth_softc = { NULL, NULL, NULL }; -#define RETURN(x) stackPushINT(bf_vm->pStack,!x); return(x) +FICL_SYSTEM *bf_sys; +FICL_VM *bf_vm; /* * Shim for taking commands from BF and passing them out to 'standard' @@ -78,93 +71,91 @@ struct interp_forth_softc forth_softc = { NULL, NULL, static void bf_command(FICL_VM *vm) { - char *name, *line, *tail, *cp; - size_t len; - struct bootblk_command **cmdp; - bootblk_cmd_t *cmd; - int nstrings, i; - int argc, result; - char **argv; + char *name, *line, *tail, *cp; + size_t len; + struct bootblk_command **cmdp; + bootblk_cmd_t *cmd; + int nstrings, i; + int argc, result; + char **argv; - /* Get the name of the current word */ - name = vm->runningWord->name; + /* Get the name of the current word */ + name = vm->runningWord->name; + + /* Find our command structure */ + cmd = NULL; + SET_FOREACH(cmdp, Xcommand_set) { + if (((*cmdp)->c_name != NULL) && !strcmp(name, (*cmdp)->c_name)) + cmd = (*cmdp)->c_fn; + } + if (cmd == NULL) + panic("callout for unknown command '%s'", name); + + /* Check whether we have been compiled or are being interpreted */ + if (stackPopINT(vm->pStack)) { + /* + * Get parameters from stack, in the format: + * an un ... a2 u2 a1 u1 n -- + * Where n is the number of strings, a/u are pairs of + * address/size for strings, and they will be concatenated + * in LIFO order. + */ + nstrings = stackPopINT(vm->pStack); + for (i = 0, len = 0; i < nstrings; i++) + len += stackFetch(vm->pStack, i * 2).i + 1; + line = malloc(strlen(name) + len + 1); + strcpy(line, name); - /* Find our command structure */ - cmd = NULL; - SET_FOREACH(cmdp, Xcommand_set) { - if (((*cmdp)->c_name != NULL) && !strcmp(name, (*cmdp)->c_name)) - cmd = (*cmdp)->c_fn; + if (nstrings) + for (i = 0; i < nstrings; i++) { + len = stackPopINT(vm->pStack); + cp = stackPopPtr(vm->pStack); + strcat(line, " "); + strncat(line, cp, len); + } + } else { + /* Get remainder of invocation */ + tail = vmGetInBuf(vm); + for (cp = tail, len = 0; cp != vm->tib.end && *cp != 0 && *cp != '\n'; cp++, len++) + ; + + line = malloc(strlen(name) + len + 2); + strcpy(line, name); + if (len > 0) { + strcat(line, " "); + strncat(line, tail, len); + vmUpdateTib(vm, tail + len); } - if (cmd == NULL) - panic("callout for unknown command '%s'", name); + } + DEBUG("cmd '%s'", line); + + command_errmsg = command_errbuf; + command_errbuf[0] = 0; + if (!parse(&argc, &argv, line)) { + result = (cmd)(argc, argv); + free(argv); + } else { + result=BF_PARSE; + } - /* Check whether we have been compiled or are being interpreted */ - if (stackPopINT(vm->pStack)) { - /* - * Get parameters from stack, in the format: - * an un ... a2 u2 a1 u1 n -- - * Where n is the number of strings, a/u are pairs of - * address/size for strings, and they will be concatenated - * in LIFO order. - */ - nstrings = stackPopINT(vm->pStack); - for (i = 0, len = 0; i < nstrings; i++) - len += stackFetch(vm->pStack, i * 2).i + 1; - line = malloc(strlen(name) + len + 1); - strcpy(line, name); + switch (result) { + case CMD_CRIT: + printf("%s\n", command_errmsg); + break; + case CMD_FATAL: + panic("%s\n", command_errmsg); + } - if (nstrings) - for (i = 0; i < nstrings; i++) { - len = stackPopINT(vm->pStack); - cp = stackPopPtr(vm->pStack); - strcat(line, " "); - strncat(line, cp, len); - } - } else { - /* Get remainder of invocation */ - tail = vmGetInBuf(vm); - for (cp = tail, len = 0; cp != vm->tib.end && *cp != 0 && *cp != '\n'; cp++, len++) - ; + free(line); + /* + * If there was error during nested ficlExec(), we may no longer have + * valid environment to return. Throw all exceptions from here. + */ + if (result != CMD_OK) + vmThrow(vm, result); - line = malloc(strlen(name) + len + 2); - strcpy(line, name); - if (len > 0) { - strcat(line, " "); - strncat(line, tail, len); - vmUpdateTib(vm, tail + len); - } - } - DEBUG("cmd '%s'", line); - - command_errmsg = command_errbuf; - command_errbuf[0] = 0; - if (!parse(&argc, &argv, line)) { - result = (cmd)(argc, argv); - free(argv); - } else { - result=BF_PARSE; - } - - /* XXX Not sure about the rest of this -- imp */ - - switch (result) { - case CMD_CRIT: - printf("%s\n", command_errmsg); - break; - case CMD_FATAL: - panic("%s\n", command_errmsg); - } - - free(line); - /* - * If there was error during nested ficlExec(), we may no longer have - * valid environment to return. Throw all exceptions from here. - */ - if (result != CMD_OK) - vmThrow(vm, result); - - /* This is going to be thrown!!! */ - stackPushINT(vm->pStack,result); + /* This is going to be thrown!!! */ + stackPushINT(vm->pStack,result); } /* @@ -258,23 +249,16 @@ bf_command(FICL_VM *vm) /* * Initialise the Forth interpreter, create all our commands as words. */ -static void -interp_forth_init(void *ctx) +void +bf_init(const char *rc) { - struct interp_forth_softc *softc; struct bootblk_command **cmdp; char create_buf[41]; /* 31 characters-long builtins */ - FICL_SYSTEM *bf_sys; - FICL_VM *bf_vm; + int fd; - softc = ctx; + bf_sys = ficlInitSystem(BF_DICTSIZE); + bf_vm = ficlNewVM(bf_sys); - assert((softc->bf_sys == NULL) && (softc->bf_vm == NULL) && - (softc->pInterp == NULL)); /* No Forth context at this stage */ - - bf_sys = softc->bf_sys = ficlInitSystem(BF_DICTSIZE); - bf_vm = softc->bf_vm = ficlNewVM(bf_sys); - /* Put all private definitions in a "builtins" vocabulary */ ficlExec(bf_vm, "vocabulary builtins also builtins definitions"); @@ -294,21 +278,29 @@ interp_forth_init(void *ctx) /* Export some version numbers so that code can detect the loader/host version */ ficlSetEnv(bf_sys, "FreeBSD_version", __FreeBSD_version); ficlSetEnv(bf_sys, "loader_version", bootprog_rev); + + /* try to load and run init file if present */ + if (rc == NULL) + rc = "/boot/boot.4th"; + if (*rc != '\0') { + fd = open(rc, O_RDONLY); + if (fd != -1) { + (void)ficlExecFD(bf_vm, fd); + close(fd); + } + } } /* * Feed a line of user input to the Forth interpreter */ -static int -interp_forth_run(void *ctx, const char *line) +int +bf_run(char *line) { - struct interp_forth_softc *softc; int result; - softc = ctx; + result = ficlExec(bf_vm, line); - result = ficlExec(softc->bf_vm, (char *)line); - DEBUG("ficlExec '%s' = %d", line, result); switch (result) { case VM_OUTOFTEXT: @@ -334,34 +326,7 @@ interp_forth_run(void *ctx, const char *line) if (result == VM_USEREXIT) panic("interpreter exit"); - setenv("interpret", softc->bf_vm->state ? "" : "OK", 1); + setenv("interpret", bf_vm->state ? "" : "OK", 1); return (result); } - -static int -interp_forth_incl(void *ctx, const char *filename) -{ - struct interp_forth_softc *softc; - int fd; - - softc = ctx; - - fd = open(filename, O_RDONLY); - if (fd == -1) { - /* Hihger layers print the error message */ - snprintf(command_errbuf, sizeof(command_errbuf), - "can't open %s\n", filename); - return (CMD_ERROR); - } - return (ficlExecFD(softc->bf_vm, fd)); -} - - -struct interp boot_interp_forth = { - .init = interp_forth_init, - .run = interp_forth_run, - .incl = interp_forth_incl, - .load_configs = default_load_config, - .context = &forth_softc -}; Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/efi/loader/main.c Tue Dec 12 22:06:22 2017 (r326812) @@ -501,7 +501,7 @@ main(int argc, CHAR16 *argv[]) #endif } - interact(); /* doesn't return */ + interact(NULL); /* doesn't return */ return (EFI_SUCCESS); /* keep compiler happy */ } Modified: head/stand/i386/loader/main.c ============================================================================== --- head/stand/i386/loader/main.c Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/i386/loader/main.c Tue Dec 12 22:06:22 2017 (r326812) @@ -232,7 +232,7 @@ main(void) bios_getsmap(); - interact(); + interact(NULL); /* if we ever get here, it is an error */ return (1); Modified: head/stand/loader.mk ============================================================================== --- head/stand/loader.mk Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/loader.mk Tue Dec 12 22:06:22 2017 (r326812) @@ -59,8 +59,6 @@ SRCS+= pnp.c .if ${MK_FORTH} != "no" SRCS+= interp_forth.c .include "${BOOTSRC}/ficl.mk" -.else -SRCS+= interp_simple.c .endif .if defined(BOOT_PROMPT_123) Modified: head/stand/mips/beri/loader/main.c ============================================================================== --- head/stand/mips/beri/loader/main.c Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/mips/beri/loader/main.c Tue Dec 12 22:06:22 2017 (r326812) @@ -149,7 +149,7 @@ main(int argc, char *argv[], char *envv[], struct boot printf("bootpath=\"%s\"\n", bootpath); #endif - interact(); + interact(NULL); return (0); } Modified: head/stand/ofw/common/main.c ============================================================================== --- head/stand/ofw/common/main.c Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/ofw/common/main.c Tue Dec 12 22:06:22 2017 (r326812) @@ -157,7 +157,7 @@ main(int (*openfirm)(void *)) archsw.arch_readin = ofw_readin; archsw.arch_autoload = ofw_autoload; - interact(); /* doesn't return */ + interact(NULL); /* doesn't return */ OF_exit(); Modified: head/stand/powerpc/kboot/main.c ============================================================================== --- head/stand/powerpc/kboot/main.c Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/powerpc/kboot/main.c Tue Dec 12 22:06:22 2017 (r326812) @@ -122,7 +122,7 @@ main(int argc, const char **argv) setenv("loaddev", bootdev, 1); setenv("LINES", "24", 1); - interact(); /* doesn't return */ + interact(NULL); /* doesn't return */ return (0); } Modified: head/stand/powerpc/ps3/main.c ============================================================================== --- head/stand/powerpc/ps3/main.c Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/powerpc/ps3/main.c Tue Dec 12 22:06:22 2017 (r326812) @@ -140,7 +140,7 @@ main(void) setenv("LINES", "24", 1); setenv("hw.platform", "ps3", 1); - interact(); /* doesn't return */ + interact(NULL); /* doesn't return */ return (0); } Modified: head/stand/sparc64/loader/main.c ============================================================================== --- head/stand/sparc64/loader/main.c Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/sparc64/loader/main.c Tue Dec 12 22:06:22 2017 (r326812) @@ -902,7 +902,7 @@ main(int (*openfirm)(void *)) printf("bootpath=\"%s\"\n", bootpath); /* Give control to the machine independent loader code. */ - interact(); + interact(NULL); return (1); } Modified: head/stand/uboot/common/main.c ============================================================================== --- head/stand/uboot/common/main.c Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/uboot/common/main.c Tue Dec 12 22:06:22 2017 (r326812) @@ -500,7 +500,7 @@ main(int argc, char **argv) archsw.arch_readin = uboot_readin; archsw.arch_autoload = uboot_autoload; - interact(); /* doesn't return */ + interact(NULL); /* doesn't return */ return (0); } Modified: head/stand/userboot/userboot/main.c ============================================================================== --- head/stand/userboot/userboot/main.c Tue Dec 12 20:41:11 2017 (r326811) +++ head/stand/userboot/userboot/main.c Tue Dec 12 22:06:22 2017 (r326812) @@ -142,7 +142,7 @@ loader_main(struct loader_callbacks *cb, void *arg, in if (setjmp(jb)) return; - interact(); /* doesn't return */ + interact(NULL); /* doesn't return */ exit(0); } From owner-svn-src-all@freebsd.org Tue Dec 12 22:08:35 2017 Return-Path: Delivered-To: svn-src-all@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 C5386E86AF3; Tue, 12 Dec 2017 22:08:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ECA375664; Tue, 12 Dec 2017 22:08:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCM8Y9x094405; Tue, 12 Dec 2017 22:08:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCM8YlQ094404; Tue, 12 Dec 2017 22:08:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712122208.vBCM8YlQ094404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 12 Dec 2017 22:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326813 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Commit-Revision: 326813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 22:08:35 -0000 Author: markj Date: Tue Dec 12 22:08:34 2017 New Revision: 326813 URL: https://svnweb.freebsd.org/changeset/base/326813 Log: MFV r326785: 8880 improve DTrace error checking illumos/illumos-gate@2cf374268f3e1c9e9be6367466b183d27632583a https://github.com/illumos/illumos-gate/commit/2cf374268f3e1c9e9be6367466b183d27632583a https://www.illumos.org/issues/8880 Reviewed by: Tim Kordas Reviewed by: Bryan Cantrill Reviewed by: Richard Lowe Approved by: Dan McDonald Author: Jerry Jelinek MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Dec 12 22:06:22 2017 (r326812) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Dec 12 22:08:34 2017 (r326813) @@ -13929,6 +13929,7 @@ dtrace_dof_relocate(dof_hdr_t *dof, dof_sec_t *sec, ui uint64_t udaddr) { uintptr_t daddr = (uintptr_t)dof; + uintptr_t ts_end; dof_relohdr_t *dofr = (dof_relohdr_t *)(uintptr_t)(daddr + sec->dofs_offset); dof_sec_t *ss, *rs, *ts; @@ -13944,6 +13945,7 @@ dtrace_dof_relocate(dof_hdr_t *dof, dof_sec_t *sec, ui ss = dtrace_dof_sect(dof, DOF_SECT_STRTAB, dofr->dofr_strtab); rs = dtrace_dof_sect(dof, DOF_SECT_RELTAB, dofr->dofr_relsec); ts = dtrace_dof_sect(dof, DOF_SECT_NONE, dofr->dofr_tgtsec); + ts_end = (uintptr_t)ts + sizeof (dof_sec_t); if (ss == NULL || rs == NULL || ts == NULL) return (-1); /* dtrace_dof_error() has been called already */ @@ -13967,6 +13969,11 @@ dtrace_dof_relocate(dof_hdr_t *dof, dof_sec_t *sec, ui case DOF_RELO_DOFREL: if (r->dofr_offset >= ts->dofs_size || r->dofr_offset + sizeof (uint64_t) > ts->dofs_size) { + dtrace_dof_error(dof, "bad relocation offset"); + return (-1); + } + + if (taddr >= (uintptr_t)ts && taddr < ts_end) { dtrace_dof_error(dof, "bad relocation offset"); return (-1); } From owner-svn-src-all@freebsd.org Tue Dec 12 22:10:14 2017 Return-Path: Delivered-To: svn-src-all@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 8568FE86BD9; Tue, 12 Dec 2017 22:10:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F21E75814; Tue, 12 Dec 2017 22:10:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCMADMB094532; Tue, 12 Dec 2017 22:10:13 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCMADK8094529; Tue, 12 Dec 2017 22:10:13 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201712122210.vBCMADK8094529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 12 Dec 2017 22:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326814 - in stable/10/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Group: stable-10 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: in stable/10/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Commit-Revision: 326814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 22:10:14 -0000 Author: pfg Date: Tue Dec 12 22:10:12 2017 New Revision: 326814 URL: https://svnweb.freebsd.org/changeset/base/326814 Log: MFC r326282: (by fsu) Remap ENOATTR to ENODATA in the linuxulator. In the linux ENOADATA is frequently #defined as ENOATTR. The change is required for an xattrs support implementation. Modified: stable/10/sys/amd64/linux/linux_sysvec.c stable/10/sys/amd64/linux32/linux32_sysvec.c stable/10/sys/i386/linux/linux_sysvec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/linux/linux_sysvec.c ============================================================================== --- stable/10/sys/amd64/linux/linux_sysvec.c Tue Dec 12 22:08:34 2017 (r326813) +++ stable/10/sys/amd64/linux/linux_sysvec.c Tue Dec 12 22:10:12 2017 (r326814) @@ -147,7 +147,7 @@ static int bsd_to_linux_errno[ELAST + 1] = { -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75,-125, -84, -95, -16, -74, + -6, -6, -43, -42, -75,-125, -84, -61, -16, -74, -72, -67, -71 }; Modified: stable/10/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/10/sys/amd64/linux32/linux32_sysvec.c Tue Dec 12 22:08:34 2017 (r326813) +++ stable/10/sys/amd64/linux32/linux32_sysvec.c Tue Dec 12 22:10:12 2017 (r326814) @@ -146,7 +146,7 @@ static int bsd_to_linux_errno[ELAST + 1] = { -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75,-125, -84, -95, -16, -74, + -6, -6, -43, -42, -75,-125, -84, -61, -16, -74, -72, -67, -71 }; Modified: stable/10/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/10/sys/i386/linux/linux_sysvec.c Tue Dec 12 22:08:34 2017 (r326813) +++ stable/10/sys/i386/linux/linux_sysvec.c Tue Dec 12 22:10:12 2017 (r326814) @@ -145,7 +145,7 @@ static int bsd_to_linux_errno[ELAST + 1] = { -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75,-125, -84, -95, -16, -74, + -6, -6, -43, -42, -75,-125, -84, -61, -16, -74, -72, -67, -71 }; From owner-svn-src-all@freebsd.org Tue Dec 12 22:21:22 2017 Return-Path: Delivered-To: svn-src-all@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 1B58AE86FFB; Tue, 12 Dec 2017 22:21:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA0EB75F14; Tue, 12 Dec 2017 22:21:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBCMLKdN099347; Tue, 12 Dec 2017 22:21:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBCMLK1s099346; Tue, 12 Dec 2017 22:21:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712122221.vBCMLK1s099346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 12 Dec 2017 22:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326815 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 326815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 22:21:22 -0000 Author: dim Date: Tue Dec 12 22:21:20 2017 New Revision: 326815 URL: https://svnweb.freebsd.org/changeset/base/326815 Log: Follow-up to r325967, which removed /etc/casper, by also removing it from BSD.root.dist, so it does not get created again on installworld. Modified: head/etc/mtree/BSD.root.dist Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Tue Dec 12 22:10:12 2017 (r326814) +++ head/etc/mtree/BSD.root.dist Tue Dec 12 22:21:20 2017 (r326815) @@ -30,8 +30,6 @@ .. bluetooth .. - casper - .. cron.d .. defaults From owner-svn-src-all@freebsd.org Tue Dec 12 17:32:37 2017 Return-Path: Delivered-To: svn-src-all@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 40B3BEA00E6; Tue, 12 Dec 2017 17:32:37 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A96E677A6; Tue, 12 Dec 2017 17:32:36 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBCHW5bu087313; Tue, 12 Dec 2017 09:32:05 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBCHW5UR087312; Tue, 12 Dec 2017 09:32:05 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712121732.vBCHW5UR087312@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326758 - in head/sys/i386: conf include In-Reply-To: <9484a39c-21f1-9174-11ce-54088c3f6099@FreeBSD.org> To: Andriy Gapon Date: Tue, 12 Dec 2017 09:32:05 -0800 (PST) CC: rgrimes@freebsd.org, Eugene Grosbein , Don Lewis , Alexey Dokuchaev , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Mailman-Approved-At: Tue, 12 Dec 2017 23:16:21 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 17:32:37 -0000 [ Charset UTF-8 unsupported, converting... ] > On 12/12/2017 19:01, Rodney W. Grimes wrote: > > We should probably start looking for those, something someone who is > > offerring help but doesnt know what they might be good at, but can > > read C code. They could be utililized t simply scan through the > > code looking for this type of thing and bring it to the attention > > of a area of expertise commiter. > > By the way, there are tools that can analyze binary code (e.g. a kernel binary > or a module) and determine stack requirements of each function. I think that > debug symbols might be required too. That would be an even better first start, even if it just could tell us what the local var stack space request of each function was that might point out some easly low hanging fruit. Can it also tell us how big the call frame is? > > I am not sure if there are tools that can analyze stack requirements for > possible call chains rather than individual functions. Call graphs can be used to find deep chains. Combine the above with a call graph and we should be able to come up with some data. This also sounds like a good caniate for GSOC, creation of a call graph with static analysis of local variable size + call frame size requirements as a O(1) stack space estimator. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Dec 12 20:43:50 2017 Return-Path: Delivered-To: svn-src-all@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 0C695E846F5; Tue, 12 Dec 2017 20:43:50 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C78D572423; Tue, 12 Dec 2017 20:43:49 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBCKhI6I088372; Tue, 12 Dec 2017 12:43:18 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBCKhIsD088371; Tue, 12 Dec 2017 12:43:18 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712122043.vBCKhIsD088371@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326758 - in head/sys/i386: conf include In-Reply-To: <5A302DF7.1090706@grosbein.net> To: Eugene Grosbein Date: Tue, 12 Dec 2017 12:43:18 -0800 (PST) CC: rgrimes@freebsd.org, Andriy Gapon , Don Lewis , Alexey Dokuchaev , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Mailman-Approved-At: Wed, 13 Dec 2017 01:20:15 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 20:43:50 -0000 > On 13.12.2017 00:32, Rodney W. Grimes wrote: > > >> I am not sure if there are tools that can analyze stack requirements for > >> possible call chains rather than individual functions. > > > > Call graphs can be used to find deep chains. Combine the above > > with a call graph and we should be able to come up with some > > data. > > > > This also sounds like a good caniate for GSOC, creation > > of a call graph with static analysis of local variable size + > > call frame size requirements as a O(1) stack space estimator. > > "Longitude" of call chain greatly depends of run-time system configuration. > For example, application sendto() call can result in variable number > of system calls performing IPSEC transformations (ESP, AH, IPCOMP) > then custom PFIL processing then multiple NETGRAPH calls then complex > WiFi stack operations and each of such calls can result in kernel stack exhaustion. That was why I expressed it as an O(1) estimator. Attempting to do this more complex problem you describe would probably best be left to dtrace and some coverage metrics to make sure we hit most of the paths. At this time I don't think we need that. I think what you did with your very quick turn around of the simple static data is probably going to lead to rapid closure of the problem, or at least greatly reduce it. Or are you thinking we have something that is so deep even if it only uses 32 bytes of stack we are going to run ourselfs out of kstack under some work loads? I hope not. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Dec 13 03:36:35 2017 Return-Path: Delivered-To: svn-src-all@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 1EA47E8F716; Wed, 13 Dec 2017 03:36:35 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E000B8076D; Wed, 13 Dec 2017 03:36:34 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBD3aXCb031275; Wed, 13 Dec 2017 03:36:33 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBD3aXKT031273; Wed, 13 Dec 2017 03:36:33 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712130336.vBD3aXKT031273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 13 Dec 2017 03:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326816 - head/usr.bin/find X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/find X-SVN-Commit-Revision: 326816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 03:36:35 -0000 Author: eadler Date: Wed Dec 13 03:36:33 2017 New Revision: 326816 URL: https://svnweb.freebsd.org/changeset/base/326816 Log: find(1): remove unused variable Modified: head/usr.bin/find/extern.h head/usr.bin/find/main.c Modified: head/usr.bin/find/extern.h ============================================================================== --- head/usr.bin/find/extern.h Tue Dec 12 22:21:20 2017 (r326815) +++ head/usr.bin/find/extern.h Wed Dec 13 03:36:33 2017 (r326816) @@ -116,7 +116,7 @@ exec_f f_sparse; exec_f f_type; exec_f f_user; -extern int ftsoptions, ignore_readdir_race, isdeprecated, isdepth, isoutput; +extern int ftsoptions, ignore_readdir_race, isdepth, isoutput; extern int issort, isxargs; extern int mindepth, maxdepth; extern int regexp_flags; Modified: head/usr.bin/find/main.c ============================================================================== --- head/usr.bin/find/main.c Tue Dec 12 22:21:20 2017 (r326815) +++ head/usr.bin/find/main.c Wed Dec 13 03:36:33 2017 (r326816) @@ -67,7 +67,6 @@ time_t now; /* time find was run */ int dotfd; /* starting directory */ int ftsoptions; /* options for the ftsopen(3) call */ int ignore_readdir_race; /* ignore readdir race */ -int isdeprecated; /* using deprecated syntax */ int isdepth; /* do directories on post-order visit */ int isoutput; /* user specified output operator */ int issort; /* do hierarchies in lexicographical order */ From owner-svn-src-all@freebsd.org Wed Dec 13 06:17:21 2017 Return-Path: Delivered-To: svn-src-all@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 78DA2E9295B; Wed, 13 Dec 2017 06:17:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4239863ABF; Wed, 13 Dec 2017 06:17:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBD6HKhd097300; Wed, 13 Dec 2017 06:17:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBD6HKlg097299; Wed, 13 Dec 2017 06:17:20 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712130617.vBD6HKlg097299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 13 Dec 2017 06:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326817 - stable/11/usr.bin/ipcs X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/usr.bin/ipcs X-SVN-Commit-Revision: 326817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 06:17:21 -0000 Author: delphij Date: Wed Dec 13 06:17:20 2017 New Revision: 326817 URL: https://svnweb.freebsd.org/changeset/base/326817 Log: MFC r326361: Remove unused include. Modified: stable/11/usr.bin/ipcs/ipc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/ipcs/ipc.c ============================================================================== --- stable/11/usr.bin/ipcs/ipc.c Wed Dec 13 03:36:33 2017 (r326816) +++ stable/11/usr.bin/ipcs/ipc.c Wed Dec 13 06:17:20 2017 (r326817) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "ipc.h" From owner-svn-src-all@freebsd.org Wed Dec 13 06:20:19 2017 Return-Path: Delivered-To: svn-src-all@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 F337FE92A6A; Wed, 13 Dec 2017 06:20:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF29A63C42; Wed, 13 Dec 2017 06:20:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBD6KI6m097464; Wed, 13 Dec 2017 06:20:18 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBD6KIrY097463; Wed, 13 Dec 2017 06:20:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712130620.vBD6KIrY097463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 13 Dec 2017 06:20:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326818 - stable/10/usr.bin/ipcs X-SVN-Group: stable-10 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/10/usr.bin/ipcs X-SVN-Commit-Revision: 326818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 06:20:20 -0000 Author: delphij Date: Wed Dec 13 06:20:18 2017 New Revision: 326818 URL: https://svnweb.freebsd.org/changeset/base/326818 Log: MFC r326361: Remove unused include. Modified: stable/10/usr.bin/ipcs/ipc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ipcs/ipc.c ============================================================================== --- stable/10/usr.bin/ipcs/ipc.c Wed Dec 13 06:17:20 2017 (r326817) +++ stable/10/usr.bin/ipcs/ipc.c Wed Dec 13 06:20:18 2017 (r326818) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "ipc.h" From owner-svn-src-all@freebsd.org Wed Dec 13 06:54:45 2017 Return-Path: Delivered-To: svn-src-all@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 0913CE933E2; Wed, 13 Dec 2017 06:54:45 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D3514649D6; Wed, 13 Dec 2017 06:54:44 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 234FC1E887; Wed, 13 Dec 2017 06:54:44 +0000 (UTC) Date: Wed, 13 Dec 2017 06:54:44 +0000 From: Alexey Dokuchaev To: rgrimes@freebsd.org Cc: Warner Losh , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r326809 - head/sys/dev/cardbus Message-ID: <20171213065443.GA31341@FreeBSD.org> References: <201712122022.vBCKM9Kd050769@repo.freebsd.org> <201712122039.vBCKdcV8088346@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201712122039.vBCKdcV8088346@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 06:54:45 -0000 On Tue, Dec 12, 2017 at 12:39:38PM -0800, Rodney W. Grimes wrote: > > New Revision: 326809 > > URL: https://svnweb.freebsd.org/changeset/base/326809 > > > > Log: > > 1k objects on the stack are a bad idea. While it's likely safe in this > > context, it's also safe to allocate the memory and free it instead. > > > > Noticed by: Eugene Grosbein's script > > YEA!!! One down, 20 to go and then see how the kstack issue does? > > And thank you for quickly fixing this. It's very promising to see debloat-type of work having started. On the related note, what is current consensus with r326758, is it going to be backed out and stack issues investigated and fixed? I am worried since kib@ had mentioned that he's "almost sure that [32-bit x86 workstation] users would get troubles now" [*] and I'm one of them. ./danfe [*] https://lists.freebsd.org/pipermail/svn-src-head/2017-December/107237.html From owner-svn-src-all@freebsd.org Wed Dec 13 06:56:35 2017 Return-Path: Delivered-To: svn-src-all@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 2EB28E934BC for ; Wed, 13 Dec 2017 06:56:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (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 E2F2064B3C for ; Wed, 13 Dec 2017 06:56:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22d.google.com with SMTP id p139so2666582itb.1 for ; Tue, 12 Dec 2017 22:56:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Rzemg23Q89dyLrBXF3q0+X2ppxAwHLeBsYy+ADKnRO0=; b=Ypijl/rSWaYyqhEs6Dm2R5RRljVH0W8aBIM0DxigS4K38fJEM2euxo/huuLndiSs2X KxVTInq+TOVl2MeCaV2YnqwwMOO+MSaCumrKFc86GfTrk4BopBMBiKLIhEV9cQVD3q5Q zBfPPjF54QxvWLJjtiUF2Kxegldu9/cjqmQ8cCiYTfIG1iTV6BKDxiZLvXwqx4g49NJH uSFTtrTEWw7bcvGS3k59R3v78NB7nAWBA2Z8Fbuq040wwn4S6io6Iu3X3OlopK7oqrtQ BcgxuT0que4jd9QTIehZ+HAX1n5it9sogJiwml9w9+ZPcx++SJJJGXexsvoLvqxkNXlz hzoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Rzemg23Q89dyLrBXF3q0+X2ppxAwHLeBsYy+ADKnRO0=; b=EVAcgPz7pWMx5Btt1nwArXoppNQU6Ovv9o9hTXsHqe0HdLXXJAfpcKtA6fxu4SGL2z oCzCwvpDECBaGLNZ/zFp6XTpa5SiTbYQhlOJdRw1L3GTyAjRHSPijUeBUTJMe1CiUbp+ PIPq6u9uod+NpEOqXsSNz0aFonnldH8ZyT/RKT9nj/GSQvcZmv3QLpnkrfpgEgFflD9h SEDXlQnuSuyMBpF5pHheNLMPap5EUbH66DPYSIbjcxSnPXWQOROeBJJfdAZQ+lh2/UNO ZD7GMze1FmMZEWdBJmVogHAjG23k6j2bwjxaKcmwGdPjKSqHh02cKvka4hNG23AN1b89 Sqzw== X-Gm-Message-State: AKGB3mIsc4LOBv9rwNfRNtUaTN+kXts+Q1k+2gUOGOPXeXXvMG9/vH2O BU9si25U9WQv0/hA0dLeju7/PVdUSaILkk5jNqqQ5A== X-Google-Smtp-Source: ACJfBoviIArlRpylhDhB2f5Mg1y4DTN3kTjbGdEmV1FK+isnOASd/RRC4Abr3qcDr4N4XRUKWV14WceH8kgnRtpuoqM= X-Received: by 10.36.164.13 with SMTP id z13mr1791038ite.115.1513148194033; Tue, 12 Dec 2017 22:56:34 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Tue, 12 Dec 2017 22:56:33 -0800 (PST) X-Originating-IP: [12.227.204.186] In-Reply-To: <20171213065443.GA31341@FreeBSD.org> References: <201712122022.vBCKM9Kd050769@repo.freebsd.org> <201712122039.vBCKdcV8088346@pdx.rh.CN85.dnsmgr.net> <20171213065443.GA31341@FreeBSD.org> From: Warner Losh Date: Wed, 13 Dec 2017 06:56:33 +0000 X-Google-Sender-Auth: ZqeFiHPIBHtH6QDVz1e7KIHwmNo Message-ID: Subject: Re: svn commit: r326809 - head/sys/dev/cardbus To: Alexey Dokuchaev Cc: "Rodney W. Grimes" , Warner Losh , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 06:56:35 -0000 On Wed, Dec 13, 2017 at 6:54 AM, Alexey Dokuchaev wrote: > On Tue, Dec 12, 2017 at 12:39:38PM -0800, Rodney W. Grimes wrote: > > > New Revision: 326809 > > > URL: https://svnweb.freebsd.org/changeset/base/326809 > > > > > > Log: > > > 1k objects on the stack are a bad idea. While it's likely safe in > this > > > context, it's also safe to allocate the memory and free it instead. > > > > > > Noticed by: Eugene Grosbein's script > > > > YEA!!! One down, 20 to go and then see how the kstack issue does? > > > > And thank you for quickly fixing this. > > It's very promising to see debloat-type of work having started. On the > related note, what is current consensus with r326758, is it going to be > backed out and stack issues investigated and fixed? I am worried since > kib@ had mentioned that he's "almost sure that [32-bit x86 workstation] > users would get troubles now" [*] and I'm one of them. > I have fixes for 2 or 3 cam ones, and plans to fix another 3 or 4 of the remaining ones which are easy. Warner From owner-svn-src-all@freebsd.org Wed Dec 13 07:07:29 2017 Return-Path: Delivered-To: svn-src-all@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 1BC11E93829; Wed, 13 Dec 2017 07:07:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9E7A6508D; Wed, 13 Dec 2017 07:07:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBD77Sbb017906; Wed, 13 Dec 2017 07:07:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBD77S3o017905; Wed, 13 Dec 2017 07:07:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712130707.vBD77S3o017905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 13 Dec 2017 07:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326819 - head/sys/cam/ata X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/ata X-SVN-Commit-Revision: 326819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 07:07:29 -0000 Author: imp Date: Wed Dec 13 07:07:27 2017 New Revision: 326819 URL: https://svnweb.freebsd.org/changeset/base/326819 Log: Use ataio ccb instead of general ccb to avoid excessice stack usage. Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Dec 13 06:20:18 2017 (r326818) +++ head/sys/cam/ata/ata_da.c Wed Dec 13 07:07:27 2017 (r326819) @@ -1048,7 +1048,7 @@ adadump(void *arg, void *virtual, vm_offset_t physical struct cam_periph *periph; struct ada_softc *softc; u_int secsize; - union ccb ccb; + struct ccb_ataio ataio; struct disk *dp; uint64_t lba; uint16_t count; @@ -1067,11 +1067,11 @@ adadump(void *arg, void *virtual, vm_offset_t physical return (ENXIO); } - memset(&ccb, 0, sizeof(ccb)); + memset(&ataio, 0, sizeof(ataio)); if (length > 0) { - xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - ccb.ccb_h.ccb_state = ADA_CCB_DUMP; - cam_fill_ataio(&ccb.ataio, + xpt_setup_ccb(&ataio.ccb_h, periph->path, CAM_PRIORITY_NORMAL); + ataio.ccb_h.ccb_state = ADA_CCB_DUMP; + cam_fill_ataio(&ataio, 0, adadone, CAM_DIR_OUT, @@ -1082,13 +1082,13 @@ adadump(void *arg, void *virtual, vm_offset_t physical if ((softc->flags & ADA_FLAG_CAN_48BIT) && (lba + count >= ATA_MAX_28BIT_LBA || count >= 256)) { - ata_48bit_cmd(&ccb.ataio, ATA_WRITE_DMA48, + ata_48bit_cmd(&ataio, ATA_WRITE_DMA48, 0, lba, count); } else { - ata_28bit_cmd(&ccb.ataio, ATA_WRITE_DMA, + ata_28bit_cmd(&ataio, ATA_WRITE_DMA, 0, lba, count); } - error = cam_periph_runccb(&ccb, adaerror, + error = cam_periph_runccb((union ccb *)&ataio, adaerror, 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); if (error != 0) printf("Aborting dump due to I/O error.\n"); @@ -1098,15 +1098,15 @@ adadump(void *arg, void *virtual, vm_offset_t physical } if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) { - xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&ataio.ccb_h, periph->path, CAM_PRIORITY_NORMAL); /* * Tell the drive to flush its internal cache. if we * can't flush in 5s we have big problems. No need to * wait the default 60s to detect problems. */ - ccb.ccb_h.ccb_state = ADA_CCB_DUMP; - cam_fill_ataio(&ccb.ataio, + ataio.ccb_h.ccb_state = ADA_CCB_DUMP; + cam_fill_ataio(&ataio, 0, adadone, CAM_DIR_NONE, @@ -1116,10 +1116,10 @@ adadump(void *arg, void *virtual, vm_offset_t physical 5*1000); if (softc->flags & ADA_FLAG_CAN_48BIT) - ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0); + ata_48bit_cmd(&ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); - error = cam_periph_runccb(&ccb, adaerror, + ata_28bit_cmd(&ataio, ATA_FLUSHCACHE, 0, 0, 0); + error = cam_periph_runccb((union ccb *)&ataio, adaerror, 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); if (error != 0) xpt_print(periph->path, "Synchronize cache failed\n"); From owner-svn-src-all@freebsd.org Wed Dec 13 11:32:09 2017 Return-Path: Delivered-To: svn-src-all@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 49E12E9AB5E; Wed, 13 Dec 2017 11:32:09 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D58746CE77; Wed, 13 Dec 2017 11:32:08 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBDBW4b2025222 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2017 12:32:04 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: rgrimes@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBDBW08Y070047 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 13 Dec 2017 18:32:00 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: rgrimes@freebsd.org References: <201712122043.vBCKhIsD088371@pdx.rh.CN85.dnsmgr.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Conrad Meyer From: Eugene Grosbein Message-ID: <5A310FAC.80305@grosbein.net> Date: Wed, 13 Dec 2017 18:31:56 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201712122043.vBCKhIsD088371@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS * 2.6 LOCAL_FROM From my domains X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 11:32:09 -0000 13.12.2017 3:43, Rodney W. Grimes wrote: > Or are you thinking we have something that is so deep even if it > only uses 32 bytes of stack we are going to run ourselfs out of > kstack under some work loads? I hope not. No, I'm not. From owner-svn-src-all@freebsd.org Wed Dec 13 12:47:22 2017 Return-Path: Delivered-To: svn-src-all@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 D090AE9D2A2; Wed, 13 Dec 2017 12:47:22 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id A05116F535; Wed, 13 Dec 2017 12:47:22 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from [IPv6:2001:630:212:2a8:c15a:e5b1:31ad:6576] (unknown [IPv6:2001:630:212:2a8:c15a:e5b1:31ad:6576]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id BB5AA4EBCD; Wed, 13 Dec 2017 12:46:50 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: Re: svn commit: r326808 - head/sys/kern From: Andrew Turner In-Reply-To: <201712122015.vBCKFvNk047250@repo.freebsd.org> Date: Wed, 13 Dec 2017 12:46:49 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <87732030-061F-43FB-94D7-4DB6F6558A4B@fubar.geek.nz> References: <201712122015.vBCKFvNk047250@repo.freebsd.org> To: Fedor Uporov X-Mailer: Apple Mail (2.3445.4.7) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 12:47:22 -0000 > On 12 Dec 2017, at 20:15, Fedor Uporov wrote: >=20 > Author: fsu > Date: Tue Dec 12 20:15:57 2017 > New Revision: 326808 > URL: https://svnweb.freebsd.org/changeset/base/326808 >=20 > Log: > Move buffer size checks outside of the vnode locks. >=20 > Reviewed by: kib, cem, pfg (mentor) > Approved by: pfg (mentor) > MFC after: 1 weeks >=20 > Differential Revision: https://reviews.freebsd.org/D13405 This breaks the build when MAC is undefined, e.g. the armv7 GENERIC = kernel. /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:201:1: = error: unused label 'done' [-Werror,-Wunused-label] done: ^~~~~ /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:376:1: = error: unused label 'done' [-Werror,-Wunused-label] done: ^~~~~ /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:677:1: = error: unused label 'done' [-Werror,-Wunused-label] done: ^~~~~ 3 errors generated. Andrew From owner-svn-src-all@freebsd.org Wed Dec 13 13:04:23 2017 Return-Path: Delivered-To: svn-src-all@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 67D94E9D8EB; Wed, 13 Dec 2017 13:04:23 +0000 (UTC) (envelope-from thisisadrgreenthumb@gmail.com) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) (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 F00106FDC8; Wed, 13 Dec 2017 13:04:22 +0000 (UTC) (envelope-from thisisadrgreenthumb@gmail.com) Received: by mail-wm0-f45.google.com with SMTP id f140so4954143wmd.2; Wed, 13 Dec 2017 05:04:22 -0800 (PST) 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=+KgFBKLGFG9YrOkQo2msKqoc3bAo5GXJwq4OvHLHF8k=; b=C/r+7rpyX0oAeXEPQtkHrcq3nHhevfBRPRXknnKfmNdJoBO3dHRV/qAewOCxheYePi v30T9C2ZFV40XIuXHX2j7PGy8qRwS2t8peVnwcQ6PMaPMjMmK15y5nGSEMNLPAJwzKpT 8GCWpA4M4klq4FCkTjdb6feredPFQJw5kftstO3FhC+XKuhCd26dVkbIQAmMPZL/6IDB BqW/hGOLMKZTtywELCzZx6vmGSLh4e33v2IsjQ80R+LC8TM2ezPcyVmJH2hZ+FZAfNhr JkOYZtLWneE1NirWe7Jl4pzk24J6yJ3PIn4iIL3JW9cZJoPxEp6QTa69YiZmijHxdSY0 N8Fw== X-Gm-Message-State: AKGB3mK4CR/k6P/sWqiOWkXuPZR+R3NVN7P4j8Yx7OT1pC7TrFKajpXs wEZtBYAWOId6oQlyxS4p4+yrDcjkFXc= X-Google-Smtp-Source: ACJfBot71nqn2gg82ScS6T7zfqgOXh103JYQSId3C2IQZJCdgPMwLDO27MA4YkQN8rLUJ3eG4zYSWw== X-Received: by 10.80.204.72 with SMTP id n8mr7486322edi.64.1513169896752; Wed, 13 Dec 2017 04:58:16 -0800 (PST) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com. [74.125.82.54]) by smtp.gmail.com with ESMTPSA id c33sm1332828edd.36.2017.12.13.04.58.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Dec 2017 04:58:16 -0800 (PST) Received: by mail-wm0-f54.google.com with SMTP id t8so4827242wmc.3; Wed, 13 Dec 2017 04:58:16 -0800 (PST) X-Received: by 10.80.170.136 with SMTP id q8mr7505122edc.134.1513169896376; Wed, 13 Dec 2017 04:58:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.231.1 with HTTP; Wed, 13 Dec 2017 04:58:15 -0800 (PST) In-Reply-To: <87732030-061F-43FB-94D7-4DB6F6558A4B@fubar.geek.nz> References: <201712122015.vBCKFvNk047250@repo.freebsd.org> <87732030-061F-43FB-94D7-4DB6F6558A4B@fubar.geek.nz> From: Fedor Uporov Date: Wed, 13 Dec 2017 13:58:15 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326808 - head/sys/kern To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 13:04:23 -0000 Hi, Andrew. Thanks for report, I know about the issue. Just, need to get back home to my laptop to fix it. Need 2-4 hours. On Wed, Dec 13, 2017 at 1:46 PM, Andrew Turner wrote: > > > On 12 Dec 2017, at 20:15, Fedor Uporov wrote: > > > > Author: fsu > > Date: Tue Dec 12 20:15:57 2017 > > New Revision: 326808 > > URL: https://svnweb.freebsd.org/changeset/base/326808 > > > > Log: > > Move buffer size checks outside of the vnode locks. > > > > Reviewed by: kib, cem, pfg (mentor) > > Approved by: pfg (mentor) > > MFC after: 1 weeks > > > > Differential Revision: https://reviews.freebsd.org/D13405 > > This breaks the build when MAC is undefined, e.g. the armv7 GENERIC kernel. > > /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:201:1: > error: unused label 'done' [-Werror,-Wunused-label] > done: > ^~~~~ > /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:376:1: > error: unused label 'done' [-Werror,-Wunused-label] > done: > ^~~~~ > /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:677:1: > error: unused label 'done' [-Werror,-Wunused-label] > done: > ^~~~~ > 3 errors generated. > > Andrew > > From owner-svn-src-all@freebsd.org Wed Dec 13 13:38:19 2017 Return-Path: Delivered-To: svn-src-all@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 B6EEAE9E60E; Wed, 13 Dec 2017 13:38:19 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 802B170D66; Wed, 13 Dec 2017 13:38:19 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBDDcHiP091866; Wed, 13 Dec 2017 05:38:17 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBDDcHCM091865; Wed, 13 Dec 2017 05:38:17 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326809 - head/sys/dev/cardbus In-Reply-To: <20171213065443.GA31341@FreeBSD.org> To: Alexey Dokuchaev Date: Wed, 13 Dec 2017 05:38:17 -0800 (PST) CC: rgrimes@freebsd.org, Warner Losh , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 13:38:19 -0000 > On Tue, Dec 12, 2017 at 12:39:38PM -0800, Rodney W. Grimes wrote: > > > New Revision: 326809 > > > URL: https://svnweb.freebsd.org/changeset/base/326809 > > > > > > Log: > > > 1k objects on the stack are a bad idea. While it's likely safe in this > > > context, it's also safe to allocate the memory and free it instead. > > > > > > Noticed by: Eugene Grosbein's script > > > > YEA!!! One down, 20 to go and then see how the kstack issue does? > > > > And thank you for quickly fixing this. > > It's very promising to see debloat-type of work having started. On the > related note, what is current consensus with r326758, is it going to be > backed out and stack issues investigated and fixed? I am worried since > kib@ had mentioned that he's "almost sure that [32-bit x86 workstation] > users would get troubles now" [*] and I'm one of them. That I can not answer, but I can say I have just found the problem is NOT limited to i386, we can rather quickly blow up an amd64 system running a dozen or so VM's. My bhyve host tossed a stack of these out last night: vm_thread_new: kstack allocation failed vm_thread_new: kstack allocation failed vm_thread_new: kstack allocation failed vm_thread_new: kstack allocation failed vm_thread_new: kstack allocation failed vm_thread_new: kstack allocation failed vm_thread_new: kstack allocation failed vm_thread_new: kstack allocation failed vm_thread_new: kstack allocation failed vm_thread_new: kstack allocation failed ZFS has been tuned to leave 1.2* my total VM allocations free space of memory and I only had 10 out of 16 vm's running last night, so there is tons of free memory. This is probalby KVA space starvation, though I thought that was pretty much a non issue on amd64. I do think we should back out r326758 sooner rather than later, and if it got MFC'd or flagged for MFC kill that right now. A regression test would also be nice that can push the system close to what the usable limit is, and that test should be run in a CI situtaion to make sure we keep it running. This is a non trivial to do though as there are many work load patterns that can push the kernel towards stack space limits. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Dec 13 13:44:36 2017 Return-Path: Delivered-To: svn-src-all@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 579A5E9E92E; Wed, 13 Dec 2017 13:44:36 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E85F711EC; Wed, 13 Dec 2017 13:44:35 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBDDiYhj091914; Wed, 13 Dec 2017 05:44:34 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBDDiYOp091913; Wed, 13 Dec 2017 05:44:34 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712131344.vBDDiYOp091913@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326809 - head/sys/dev/cardbus In-Reply-To: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org Date: Wed, 13 Dec 2017 05:44:34 -0800 (PST) CC: Alexey Dokuchaev , Warner Losh , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 13:44:36 -0000 > > On Tue, Dec 12, 2017 at 12:39:38PM -0800, Rodney W. Grimes wrote: > > > > New Revision: 326809 > > > > URL: https://svnweb.freebsd.org/changeset/base/326809 > > > > > > > > Log: > > > > 1k objects on the stack are a bad idea. While it's likely safe in this > > > > context, it's also safe to allocate the memory and free it instead. > > > > > > > > Noticed by: Eugene Grosbein's script > > > > > > YEA!!! One down, 20 to go and then see how the kstack issue does? > > > > > > And thank you for quickly fixing this. > > > > It's very promising to see debloat-type of work having started. On the > > related note, what is current consensus with r326758, is it going to be > > backed out and stack issues investigated and fixed? I am worried since > > kib@ had mentioned that he's "almost sure that [32-bit x86 workstation] > > users would get troubles now" [*] and I'm one of them. > > That I can not answer, but I can say I have just found the problem > is NOT limited to i386, we can rather quickly blow up an amd64 system > running a dozen or so VM's. > > My bhyve host tossed a stack of these out last night: > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed Ok, ignore this, the console was connected to a vm, these messages are infact from a vm running i386 11.1, just upgraded from 11.0 to 11.1 so even between that step there is a regression as I did not have these on the 11.0 system. > ZFS has been tuned to leave 1.2* my total VM allocations free space > of memory and I only had 10 out of 16 vm's running last night, so > there is tons of free memory. This is probalby KVA space starvation, > though I thought that was pretty much a non issue on amd64. > > I do think we should back out r326758 sooner rather than later, > and if it got MFC'd or flagged for MFC kill that right now. > > A regression test would also be nice that can push the system > close to what the usable limit is, and that test should be run > in a CI situtaion to make sure we keep it running. This is a > non trivial to do though as there are many work load patterns > that can push the kernel towards stack space limits. > > -- > Rod Grimes rgrimes@freebsd.org -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Dec 13 14:08:35 2017 Return-Path: Delivered-To: svn-src-all@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 12C47E9F777; Wed, 13 Dec 2017 14:08:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D07E5722DD; Wed, 13 Dec 2017 14:08:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDE8XnP092979; Wed, 13 Dec 2017 14:08:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDE8Xs7092978; Wed, 13 Dec 2017 14:08:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201712131408.vBDE8Xs7092978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 13 Dec 2017 14:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326820 - head/sbin/growfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sbin/growfs X-SVN-Commit-Revision: 326820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 14:08:35 -0000 Author: trasz Date: Wed Dec 13 14:08:33 2017 New Revision: 326820 URL: https://svnweb.freebsd.org/changeset/base/326820 Log: Tone down the description for the growfs "-y" flag. MFC after: 2 weeks Modified: head/sbin/growfs/growfs.8 Modified: head/sbin/growfs/growfs.8 ============================================================================== --- head/sbin/growfs/growfs.8 Wed Dec 13 07:07:27 2017 (r326819) +++ head/sbin/growfs/growfs.8 Wed Dec 13 14:08:33 2017 (r326820) @@ -37,7 +37,7 @@ .\" $TSHeader: src/sbin/growfs/growfs.8,v 1.3 2000/12/12 19:31:00 tomsoft Exp $ .\" $FreeBSD$ .\" -.Dd May 10, 2016 +.Dd December 13, 2017 .Dt GROWFS 8 .Os .Sh NAME @@ -68,16 +68,10 @@ The following options are available: Causes the new file system parameters to be printed out without actually enlarging the file system. .It Fl y -.Dq Expert mode . -Usually +Causes .Nm -will ask you if you took a backup of your data before and will do some tests -whether -.Ar special -is currently mounted or whether there are any active snapshots on the file -system specified. -This will be suppressed. -So use this option with great care! +to assume yes +as the answer to all operator questions. .It Fl s Ar size Determines the .Ar size From owner-svn-src-all@freebsd.org Wed Dec 13 15:20:12 2017 Return-Path: Delivered-To: svn-src-all@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 5CDF7EA1666; Wed, 13 Dec 2017 15:20:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27DD974BC2; Wed, 13 Dec 2017 15:20:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDFKBYE023024; Wed, 13 Dec 2017 15:20:11 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDFKBtH023023; Wed, 13 Dec 2017 15:20:11 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712131520.vBDFKBtH023023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 13 Dec 2017 15:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326821 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 326821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 15:20:12 -0000 Author: markj Date: Wed Dec 13 15:20:11 2017 New Revision: 326821 URL: https://svnweb.freebsd.org/changeset/base/326821 Log: MFC r326629: Use unique wait messages in the page daemon control loop. Modified: stable/11/sys/vm/vm_pageout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_pageout.c ============================================================================== --- stable/11/sys/vm/vm_pageout.c Wed Dec 13 14:08:33 2017 (r326820) +++ stable/11/sys/vm/vm_pageout.c Wed Dec 13 15:20:11 2017 (r326821) @@ -1764,7 +1764,7 @@ vm_pageout_worker(void *arg) */ mtx_unlock(&vm_page_queue_free_mtx); if (pass >= 1) - pause("psleep", hz / VM_INACT_SCAN_RATE); + pause("pwait", hz / VM_INACT_SCAN_RATE); pass++; } else { /* From owner-svn-src-all@freebsd.org Wed Dec 13 16:09:01 2017 Return-Path: Delivered-To: svn-src-all@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 A69CBEA2869; Wed, 13 Dec 2017 16:09:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D6A676542; Wed, 13 Dec 2017 16:09:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDG90Ab044142; Wed, 13 Dec 2017 16:09:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDG90Jf044141; Wed, 13 Dec 2017 16:09:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712131609.vBDG90Jf044141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 13 Dec 2017 16:09:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326822 - head/usr.bin/diff X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/diff X-SVN-Commit-Revision: 326822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 16:09:01 -0000 Author: bapt Date: Wed Dec 13 16:09:00 2017 New Revision: 326822 URL: https://svnweb.freebsd.org/changeset/base/326822 Log: Replace homemade equivalent of tolower(3) by towlower(3) This will help in the futur making diff -i works with multibyte Modified: head/usr.bin/diff/diffreg.c Modified: head/usr.bin/diff/diffreg.c ============================================================================== --- head/usr.bin/diff/diffreg.c Wed Dec 13 15:20:11 2017 (r326821) +++ head/usr.bin/diff/diffreg.c Wed Dec 13 16:09:00 2017 (r326822) @@ -231,7 +231,7 @@ static long *ixold; /* will be overlaid on klist */ static struct cand *clist; /* merely a free storage pot for candidates */ static int clistlen; /* the length of clist */ static struct line *sfile[2]; /* shortened by pruning common prefix/suffix */ -static u_char *chrtran; /* translation table for case-folding */ +static int (*chrtran)(int); /* translation table for case-folding */ static struct context_vec *context_vec_start; static struct context_vec *context_vec_end; static struct context_vec *context_vec_ptr; @@ -241,65 +241,20 @@ static char lastbuf[FUNCTION_CONTEXT_SIZE]; static int lastline; static int lastmatchline; +static int +clow2low(int c) +{ -/* - * chrtran points to one of 2 translation tables: cup2low if folding upper to - * lower case clow2low if not folding case - */ -static u_char clow2low[256] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, - 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, - 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, - 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, - 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, - 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, - 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, - 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, - 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, - 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, - 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, - 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, - 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, - 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, - 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, - 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, - 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, - 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, - 0xfd, 0xfe, 0xff -}; + return (c); +} -static u_char cup2low[256] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, - 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, - 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, - 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, - 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x60, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, - 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x60, 0x61, 0x62, - 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, - 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, - 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, - 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, - 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, - 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, - 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, - 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, - 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, - 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, - 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, - 0xfd, 0xfe, 0xff -}; +static int +cup2low(int c) +{ + return tolower(c); +} + int diffreg(char *file1, char *file2, int flags, int capsicum) { @@ -875,7 +830,7 @@ check(FILE *f1, FILE *f2, int flags) ctnew++; } } - if (chrtran[c] != chrtran[d]) { + if (chrtran(c) != chrtran(d)) { jackpot++; J[i] = 0; if (c != '\n' && c != EOF) @@ -1347,7 +1302,7 @@ readhash(FILE *f, int flags) return (0); break; } - sum = sum * 127 + chrtran[t]; + sum = sum * 127 + chrtran(t); } else for (i = 0; (t = getc(f)) != '\n'; i++) { @@ -1379,7 +1334,7 @@ readhash(FILE *f, int flags) i++; space = 0; } - sum = sum * 127 + chrtran[t]; + sum = sum * 127 + chrtran(t); i++; continue; case EOF: From owner-svn-src-all@freebsd.org Wed Dec 13 16:13:22 2017 Return-Path: Delivered-To: svn-src-all@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 7A2A8EA2AF8; Wed, 13 Dec 2017 16:13:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41E3876A6C; Wed, 13 Dec 2017 16:13:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDGDLUE048326; Wed, 13 Dec 2017 16:13:21 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDGDH6p048286; Wed, 13 Dec 2017 16:13:17 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201712131613.vBDGDH6p048286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 13 Dec 2017 16:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326823 - in head: include lib/libc/net sys/dev/usb/net sys/dev/usb/wlan sys/sys usr.sbin/ppp usr.sbin/rarpd usr.sbin/watch X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: in head: include lib/libc/net sys/dev/usb/net sys/dev/usb/wlan sys/sys usr.sbin/ppp usr.sbin/rarpd usr.sbin/watch X-SVN-Commit-Revision: 326823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 16:13:22 -0000 Author: pfg Date: Wed Dec 13 16:13:17 2017 New Revision: 326823 URL: https://svnweb.freebsd.org/changeset/base/326823 Log: SPDX: mostly fixes to previous changes. Introduce the recently approved BSD-1-Clause and replace 0BSD which never did fit well our use cases. Modified: head/include/ifaddrs.h head/lib/libc/net/getifaddrs.c head/lib/libc/net/if_indextoname.c head/lib/libc/net/if_nameindex.c head/lib/libc/net/if_nametoindex.c head/sys/dev/usb/net/if_mos.c head/sys/dev/usb/wlan/if_uath.c head/sys/sys/_ucontext.h head/sys/sys/_vm_domain.h head/sys/sys/auxv.h head/sys/sys/bus_dma.h head/sys/sys/bus_dma_internal.h head/sys/sys/capsicum.h head/sys/sys/cnv.h head/sys/sys/devmap.h head/sys/sys/disk_zone.h head/sys/sys/dnv.h head/sys/sys/gtaskqueue.h head/sys/sys/gzio.h head/sys/sys/imgact_binmisc.h head/sys/sys/intr.h head/sys/sys/iov.h head/sys/sys/iov_schema.h head/sys/sys/mouse.h head/sys/sys/msg.h head/sys/sys/numa.h head/sys/sys/nv.h head/sys/sys/rman.h head/sys/sys/snoop.h head/sys/sys/soundcard.h head/sys/sys/spigenio.h head/sys/sys/tiio.h head/sys/sys/timetc.h head/sys/sys/zlib.h head/usr.sbin/ppp/arp.c head/usr.sbin/rarpd/rarpd.c head/usr.sbin/watch/watch.c Modified: head/include/ifaddrs.h ============================================================================== --- head/include/ifaddrs.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/include/ifaddrs.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,6 +1,8 @@ /* $FreeBSD$ */ -/* +/*- + * SPDX-License-Identifier: BSD-1-Clause + * * Copyright (c) 1995, 1999 * Berkeley Software Design, Inc. All rights reserved. * Modified: head/lib/libc/net/getifaddrs.c ============================================================================== --- head/lib/libc/net/getifaddrs.c Wed Dec 13 16:09:00 2017 (r326822) +++ head/lib/libc/net/getifaddrs.c Wed Dec 13 16:13:17 2017 (r326823) @@ -1,6 +1,8 @@ /* $KAME: getifaddrs.c,v 1.9 2001/08/20 02:31:20 itojun Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-1-Clause + * * Copyright (c) 1995, 1999 * Berkeley Software Design, Inc. All rights reserved. * Modified: head/lib/libc/net/if_indextoname.c ============================================================================== --- head/lib/libc/net/if_indextoname.c Wed Dec 13 16:09:00 2017 (r326822) +++ head/lib/libc/net/if_indextoname.c Wed Dec 13 16:13:17 2017 (r326823) @@ -1,6 +1,8 @@ /* $KAME: if_indextoname.c,v 1.7 2000/11/08 03:09:30 itojun Exp $ */ /*- + * SPDX-License-Identifier: BSD-1-Clause + * * Copyright (c) 1997, 2000 * Berkeley Software Design, Inc. All rights reserved. * Modified: head/lib/libc/net/if_nameindex.c ============================================================================== --- head/lib/libc/net/if_nameindex.c Wed Dec 13 16:09:00 2017 (r326822) +++ head/lib/libc/net/if_nameindex.c Wed Dec 13 16:13:17 2017 (r326823) @@ -1,6 +1,8 @@ /* $KAME: if_nameindex.c,v 1.8 2000/11/24 08:20:01 itojun Exp $ */ /*- + * SPDX-License-Identifier: BSD-1-Clause + * * Copyright (c) 1997, 2000 * Berkeley Software Design, Inc. All rights reserved. * Modified: head/lib/libc/net/if_nametoindex.c ============================================================================== --- head/lib/libc/net/if_nametoindex.c Wed Dec 13 16:09:00 2017 (r326822) +++ head/lib/libc/net/if_nametoindex.c Wed Dec 13 16:13:17 2017 (r326823) @@ -1,6 +1,8 @@ /* $KAME: if_nametoindex.c,v 1.6 2000/11/24 08:18:54 itojun Exp $ */ /*- + * SPDX-License-Identifier: BSD-1-Clause + * * Copyright (c) 1997, 2000 * Berkeley Software Design, Inc. All rights reserved. * Modified: head/sys/dev/usb/net/if_mos.c ============================================================================== --- head/sys/dev/usb/net/if_mos.c Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/dev/usb/net/if_mos.c Wed Dec 13 16:13:17 2017 (r326823) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: 0BSD AND BSD-4-Clause + * SPDX-License-Identifier: (BSD-1-Clause AND BSD-4-Clause) * * Copyright (c) 2011 Rick van der Zwet * Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/dev/usb/wlan/if_uath.c Wed Dec 13 16:13:17 2017 (r326823) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND 0BSD + * SPDX-License-Identifier: (BSD-2-Clause-FreeBSD AND BSD-1-Clause) * * Copyright (c) 2006 Sam Leffler, Errno Consulting * Copyright (c) 2008-2009 Weongyo Jeong Modified: head/sys/sys/_ucontext.h ============================================================================== --- head/sys/sys/_ucontext.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/_ucontext.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1999 Marcel Moolenaar * All rights reserved. * Modified: head/sys/sys/_vm_domain.h ============================================================================== --- head/sys/sys/_vm_domain.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/_vm_domain.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2015 Adrian Chadd . * All rights reserved. * Modified: head/sys/sys/auxv.h ============================================================================== --- head/sys/sys/auxv.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/auxv.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2017 Michal Meloun * All rights reserved. * Modified: head/sys/sys/bus_dma.h ============================================================================== --- head/sys/sys/bus_dma.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/bus_dma.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,7 +1,7 @@ /* $NetBSD: bus.h,v 1.12 1997/10/01 08:25:15 fvdl Exp $ */ /*- - * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * SPDX-License-Identifier: (BSD-2-Clause-NetBSD AND BSD-4-Clause) * * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. * All rights reserved. Modified: head/sys/sys/bus_dma_internal.h ============================================================================== --- head/sys/sys/bus_dma_internal.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/bus_dma_internal.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2017 Jason A. Harmening. * All rights reserved. * Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/capsicum.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008-2010, 2015 Robert N. M. Watson * Copyright (c) 2012 FreeBSD Foundation * All rights reserved. Modified: head/sys/sys/cnv.h ============================================================================== --- head/sys/sys/cnv.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/cnv.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2016 Adam Starak * All rights reserved. * Modified: head/sys/sys/devmap.h ============================================================================== --- head/sys/sys/devmap.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/devmap.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2013 Ian Lepore * All rights reserved. * Modified: head/sys/sys/disk_zone.h ============================================================================== --- head/sys/sys/disk_zone.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/disk_zone.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2015 Spectra Logic Corporation * All rights reserved. * Modified: head/sys/sys/dnv.h ============================================================================== --- head/sys/sys/dnv.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/dnv.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2013 The FreeBSD Foundation * All rights reserved. * Modified: head/sys/sys/gtaskqueue.h ============================================================================== --- head/sys/sys/gtaskqueue.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/gtaskqueue.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 Jeffrey Roberson * Copyright (c) 2016 Matthew Macy * All rights reserved. Modified: head/sys/sys/gzio.h ============================================================================== --- head/sys/sys/gzio.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/gzio.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 Mark Johnston * * Redistribution and use in source and binary forms, with or without Modified: head/sys/sys/imgact_binmisc.h ============================================================================== --- head/sys/sys/imgact_binmisc.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/imgact_binmisc.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2013 Stacey D. Son * * Redistribution and use in source and binary forms, with or without Modified: head/sys/sys/intr.h ============================================================================== --- head/sys/sys/intr.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/intr.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2015-2016 Svatopluk Kraus * Copyright (c) 2015-2016 Michal Meloun * All rights reserved. Modified: head/sys/sys/iov.h ============================================================================== --- head/sys/sys/iov.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/iov.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2013-2015 Sandvine Inc. * All rights reserved. * Modified: head/sys/sys/iov_schema.h ============================================================================== --- head/sys/sys/iov_schema.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/iov_schema.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014-2015 Sandvine Inc. * All rights reserved. * Modified: head/sys/sys/mouse.h ============================================================================== --- head/sys/sys/mouse.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/mouse.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-1-Clause + * * Copyright (c) 1992, 1993 Erik Forsberg. * Copyright (c) 1996, 1997 Kazutaka YOKOTA * All rights reserved. Modified: head/sys/sys/msg.h ============================================================================== --- head/sys/sys/msg.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/msg.h Wed Dec 13 16:13:17 2017 (r326823) @@ -4,9 +4,9 @@ /*- * SVID compatible msg.h file * - * SPDX-License-Identifier: 0BSD - * * Author: Daniel Boulet + * + * SPDX-License-Identifier: BSD-1-Clause * * Copyright 1993 Daniel Boulet and RTMX Inc. * Modified: head/sys/sys/numa.h ============================================================================== --- head/sys/sys/numa.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/numa.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 2015 Adrian Chadd . * All rights reserved. * Modified: head/sys/sys/nv.h ============================================================================== --- head/sys/sys/nv.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/nv.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2009-2013 The FreeBSD Foundation * Copyright (c) 2013-2015 Mariusz Zaborski * All rights reserved. Modified: head/sys/sys/rman.h ============================================================================== --- head/sys/sys/rman.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/rman.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: MIT + * * Copyright 1998 Massachusetts Institute of Technology * * Permission to use, copy, modify, and distribute this software and Modified: head/sys/sys/snoop.h ============================================================================== --- head/sys/sys/snoop.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/snoop.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: 0BSD + * SPDX-License-Identifier: BSD-1-Clause * * Copyright (c) 1995 Ugen J.S.Antsilevich * Modified: head/sys/sys/soundcard.h ============================================================================== --- head/sys/sys/soundcard.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/soundcard.h Wed Dec 13 16:13:17 2017 (r326823) @@ -3,6 +3,8 @@ */ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright by Hannu Savolainen 1993 / 4Front Technologies 1993-2006 * Modified for the new FreeBSD sound driver by Luigi Rizzo, 1997 * Modified: head/sys/sys/spigenio.h ============================================================================== --- head/sys/sys/spigenio.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/spigenio.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2000 Doug Rabson * All rights reserved. * Modified: head/sys/sys/tiio.h ============================================================================== --- head/sys/sys/tiio.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/tiio.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-4-Clause AND BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: (BSD-2-Clause-FreeBSD AND BSD-4-Clause) * * Copyright (c) 1999, 2000 Kenneth D. Merry. * All rights reserved. Modified: head/sys/sys/timetc.h ============================================================================== --- head/sys/sys/timetc.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/timetc.h Wed Dec 13 16:13:17 2017 (r326823) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: Beerware + * * ---------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * wrote this file. As long as you retain this notice you Modified: head/sys/sys/zlib.h ============================================================================== --- head/sys/sys/zlib.h Wed Dec 13 16:09:00 2017 (r326822) +++ head/sys/sys/zlib.h Wed Dec 13 16:13:17 2017 (r326823) @@ -17,6 +17,8 @@ /* +++ zlib.h */ /*- + SPDX-License-Identifier: BSD-3-Clause + zlib.h -- interface of the 'zlib' general purpose compression library version 1.0.4, Jul 24th, 1996. Modified: head/usr.sbin/ppp/arp.c ============================================================================== --- head/usr.sbin/ppp/arp.c Wed Dec 13 16:09:00 2017 (r326822) +++ head/usr.sbin/ppp/arp.c Wed Dec 13 16:13:17 2017 (r326823) @@ -2,7 +2,7 @@ * sys-bsd.c - System-dependent procedures for setting up * PPP interfaces on bsd-4.4-ish systems (including 386BSD, NetBSD, etc.) * - * SPDX-License-Identifier: 0BSD + * SPDX-License-Identifier: BSD-1-Clause * * Copyright (c) 1989 Carnegie Mellon University. * All rights reserved. Modified: head/usr.sbin/rarpd/rarpd.c ============================================================================== --- head/usr.sbin/rarpd/rarpd.c Wed Dec 13 16:09:00 2017 (r326822) +++ head/usr.sbin/rarpd/rarpd.c Wed Dec 13 16:13:17 2017 (r326823) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: 0BSD + * SPDX-License-Identifier: BSD-1-Clause * * Copyright (c) 1990, 1991, 1992, 1993, 1996 * The Regents of the University of California. All rights reserved. Modified: head/usr.sbin/watch/watch.c ============================================================================== --- head/usr.sbin/watch/watch.c Wed Dec 13 16:09:00 2017 (r326822) +++ head/usr.sbin/watch/watch.c Wed Dec 13 16:13:17 2017 (r326823) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: 0BSD + * SPDX-License-Identifier: BSD-1-Clause * * Copyright (c) 1995 Ugen J.S.Antsilevich * From owner-svn-src-all@freebsd.org Wed Dec 13 16:14:40 2017 Return-Path: Delivered-To: svn-src-all@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 060ABEA2B93; Wed, 13 Dec 2017 16:14:40 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1B0676BEA; Wed, 13 Dec 2017 16:14:39 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDGEc9W048406; Wed, 13 Dec 2017 16:14:38 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDGEc3f048405; Wed, 13 Dec 2017 16:14:38 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201712131614.vBDGEc3f048405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Wed, 13 Dec 2017 16:14:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326824 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 326824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 16:14:40 -0000 Author: fsu Date: Wed Dec 13 16:14:38 2017 New Revision: 326824 URL: https://svnweb.freebsd.org/changeset/base/326824 Log: Fix kernel build if MAC is not defined. Reported by: Ravi Pokala, Andrew Turner Approved by: pfg (mentor) MFC after: 1 week Modified: head/sys/kern/vfs_extattr.c Modified: head/sys/kern/vfs_extattr.c ============================================================================== --- head/sys/kern/vfs_extattr.c Wed Dec 13 16:13:17 2017 (r326823) +++ head/sys/kern/vfs_extattr.c Wed Dec 13 16:14:38 2017 (r326824) @@ -198,7 +198,9 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, co cnt -= auio.uio_resid; td->td_retval[0] = cnt; +#ifdef MAC done: +#endif VOP_UNLOCK(vp, 0); vn_finished_write(mp); return (error); @@ -372,8 +374,9 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, co td->td_retval[0] = cnt; } else td->td_retval[0] = size; - +#ifdef MAC done: +#endif VOP_UNLOCK(vp, 0); return (error); } @@ -673,8 +676,9 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v td->td_retval[0] = cnt; } else td->td_retval[0] = size; - +#ifdef MAC done: +#endif VOP_UNLOCK(vp, 0); return (error); } From owner-svn-src-all@freebsd.org Wed Dec 13 16:16:45 2017 Return-Path: Delivered-To: svn-src-all@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 A98B7EA2D17; Wed, 13 Dec 2017 16:16:45 +0000 (UTC) (envelope-from thisisadrgreenthumb@gmail.com) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::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 3BEE876E4A; Wed, 13 Dec 2017 16:16:45 +0000 (UTC) (envelope-from thisisadrgreenthumb@gmail.com) Received: by mail-wm0-x234.google.com with SMTP id n138so6095694wmg.2; Wed, 13 Dec 2017 08:16:45 -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=1Qayad5JLfBDkTpBGOHlNCtfFrcLF34Fc3NiZpzBaNg=; b=BKc1MabCa4OSqk8T/F3FOA67sTc7JuM4/dt5vBBLkeWxAin0TFJbdCtoMPknYaGv4p uwREdrT6JiBUbsBpwg1zHvARSUmj7IPsN7pozEnb26Oj8pnst17Z26on6SMuqSORRra9 9cPnHndbrtF0Yr8zuk7lhWwC/NWWY8j7CO/XkmfwoFJO6kgT2yHnMfAc+ojK1Mllc2bf MP1/I5NkFBjGE3iUj7IeJRlOJ8oLbq3b2tknFi8lMI5Uf3FLjSEyYMsgSEnAESWAfUs8 1mmu2rT7UlUkp0Rbc3nYNOswB53F4xFlaw5ldrJQaZCFZT4w+iyoj0bc+vhuQtQChmbp cE9g== 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=1Qayad5JLfBDkTpBGOHlNCtfFrcLF34Fc3NiZpzBaNg=; b=kIZsxYZbsRs70Rk3nH8yNvGSHa0Ky2cw1Aw/Vjc3Wsfgf+CwvBXRat+zzZuwAuuwaz CQzkhbA2GkB/WL+WLgWWeSXthyjxaGxVs4ON/qUJ3BuezZtLg5KyYfOZT2gqmBwh5kxs LPESOx7YBpcdfb/9bxL9LIbdWiQuOii/6gQtLcothlECW3nxcnqpCtVWgx9uwmOYt0wA orpD3gs6+D+eY5blFX1AbsV2DVxLdGfvhn7kvCKcR+c86RG7KvvKSxQ63mIGFeOZjnag ik3grMasBcdbghvVeU4Ccn6QrocXOK1d9osmxCreE8Fp3phMX2xyZ//tLPKxEL+q4Wu2 F2Iw== X-Gm-Message-State: AKGB3mIEx3ZDyvlQJBPimsUVUCe/Bpl5vVGw3zEMMokcc3fJxD7kqfeF 4Hq/p1z0G5B6Z9X2RMeICTVhkqDM0Ai+0FohcYQbYy1u4eI= X-Google-Smtp-Source: ACJfBotbAj+ZTIOfYiDxeUKOt4kFi1Tpwt7ubSkth2F3ua4FAS6Yv72DKynRxy3FjTu90TBIsKuFnHFeEuTaWWJYsFo= X-Received: by 10.80.240.80 with SMTP id u16mr8519130edl.5.1513181803786; Wed, 13 Dec 2017 08:16:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.231.1 with HTTP; Wed, 13 Dec 2017 08:16:43 -0800 (PST) In-Reply-To: References: <201712122015.vBCKFvNk047250@repo.freebsd.org> <87732030-061F-43FB-94D7-4DB6F6558A4B@fubar.geek.nz> From: Fedor Uporov Date: Wed, 13 Dec 2017 17:16:43 +0100 Message-ID: Subject: Re: svn commit: r326808 - head/sys/kern To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 16:16:45 -0000 Should be fixed in r326824. On Wed, Dec 13, 2017 at 1:58 PM, Fedor Uporov wrote: > Hi, Andrew. > > Thanks for report, I know about the issue. > Just, need to get back home to my laptop to fix it. > Need 2-4 hours. > > On Wed, Dec 13, 2017 at 1:46 PM, Andrew Turner > wrote: > >> >> > On 12 Dec 2017, at 20:15, Fedor Uporov wrote: >> > >> > Author: fsu >> > Date: Tue Dec 12 20:15:57 2017 >> > New Revision: 326808 >> > URL: https://svnweb.freebsd.org/changeset/base/326808 >> > >> > Log: >> > Move buffer size checks outside of the vnode locks. >> > >> > Reviewed by: kib, cem, pfg (mentor) >> > Approved by: pfg (mentor) >> > MFC after: 1 weeks >> > >> > Differential Revision: https://reviews.freebsd.org/D13405 >> >> This breaks the build when MAC is undefined, e.g. the armv7 GENERIC >> kernel. >> >> /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:201:1: >> error: unused label 'done' [-Werror,-Wunused-label] >> done: >> ^~~~~ >> /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:376:1: >> error: unused label 'done' [-Werror,-Wunused-label] >> done: >> ^~~~~ >> /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:677:1: >> error: unused label 'done' [-Werror,-Wunused-label] >> done: >> ^~~~~ >> 3 errors generated. >> >> Andrew >> >> > From owner-svn-src-all@freebsd.org Wed Dec 13 16:17:38 2017 Return-Path: Delivered-To: svn-src-all@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 D2E3AEA2D93; Wed, 13 Dec 2017 16:17:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99F6F76FA6; Wed, 13 Dec 2017 16:17:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDGHbc1048558; Wed, 13 Dec 2017 16:17:37 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDGHbJm048556; Wed, 13 Dec 2017 16:17:37 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712131617.vBDGHbJm048556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 13 Dec 2017 16:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326825 - in stable/11/sys/cam: ata scsi X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11/sys/cam: ata scsi X-SVN-Commit-Revision: 326825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 16:17:38 -0000 Author: asomers Date: Wed Dec 13 16:17:37 2017 New Revision: 326825 URL: https://svnweb.freebsd.org/changeset/base/326825 Log: MFC r326040: Quirk Seagate ST8000AS0003-2HH Like its predecessor ST8000AS0002, this is a drive-managed SMR drive, but doesn't declare that in its ATA identify data. Sponsored by: Spectra Logic Corp Modified: stable/11/sys/cam/ata/ata_da.c stable/11/sys/cam/scsi/scsi_da.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ata/ata_da.c ============================================================================== --- stable/11/sys/cam/ata/ata_da.c Wed Dec 13 16:14:38 2017 (r326824) +++ stable/11/sys/cam/ata/ata_da.c Wed Dec 13 16:17:37 2017 (r326825) @@ -717,7 +717,7 @@ static struct ada_quirk_entry ada_quirk_table[] = * Drive Managed SATA hard drive. This drive doesn't report * in firmware that it is a drive managed SMR drive. */ - { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST8000AS0002*", "*" }, + { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST8000AS000[23]*", "*" }, /*quirks*/ADA_Q_SMR_DM }, { Modified: stable/11/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_da.c Wed Dec 13 16:14:38 2017 (r326824) +++ stable/11/sys/cam/scsi/scsi_da.c Wed Dec 13 16:17:37 2017 (r326825) @@ -1306,7 +1306,7 @@ static struct da_quirk_entry da_quirk_table[] = * Drive Managed SATA hard drive. This drive doesn't report * in firmware that it is a drive managed SMR drive. */ - { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST8000AS0002*", "*" }, + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST8000AS000[23]*", "*" }, /*quirks*/DA_Q_SMR_DM }, { From owner-svn-src-all@freebsd.org Wed Dec 13 16:20:56 2017 Return-Path: Delivered-To: svn-src-all@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 47258EA2FB2; Wed, 13 Dec 2017 16:20:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DDA07717B; Wed, 13 Dec 2017 16:20:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDGKt6Z049610; Wed, 13 Dec 2017 16:20:55 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDGKtgw049609; Wed, 13 Dec 2017 16:20:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712131620.vBDGKtgw049609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 13 Dec 2017 16:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326826 - stable/11/sys/cam X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sys/cam X-SVN-Commit-Revision: 326826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 16:20:56 -0000 Author: asomers Date: Wed Dec 13 16:20:55 2017 New Revision: 326826 URL: https://svnweb.freebsd.org/changeset/base/326826 Log: MFC r326100: Always null-terminate CAM periph_name and dev_name Reported by: Coverity CID: 1010039, 1010040, 1010041, 1010043 Reviewed by: ken, imp Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13194 Modified: stable/11/sys/cam/cam_xpt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/cam_xpt.c ============================================================================== --- stable/11/sys/cam/cam_xpt.c Wed Dec 13 16:17:37 2017 (r326825) +++ stable/11/sys/cam/cam_xpt.c Wed Dec 13 16:20:55 2017 (r326826) @@ -655,8 +655,9 @@ xptdoioctl(struct cdev *dev, u_long cmd, caddr_t addr, /* * Fill in the getdevlist fields. */ - strcpy(ccb->cgdl.periph_name, - periph->periph_name); + strlcpy(ccb->cgdl.periph_name, + periph->periph_name, + sizeof(ccb->cgdl.periph_name)); ccb->cgdl.unit_number = periph->unit_number; if (SLIST_NEXT(periph, periph_links)) @@ -1604,8 +1605,9 @@ xptedtbusfunc(struct cam_eb *bus, void *arg) cdm->matches[j].result.bus_result.bus_id = bus->sim->bus_id; cdm->matches[j].result.bus_result.unit_number = bus->sim->unit_number; - strncpy(cdm->matches[j].result.bus_result.dev_name, - bus->sim->sim_name, DEV_IDLEN); + strlcpy(cdm->matches[j].result.bus_result.dev_name, + bus->sim->sim_name, + sizeof(cdm->matches[j].result.bus_result.dev_name)); } /* @@ -1821,6 +1823,7 @@ xptedtperiphfunc(struct cam_periph *periph, void *arg) */ if (retval & DM_RET_COPY) { int spaceleft, j; + size_t l; spaceleft = cdm->match_buf_len - (cdm->num_matches * sizeof(struct dev_match_result)); @@ -1864,8 +1867,9 @@ xptedtperiphfunc(struct cam_periph *periph, void *arg) periph->path->device->lun_id; cdm->matches[j].result.periph_result.unit_number = periph->unit_number; - strncpy(cdm->matches[j].result.periph_result.periph_name, - periph->periph_name, DEV_IDLEN); + l = sizeof(cdm->matches[j].result.periph_result.periph_name); + strlcpy(cdm->matches[j].result.periph_result.periph_name, + periph->periph_name, l); } return(1); @@ -1960,6 +1964,7 @@ xptplistperiphfunc(struct cam_periph *periph, void *ar */ if (retval & DM_RET_COPY) { int spaceleft, j; + size_t l; spaceleft = cdm->match_buf_len - (cdm->num_matches * sizeof(struct dev_match_result)); @@ -2036,8 +2041,9 @@ xptplistperiphfunc(struct cam_periph *periph, void *ar cdm->matches[j].result.periph_result.unit_number = periph->unit_number; - strncpy(cdm->matches[j].result.periph_result.periph_name, - periph->periph_name, DEV_IDLEN); + l = sizeof(cdm->matches[j].result.periph_result.periph_name); + strlcpy(cdm->matches[j].result.periph_result.periph_name, + periph->periph_name, l); } return(1); @@ -2750,9 +2756,9 @@ call_sim: (nperiph != NULL) && (i <= cgdl->index); nperiph = SLIST_NEXT(nperiph, periph_links), i++) { if (i == cgdl->index) { - strncpy(cgdl->periph_name, + strlcpy(cgdl->periph_name, nperiph->periph_name, - DEV_IDLEN); + sizeof(cgdl->periph_name)); cgdl->unit_number = nperiph->unit_number; found = 1; } From owner-svn-src-all@freebsd.org Wed Dec 13 16:22:04 2017 Return-Path: Delivered-To: svn-src-all@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 41EA7EA302D; Wed, 13 Dec 2017 16:22:04 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A85477483; Wed, 13 Dec 2017 16:22:03 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDGM2wd052582; Wed, 13 Dec 2017 16:22:02 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDGM216052581; Wed, 13 Dec 2017 16:22:02 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712131622.vBDGM216052581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 13 Dec 2017 16:22:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326827 - stable/11/lib/libcam/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/lib/libcam/tests X-SVN-Commit-Revision: 326827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 16:22:04 -0000 Author: asomers Date: Wed Dec 13 16:22:02 2017 New Revision: 326827 URL: https://svnweb.freebsd.org/changeset/base/326827 Log: MFC r326101: Add a test case for cam_get_device with sa(4) devices sa(4) has some unique behavior that is special-cased in cam_get_device. The existing tests don't provide coverage for this special case. Reviewed by: ken Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13185 Modified: stable/11/lib/libcam/tests/libcam_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libcam/tests/libcam_test.c ============================================================================== --- stable/11/lib/libcam/tests/libcam_test.c Wed Dec 13 16:20:55 2017 (r326826) +++ stable/11/lib/libcam/tests/libcam_test.c Wed Dec 13 16:22:02 2017 (r326827) @@ -129,6 +129,33 @@ ATF_TC_BODY(cam_get_device_positive_test, tc) ATF_REQUIRE(parsed_unit == expected_unit); } +/* + * sa(4) uniquely creates nsa and esa device nodes for non-rewind operations + * and eject-on-close operations. cam_get_device must special case these nodes + * to always return the base device. + */ +ATF_TC_WITHOUT_HEAD(cam_get_device_sa_test); +ATF_TC_BODY(cam_get_device_sa_test, tc) +{ + char parsed_dev_name[DEV_IDLEN + 1]; + int parsed_unit; + + ATF_REQUIRE_MSG(cam_get_device("nsa99", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == 0, + "cam_get_device failed"); + ATF_REQUIRE_STREQ(parsed_dev_name, "sa"); + ATF_REQUIRE(parsed_unit == 99); + + strcpy(parsed_dev_name, ""); + parsed_unit = -1; + + ATF_REQUIRE_MSG(cam_get_device("esa99", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == 0, + "cam_get_device failed"); + ATF_REQUIRE_STREQ(parsed_dev_name, "sa"); + ATF_REQUIRE(parsed_unit == 99); +} + ATF_TC(cam_open_device_negative_test_O_RDONLY); ATF_TC_HEAD(cam_open_device_negative_test_O_RDONLY, tc) { @@ -282,6 +309,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, cam_get_device_negative_test_nul_path); ATF_TP_ADD_TC(tp, cam_get_device_negative_test_root); ATF_TP_ADD_TC(tp, cam_get_device_positive_test); + ATF_TP_ADD_TC(tp, cam_get_device_sa_test); ATF_TP_ADD_TC(tp, cam_open_device_negative_test_O_RDONLY); ATF_TP_ADD_TC(tp, cam_open_device_negative_test_nonexistent); ATF_TP_ADD_TC(tp, cam_open_device_negative_test_unprivileged); From owner-svn-src-all@freebsd.org Wed Dec 13 16:30:42 2017 Return-Path: Delivered-To: svn-src-all@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 1A6F7EA3241; Wed, 13 Dec 2017 16:30:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA227778C1; Wed, 13 Dec 2017 16:30:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDGUepw055427; Wed, 13 Dec 2017 16:30:40 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDGUeoK055417; Wed, 13 Dec 2017 16:30:40 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201712131630.vBDGUeoK055417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 13 Dec 2017 16:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326828 - in head: lib/libmd sys/fs/ext2fs sys/kern sys/sys X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: in head: lib/libmd sys/fs/ext2fs sys/kern sys/sys X-SVN-Commit-Revision: 326828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 16:30:42 -0000 Author: pfg Date: Wed Dec 13 16:30:39 2017 New Revision: 326828 URL: https://svnweb.freebsd.org/changeset/base/326828 Log: SPDX: some uses of the RSA-MD license. Modified: head/lib/libmd/md4.h head/lib/libmd/md4c.c head/lib/libmd/md5c.c head/lib/libmd/mdXhl.c head/lib/libmd/shadriver.c head/lib/libmd/skeindriver.c head/sys/fs/ext2fs/ext2_hash.c head/sys/kern/md4c.c head/sys/sys/md4.h head/sys/sys/md5.h Modified: head/lib/libmd/md4.h ============================================================================== --- head/lib/libmd/md4.h Wed Dec 13 16:22:02 2017 (r326827) +++ head/lib/libmd/md4.h Wed Dec 13 16:30:39 2017 (r326828) @@ -2,7 +2,10 @@ * $FreeBSD$ */ -/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All +/*- + SPDX-License-Identifier: RSA-MD + + Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. License to copy and use this software is granted provided that it Modified: head/lib/libmd/md4c.c ============================================================================== --- head/lib/libmd/md4c.c Wed Dec 13 16:22:02 2017 (r326827) +++ head/lib/libmd/md4c.c Wed Dec 13 16:30:39 2017 (r326828) @@ -4,7 +4,10 @@ #include __FBSDID("$FreeBSD$"); -/* Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved. +/*- + SPDX-License-Identifier: RSA-MD + + Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD4 Message-Digest Modified: head/lib/libmd/md5c.c ============================================================================== --- head/lib/libmd/md5c.c Wed Dec 13 16:22:02 2017 (r326827) +++ head/lib/libmd/md5c.c Wed Dec 13 16:30:39 2017 (r326828) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: RSA-MD + * * MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm * * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All Modified: head/lib/libmd/mdXhl.c ============================================================================== --- head/lib/libmd/mdXhl.c Wed Dec 13 16:22:02 2017 (r326827) +++ head/lib/libmd/mdXhl.c Wed Dec 13 16:30:39 2017 (r326828) @@ -1,4 +1,6 @@ -/* mdXhl.c +/*- mdXhl.c + * SPDX-License-Identifier: Beerware + * * ---------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * wrote this file. As long as you retain this notice you Modified: head/lib/libmd/shadriver.c ============================================================================== --- head/lib/libmd/shadriver.c Wed Dec 13 16:22:02 2017 (r326827) +++ head/lib/libmd/shadriver.c Wed Dec 13 16:30:39 2017 (r326828) @@ -1,6 +1,9 @@ /* SHADRIVER.C - test driver for SHA-1 (and SHA-2) */ -/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All rights +/*- + * SPDX-License-Identifier: RSA-MD + * + * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All rights * reserved. * * RSA Data Security, Inc. makes no representations concerning either the Modified: head/lib/libmd/skeindriver.c ============================================================================== --- head/lib/libmd/skeindriver.c Wed Dec 13 16:22:02 2017 (r326827) +++ head/lib/libmd/skeindriver.c Wed Dec 13 16:30:39 2017 (r326828) @@ -1,6 +1,9 @@ /* SKEINDRIVER.C - test driver for SKEIN */ -/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All rights +/*- + * SPDX-License-Identifier: RSA-MD + * + * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All rights * reserved. * * RSA Data Security, Inc. makes no representations concerning either the Modified: head/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- head/sys/fs/ext2fs/ext2_hash.c Wed Dec 13 16:22:02 2017 (r326827) +++ head/sys/fs/ext2fs/ext2_hash.c Wed Dec 13 16:30:39 2017 (r326828) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: (BSD-2-Clause-FreeBSD AND RSA-MD) * * Copyright (c) 2010, 2013 Zheng Liu * Copyright (c) 2012, Vyacheslav Matyushin Modified: head/sys/kern/md4c.c ============================================================================== --- head/sys/kern/md4c.c Wed Dec 13 16:22:02 2017 (r326827) +++ head/sys/kern/md4c.c Wed Dec 13 16:30:39 2017 (r326828) @@ -2,6 +2,8 @@ */ /*- + SPDX-License-Identifier: RSA-MD + Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved. License to copy and use this software is granted provided that it Modified: head/sys/sys/md4.h ============================================================================== --- head/sys/sys/md4.h Wed Dec 13 16:22:02 2017 (r326827) +++ head/sys/sys/md4.h Wed Dec 13 16:30:39 2017 (r326828) @@ -3,6 +3,8 @@ */ /*- + SPDX-License-Identifier: RSA-MD + Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. Modified: head/sys/sys/md5.h ============================================================================== --- head/sys/sys/md5.h Wed Dec 13 16:22:02 2017 (r326827) +++ head/sys/sys/md5.h Wed Dec 13 16:30:39 2017 (r326828) @@ -3,6 +3,8 @@ */ /*- + SPDX-License-Identifier: RSA-MD + Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. From owner-svn-src-all@freebsd.org Wed Dec 13 16:58:46 2017 Return-Path: Delivered-To: svn-src-all@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 5F9B3EA3C4C; Wed, 13 Dec 2017 16:58:46 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 406B178ABC; Wed, 13 Dec 2017 16:58:45 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBDGwiF0092605; Wed, 13 Dec 2017 08:58:44 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBDGwiRR092604; Wed, 13 Dec 2017 08:58:44 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712131658.vBDGwiRR092604@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326828 - in head: lib/libmd sys/fs/ext2fs sys/kern sys/sys In-Reply-To: <201712131630.vBDGUeoK055417@repo.freebsd.org> To: "Pedro F. Giffuni" Date: Wed, 13 Dec 2017 08:58:44 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 16:58:46 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: pfg > Date: Wed Dec 13 16:30:39 2017 > New Revision: 326828 > URL: https://svnweb.freebsd.org/changeset/base/326828 > > Log: > SPDX: some uses of the RSA-MD license. And beerware only noting this incase you did not mean to commit this. > Modified: > head/lib/libmd/md4.h > head/lib/libmd/md4c.c > head/lib/libmd/md5c.c > head/lib/libmd/mdXhl.c > head/lib/libmd/shadriver.c > head/lib/libmd/skeindriver.c > head/sys/fs/ext2fs/ext2_hash.c > head/sys/kern/md4c.c > head/sys/sys/md4.h > head/sys/sys/md5.h > > Modified: head/lib/libmd/md4.h ... > Modified: head/lib/libmd/mdXhl.c > ============================================================================== > --- head/lib/libmd/mdXhl.c Wed Dec 13 16:22:02 2017 (r326827) > +++ head/lib/libmd/mdXhl.c Wed Dec 13 16:30:39 2017 (r326828) > @@ -1,4 +1,6 @@ > -/* mdXhl.c > +/*- mdXhl.c > + * SPDX-License-Identifier: Beerware > + * > * ---------------------------------------------------------------------------- > * "THE BEER-WARE LICENSE" (Revision 42): > * wrote this file. As long as you retain this notice you ... -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Dec 13 17:11:58 2017 Return-Path: Delivered-To: svn-src-all@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 C28F9E80452; Wed, 13 Dec 2017 17:11:58 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99418794B9; Wed, 13 Dec 2017 17:11:58 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDHBvQn073811; Wed, 13 Dec 2017 17:11:57 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDHBvmf073809; Wed, 13 Dec 2017 17:11:57 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201712131711.vBDHBvmf073809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 13 Dec 2017 17:11:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326829 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 326829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 17:11:58 -0000 Author: tuexen Date: Wed Dec 13 17:11:57 2017 New Revision: 326829 URL: https://svnweb.freebsd.org/changeset/base/326829 Log: Cleaup, no functional change. Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Dec 13 16:30:39 2017 (r326828) +++ head/sys/netinet/sctp_input.c Wed Dec 13 17:11:57 2017 (r326829) @@ -3207,9 +3207,9 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chunk *cp, struct stcb->asoc.ecn_echo_cnt_onq--; TAILQ_REMOVE(&stcb->asoc.control_send_queue, chk, sctp_next); + stcb->asoc.ctrl_queue_cnt--; sctp_m_freem(chk->data); chk->data = NULL; - stcb->asoc.ctrl_queue_cnt--; sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); if (override == 0) { break; @@ -3641,26 +3641,23 @@ static void sctp_clean_up_stream_reset(struct sctp_tcb *stcb) { struct sctp_association *asoc; - struct sctp_tmit_chunk *chk = stcb->asoc.str_reset; + struct sctp_tmit_chunk *chk; - if (stcb->asoc.str_reset == NULL) { + asoc = &stcb->asoc; + chk = asoc->str_reset; + if (chk == NULL) { return; } - asoc = &stcb->asoc; - + asoc->str_reset = NULL; sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, stcb->sctp_ep, stcb, chk->whoTo, SCTP_FROM_SCTP_INPUT + SCTP_LOC_28); - TAILQ_REMOVE(&asoc->control_send_queue, - chk, - sctp_next); + TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next); + asoc->ctrl_queue_cnt--; if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; } - asoc->ctrl_queue_cnt--; sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); - /* sa_ignore NO_NULL_CHK */ - stcb->asoc.str_reset = NULL; } Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Wed Dec 13 16:30:39 2017 (r326828) +++ head/sys/netinet/sctp_output.c Wed Dec 13 17:11:57 2017 (r326829) @@ -6898,11 +6898,11 @@ sctp_toss_old_cookies(struct sctp_tcb *stcb, struct sc TAILQ_FOREACH_SAFE(chk, &asoc->control_send_queue, sctp_next, nchk) { if (chk->rec.chunk_id.id == SCTP_COOKIE_ECHO) { TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next); + asoc->ctrl_queue_cnt--; if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; } - asoc->ctrl_queue_cnt--; sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); } } @@ -6927,11 +6927,11 @@ sctp_toss_old_asconf(struct sctp_tcb *stcb) } } TAILQ_REMOVE(&asoc->asconf_send_queue, chk, sctp_next); + asoc->ctrl_queue_cnt--; if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; } - asoc->ctrl_queue_cnt--; sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); } } @@ -7055,13 +7055,14 @@ sctp_clean_up_ctl(struct sctp_tcb *stcb, struct sctp_a /* Stray chunks must be cleaned up */ clean_up_anyway: TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next); + asoc->ctrl_queue_cnt--; if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; } - asoc->ctrl_queue_cnt--; - if (chk->rec.chunk_id.id == SCTP_FORWARD_CUM_TSN) + if (chk->rec.chunk_id.id == SCTP_FORWARD_CUM_TSN) { asoc->fwd_tsn_cnt--; + } sctp_free_a_chunk(stcb, chk, so_locked); } else if (chk->rec.chunk_id.id == SCTP_STREAM_RESET) { /* special handling, we must look into the param */ From owner-svn-src-all@freebsd.org Wed Dec 13 17:13:31 2017 Return-Path: Delivered-To: svn-src-all@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 308FDE80643 for ; Wed, 13 Dec 2017 17:13:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic312-36.consmr.mail.ne1.yahoo.com (sonic312-36.consmr.mail.ne1.yahoo.com [66.163.191.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F21C3796CE for ; Wed, 13 Dec 2017 17:13:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1513185204; bh=7V07clTMV2Z+lvZMlnF6xwdSDZZ1ZQUZ9dUrIMvLsB0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=jnWTDaWha/u4g46l7lXh7LMSBNYBsXct+mJfuRd9KlYfEdS123sYTdTcfcEkf5bQmtJkzNWIeEGfclYFzj8bGsAf1XXk/xgs4hRE76u+E+fpn/7MGP5NgtYG2PT2XSMeTAovTuiyBeig199O637OeUTfMgo1pnduMjzaPdX+t/yHN73vz427gUtcpFpu9WO/Rh7SqyXm72F69ghyZSjJsA20z1nDBA58iBOhyoV8Yqtsq7zHrjk8GqRFgzMxNLD5Fmp7aFRGd3yV3byyitrGJ0zbuQI/GkBLjYioBUvStiNnVbrvzK9JzjwHbS43Knj67fzcaLpvPI+efvbPkCz92Q== X-YMail-OSG: zrlJN6sVM1mgOt.ZICEsDajIbi27t3r6jWfM0h_i6xma5irxGz6pDp1E.ydpre0 wbHQrVDPclFacMI0PmpcFK.jFMKpG6QyhQrZ_FIwYh6TVnxtm5nC9nyhj69UW6.PwzCoCbnHC4JQ hNGLomU.jSCQRkKvfaDVohkAkLlYPS5QBfjeZI9.1SBs9RMR8.FsR6D.1QUw3h.xnaoKYI7fxwnh o.Te.EbvdlCJEB34hZEkK6k13fUefhn8VaAzNp8vNYFkiVvc0G2BLEZmXzbbDH0XKyKoeXCqRGRZ 0aYJ189cj8YopSk7JGDZyw8vnVimtDg0K1bztbY4wbxmwOkBSOv.9926X7ZRZaGKbI8CtJlwSyxg YP16qwFHOwf9dJ45GFe.p.aQ4dCs8R8kT0FsxwkXtfn7GuXA3bGe8AgEEiS3gcue54eiVtIBAc3T LO_Q3HOi.ZB60dy5bFkSZPKyk.yl4aJSPmDiPWhSJjSU9BybttaFxL4zDRkeWDYo6nClX4T2R Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ne1.yahoo.com with HTTP; Wed, 13 Dec 2017 17:13:24 +0000 Received: from smtp234.mail.ne1.yahoo.com (EHLO [192.168.0.6]) ([10.218.253.207]) by smtp402.mail.ne1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID -921979512; Wed, 13 Dec 2017 17:13:22 +0000 (UTC) Subject: Re: svn commit: r326828 - in head: lib/libmd sys/fs/ext2fs sys/kern sys/sys To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201712131658.vBDGwiRR092604@pdx.rh.CN85.dnsmgr.net> From: Pedro Giffuni Message-ID: Date: Wed, 13 Dec 2017 12:13:22 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <201712131658.vBDGwiRR092604@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 17:13:31 -0000 On 12/13/17 11:58, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> Author: pfg >> Date: Wed Dec 13 16:30:39 2017 >> New Revision: 326828 >> URL: https://svnweb.freebsd.org/changeset/base/326828 >> >> Log: >> SPDX: some uses of the RSA-MD license. > And beerware only noting this incase you did not mean > to commit this. Well, i am trying to keep some order but, as long as the change is not wrong, its OK to do it with the others. Otherwise this will take much longer. Pedro. From owner-svn-src-all@freebsd.org Wed Dec 13 17:48:33 2017 Return-Path: Delivered-To: svn-src-all@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 8ED1CE81291; Wed, 13 Dec 2017 17:48:33 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D6687ABB6; Wed, 13 Dec 2017 17:48:31 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBDHmPsU027538 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2017 18:48:26 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: rgrimes@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBDHmL0S050482 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 14 Dec 2017 00:48:21 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326809 - head/sys/dev/cardbus To: rgrimes@freebsd.org, Alexey Dokuchaev References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> Cc: Warner Losh , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: Eugene Grosbein Message-ID: <5A3167E1.2000201@grosbein.net> Date: Thu, 14 Dec 2017 00:48:17 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS * 2.6 LOCAL_FROM From my domains X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 17:48:33 -0000 13.12.2017 20:38, Rodney W. Grimes wrote: > That I can not answer, but I can say I have just found the problem > is NOT limited to i386, we can rather quickly blow up an amd64 system > running a dozen or so VM's. > > My bhyve host tossed a stack of these out last night: > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > vm_thread_new: kstack allocation failed > > ZFS has been tuned to leave 1.2* my total VM allocations free space > of memory and I only had 10 out of 16 vm's running last night, so > there is tons of free memory. This is probalby KVA space starvation, > though I thought that was pretty much a non issue on amd64. > > I do think we should back out r326758 sooner rather than later, > and if it got MFC'd or flagged for MFC kill that right now. I don't understand why you want to backout that. It changed nothing for amd64. An i386 is still vulnerable to double faults just because of a network packet processing path can overflow kstack for the GENERIC kernel. If one has stripped-down kernel or just uses FreeBSD within safe environment preventing it from such packets, there is still loader.conf to change kstack_pages to any desired value for such special appliances that need lots of threads for i386. And I don't think someone should expect to run dozen of VMs within i386 kernel without some tuning. So please leave r326758 alone as it hardens FreeBSD in default setup and this is more important. From owner-svn-src-all@freebsd.org Wed Dec 13 18:08:02 2017 Return-Path: Delivered-To: svn-src-all@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 B7A79E81A53; Wed, 13 Dec 2017 18:08:02 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 966567B7ED; Wed, 13 Dec 2017 18:08:02 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id DD2A88638; Wed, 13 Dec 2017 18:08:01 +0000 (UTC) Date: Wed, 13 Dec 2017 18:08:01 +0000 From: Alexey Dokuchaev To: Eugene Grosbein Cc: rgrimes@freebsd.org, Warner Losh , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r326809 - head/sys/dev/cardbus Message-ID: <20171213180801.GA28514@FreeBSD.org> References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A3167E1.2000201@grosbein.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 18:08:02 -0000 On Thu, Dec 14, 2017 at 12:48:17AM +0700, Eugene Grosbein wrote: > ... > I don't understand why you want to backout that. It changed nothing for > amd64. An i386 is still vulnerable to double faults just because of a > network packet processing path can overflow kstack for the GENERIC kernel. The reason (or shall I say concern) was raised by kib@, as quoted: > Plain workstation use, like X11+browser+editor+some other programs easily > allocates 1000+ threads. It was still possible to use 32bit x86 for that, > of course in max memory config without PAE, and without ZFS. Add some > load that involves network, for instance torrent client, to establish the > pressure on KVA. > I am almost sure that users would get troubles now. I'm a plain workstation user with X11+browser+torrent+quake2+you-name-it apps, PAE-less, ZFS-less, and I don't want to get troubles due to r326758. ./danfe From owner-svn-src-all@freebsd.org Wed Dec 13 18:17:00 2017 Return-Path: Delivered-To: svn-src-all@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 557EDE81F8C; Wed, 13 Dec 2017 18:17:00 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C8EF17BE3C; Wed, 13 Dec 2017 18:16:59 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBDIGsDF027755 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2017 19:16:55 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: danfe@FreeBSD.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBDIGVqD058462 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 14 Dec 2017 01:16:31 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326809 - head/sys/dev/cardbus To: Alexey Dokuchaev References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> <20171213180801.GA28514@FreeBSD.org> Cc: rgrimes@freebsd.org, Warner Losh , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: Eugene Grosbein Message-ID: <5A316E7B.8030504@grosbein.net> Date: Thu, 14 Dec 2017 01:16:27 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20171213180801.GA28514@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS * 2.6 LOCAL_FROM From my domains X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 18:17:00 -0000 14.12.2017 1:08, Alexey Dokuchaev пишет: > On Thu, Dec 14, 2017 at 12:48:17AM +0700, Eugene Grosbein wrote: >> ... >> I don't understand why you want to backout that. It changed nothing for >> amd64. An i386 is still vulnerable to double faults just because of a >> network packet processing path can overflow kstack for the GENERIC kernel. > > The reason (or shall I say concern) was raised by kib@, as quoted: > >> Plain workstation use, like X11+browser+editor+some other programs easily >> allocates 1000+ threads. It was still possible to use 32bit x86 for that, >> of course in max memory config without PAE, and without ZFS. Add some >> load that involves network, for instance torrent client, to establish the >> pressure on KVA. >> I am almost sure that users would get troubles now. > > I'm a plain workstation user with X11+browser+torrent+quake2+you-name-it > apps, PAE-less, ZFS-less, and I don't want to get troubles due to r326758. Add kern.kstack_size=2 to /boot/loader.conf of your workstation now and you will notice no difference. From owner-svn-src-all@freebsd.org Wed Dec 13 18:24:53 2017 Return-Path: Delivered-To: svn-src-all@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 C998EE82529; Wed, 13 Dec 2017 18:24:53 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5DD17C595; Wed, 13 Dec 2017 18:24:53 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id BF4FC8C3E; Wed, 13 Dec 2017 18:24:52 +0000 (UTC) Date: Wed, 13 Dec 2017 18:24:52 +0000 From: Alexey Dokuchaev To: Eugene Grosbein Cc: rgrimes@freebsd.org, Warner Losh , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r326809 - head/sys/dev/cardbus Message-ID: <20171213182452.GA51526@FreeBSD.org> References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> <20171213180801.GA28514@FreeBSD.org> <5A316E7B.8030504@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5A316E7B.8030504@grosbein.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 18:24:53 -0000 On Thu, Dec 14, 2017 at 01:16:27AM +0700, Eugene Grosbein wrote: > 14.12.2017 1:08, Alexey Dokuchaev пишет: > > On Thu, Dec 14, 2017 at 12:48:17AM +0700, Eugene Grosbein wrote: > >> ... > >> I don't understand why you want to backout that. It changed nothing for > >> amd64. An i386 is still vulnerable to double faults just because of a > >> network packet processing path can overflow kstack for the GENERIC kernel. > > > > The reason (or shall I say concern) was raised by kib@, as quoted: > > > >> Plain workstation use, like X11+browser+editor+some other programs easily > >> allocates 1000+ threads. It was still possible to use 32bit x86 for that, > >> of course in max memory config without PAE, and without ZFS. Add some > >> load that involves network, for instance torrent client, to establish the > >> pressure on KVA. > >> I am almost sure that users would get troubles now. > > > > I'm a plain workstation user with X11+browser+torrent+quake2+you-name-it > > apps, PAE-less, ZFS-less, and I don't want to get troubles due to r326758. > > Add kern.kstack_size=2 to /boot/loader.conf of your workstation now > and you will notice no difference. FreeBSD is largely known for its sane defaults. Users should not touch those config files, especially if things worked for years without any /boot/loader.conf tweaking. If there are cases of kernel stack pressure like your script had revealed, they should be fixed, and defaults stay as they are now. One does not tweak FreeBSD, it just works. (tm) ./danfe From owner-svn-src-all@freebsd.org Wed Dec 13 18:25:33 2017 Return-Path: Delivered-To: svn-src-all@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 87FD2E825CD; Wed, 13 Dec 2017 18:25:33 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 512C47C6FF; Wed, 13 Dec 2017 18:25:32 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBDIPUGI092938; Wed, 13 Dec 2017 10:25:30 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBDIPURB092937; Wed, 13 Dec 2017 10:25:30 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712131825.vBDIPURB092937@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326828 - in head: lib/libmd sys/fs/ext2fs sys/kern sys/sys In-Reply-To: To: Pedro Giffuni Date: Wed, 13 Dec 2017 10:25:30 -0800 (PST) CC: rgrimes@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 18:25:33 -0000 [ Charset UTF-8 unsupported, converting... ] > > > On 12/13/17 11:58, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > >> Author: pfg > >> Date: Wed Dec 13 16:30:39 2017 > >> New Revision: 326828 > >> URL: https://svnweb.freebsd.org/changeset/base/326828 > >> > >> Log: > >> SPDX: some uses of the RSA-MD license. > > And beerware only noting this incase you did not mean > > to commit this. > > Well, i am trying to keep some order but, as long as the change is not > wrong, its OK to do it with the others. > Otherwise this will take much longer. > No issue with that at all, just try to mention each type so if the logs are searched for different ones they can be easily located. Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Dec 13 18:34:32 2017 Return-Path: Delivered-To: svn-src-all@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 F3EB6E82A4B for ; Wed, 13 Dec 2017 18:34:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic315-22.consmr.mail.gq1.yahoo.com (sonic315-22.consmr.mail.gq1.yahoo.com [98.137.65.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE2C37CCE8 for ; Wed, 13 Dec 2017 18:34:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1513190065; bh=CIUikPI9LZQes1CpqWThdmJLhN99kt38ClQh6GHzYaM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=SF3gD8kT7Fs7qf9QeVVSDf85bqLXzbv++p+wRHjmFjeGIxu4upKEE4AXPA41Ie04Wg6kIZofKWiDPUzD9wME5026+Ip2ikdgI2MytZXWBNxSzhwfubOZ7PYLaLcwhoWBP42UCedgr0fj1wltBV8IZzUUgVJS1hPQXIwQpKeIHS1kkHYd6gAsF5WLSavpmW/n0L+Nv7a/eY3mLA3ndIj0YQXgAO+QtLOnS3Y2XpHe/TNHFn8K/0VW1NnuPfbUaDPBPsrVh8SFutB+t6TOmU7vac/CgsxFUsbmpZWAnljH8klX6zkjReiXRs0qkgJrNUiGGlQlkj8mlMWp+Rux3SfbjA== X-YMail-OSG: vGj01hgVM1nFXrE_BS3cJd1waVSwKtSEcr2KujttUtm1rlbMVmdcOUa_akRBy0c RAUNl_o27ccZCWjhhIl7SATW2pL4KuQ70JAMdWFK1NPmxshkvrJWPhyE6Knx.pDbC53PMBkbWY8F gaiDjKBevSczSdIpYfj3B1LWFirC_DacI3AYy0itjiDiPd9RiY07TsqK_Ojq0JXxXgmOqSCx_.G2 K84j47KsltlCloIyF1pTERTHVversvgx_S9BjjvX2FEqp_nSzesHmbbY4PBPfEPZccjX5G.xTYaP pmnqfx17YxX70hLQvEStqyjYlJCHilfKmqJJliaLlK9negXrj9DWKlxtQi17b2j9rrq68FUOVfj6 fjczMn9E3XiRuaviU7olTkF6zXOQOnbiL7g3cA9GtqbI6oRL9qAkSVJzRFvMFUsNOpRaJMQ6rnw0 EQphOdLD9Uty8Ii..kEmswCFTf.U7P1jrSgYjDMpBPg1L83w0XeHUQSI7MeGFAlbBWxG78jmF5w- - Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Wed, 13 Dec 2017 18:34:25 +0000 Received: from smtp104.rhel.mail.gq1.yahoo.com (EHLO [192.168.0.6]) ([216.39.57.214]) by smtp411.mail.gq1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID -1947966195; Wed, 13 Dec 2017 18:34:24 +0000 (UTC) Subject: Re: svn commit: r326828 - in head: lib/libmd sys/fs/ext2fs sys/kern sys/sys To: rgrimes@FreeBSD.org Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201712131825.vBDIPURB092937@pdx.rh.CN85.dnsmgr.net> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: <596dd495-54d3-193c-2365-54985d71860b@FreeBSD.org> Date: Wed, 13 Dec 2017 13:34:23 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <201712131825.vBDIPURB092937@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 18:34:32 -0000 On 13/12/2017 13:25, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> >> On 12/13/17 11:58, Rodney W. Grimes wrote: >>> [ Charset UTF-8 unsupported, converting... ] >>>> Author: pfg >>>> Date: Wed Dec 13 16:30:39 2017 >>>> New Revision: 326828 >>>> URL: https://svnweb.freebsd.org/changeset/base/326828 >>>> >>>> Log: >>>> SPDX: some uses of the RSA-MD license. >>> And beerware only noting this incase you did not mean >>> to commit this. >> Well, i am trying to keep some order but, as long as the change is not >> wrong, its OK to do it with the others. >> Otherwise this will take much longer. >> > No issue with that at all, just try to mention each type > so if the logs are searched for different ones they can > be easily located. FWIW, for "counting" purposes, opengrok is quite useful: http://src.illumos.org/source/search?q=SPDX&defs=&refs=&path=&hist=&project=freebsd-head Pedro. From owner-svn-src-all@freebsd.org Wed Dec 13 18:38:04 2017 Return-Path: Delivered-To: svn-src-all@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 01779E82BF9; Wed, 13 Dec 2017 18:38:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C87527CF98; Wed, 13 Dec 2017 18:38:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDIc2Xk007625; Wed, 13 Dec 2017 18:38:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDIc2OM007623; Wed, 13 Dec 2017 18:38:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712131838.vBDIc2OM007623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 13 Dec 2017 18:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326830 - in stable: 10/lib/msun/man 11/lib/msun/man X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/msun/man 11/lib/msun/man X-SVN-Commit-Revision: 326830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 18:38:04 -0000 Author: dim Date: Wed Dec 13 18:38:02 2017 New Revision: 326830 URL: https://svnweb.freebsd.org/changeset/base/326830 Log: MFC r326748: Document the existence and precision of the remaining long double functions for which an imprecise stub implementation was added in r255294, namely powl(3) and tgammal(3). Submitted by: Steve Kargl MFC r326753: Correct r326748, indicating that tgammal(3) is mapped to tgamma(3), not to itself. Noticed by: jilles Modified: stable/10/lib/msun/man/exp.3 stable/10/lib/msun/man/lgamma.3 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/msun/man/exp.3 stable/11/lib/msun/man/lgamma.3 Directory Properties: stable/11/ (props changed) Modified: stable/10/lib/msun/man/exp.3 ============================================================================== --- stable/10/lib/msun/man/exp.3 Wed Dec 13 17:11:57 2017 (r326829) +++ stable/10/lib/msun/man/exp.3 Wed Dec 13 18:38:02 2017 (r326830) @@ -28,7 +28,7 @@ .\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91 .\" $FreeBSD$ .\" -.Dd November 9, 2015 +.Dd December 8, 2017 .Dt EXP 3 .Os .Sh NAME @@ -180,6 +180,15 @@ If 0**0 = 1, then then \*(Na**0 = 1 too because x**0 = 1 for all finite and infinite x, i.e., independently of x. .El +.Sh BUGS +To conform with newer C/C++ standards, a stub implementation for +.Nm powl +was committed to the math library, where +.Nm powl +is mapped to +.Nm pow . +Thus, the numerical accuracy is at most that of the 53-bit double +precision implementation. .Sh SEE ALSO .Xr fenv 3 , .Xr ldexp 3 , Modified: stable/10/lib/msun/man/lgamma.3 ============================================================================== --- stable/10/lib/msun/man/lgamma.3 Wed Dec 13 17:11:57 2017 (r326829) +++ stable/10/lib/msun/man/lgamma.3 Wed Dec 13 18:38:02 2017 (r326830) @@ -28,7 +28,7 @@ .\" from: @(#)lgamma.3 6.6 (Berkeley) 12/3/92 .\" $FreeBSD$ .\" -.Dd September 12, 2014 +.Dd December 8, 2017 .Dt LGAMMA 3 .Os .Sh NAME @@ -43,7 +43,8 @@ .Nm gammaf , .Nm gammaf_r , .Nm tgamma , -.Nm tgammaf +.Nm tgammaf , +.Nm tgammal , .Nd log gamma functions, gamma function .Sh LIBRARY .Lb libm @@ -76,6 +77,8 @@ .Fn tgamma "double x" .Ft float .Fn tgammaf "float x" +.Ft "long double" +.Fn tgammal "long double x" .Sh DESCRIPTION .Fn lgamma x , .Fn lgammaf x , @@ -106,9 +109,10 @@ and but the caller must provide an integer to store the sign of \(*G(x). .Pp The -.Fn tgamma x +.Fn tgamma x , +.Fn tgammaf x , and -.Fn tgammaf x +.Fn tgammal x functions return \(*G(x), with no effect on .Fa signgam . .Pp @@ -167,6 +171,15 @@ non-positive integers. For large non-integer negative values, .Fn tgamma will underflow. +.Sh BUGS +To conform with newer C/C++ standards, a stub implementation for +.Nm tgammal +was committed to the math library, where +.Nm tgammal +is mapped to +.Nm tgamma . +Thus, the numerical accuracy is at most that of the 53-bit double +precision implementation. .Sh SEE ALSO .Xr math 3 .Sh STANDARDS @@ -175,8 +188,9 @@ The .Fn lgammaf , .Fn lgammal , .Fn tgamma , +.Fn tgammaf , and -.Fn tgammaf +.Fn tgammal functions are expected to conform to .St -isoC-99 . .Sh HISTORY From owner-svn-src-all@freebsd.org Wed Dec 13 18:38:03 2017 Return-Path: Delivered-To: svn-src-all@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 DA87DE82BF8; Wed, 13 Dec 2017 18:38:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 979607CF92; Wed, 13 Dec 2017 18:38:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDIc2VD007618; Wed, 13 Dec 2017 18:38:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDIc2Av007616; Wed, 13 Dec 2017 18:38:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712131838.vBDIc2Av007616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 13 Dec 2017 18:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326830 - in stable: 10/lib/msun/man 11/lib/msun/man X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/msun/man 11/lib/msun/man X-SVN-Commit-Revision: 326830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 18:38:04 -0000 Author: dim Date: Wed Dec 13 18:38:02 2017 New Revision: 326830 URL: https://svnweb.freebsd.org/changeset/base/326830 Log: MFC r326748: Document the existence and precision of the remaining long double functions for which an imprecise stub implementation was added in r255294, namely powl(3) and tgammal(3). Submitted by: Steve Kargl MFC r326753: Correct r326748, indicating that tgammal(3) is mapped to tgamma(3), not to itself. Noticed by: jilles Modified: stable/11/lib/msun/man/exp.3 stable/11/lib/msun/man/lgamma.3 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/msun/man/exp.3 stable/10/lib/msun/man/lgamma.3 Directory Properties: stable/10/ (props changed) Modified: stable/11/lib/msun/man/exp.3 ============================================================================== --- stable/11/lib/msun/man/exp.3 Wed Dec 13 17:11:57 2017 (r326829) +++ stable/11/lib/msun/man/exp.3 Wed Dec 13 18:38:02 2017 (r326830) @@ -28,7 +28,7 @@ .\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91 .\" $FreeBSD$ .\" -.Dd November 9, 2015 +.Dd December 8, 2017 .Dt EXP 3 .Os .Sh NAME @@ -180,6 +180,15 @@ If 0**0 = 1, then then \*(Na**0 = 1 too because x**0 = 1 for all finite and infinite x, i.e., independently of x. .El +.Sh BUGS +To conform with newer C/C++ standards, a stub implementation for +.Nm powl +was committed to the math library, where +.Nm powl +is mapped to +.Nm pow . +Thus, the numerical accuracy is at most that of the 53-bit double +precision implementation. .Sh SEE ALSO .Xr fenv 3 , .Xr ldexp 3 , Modified: stable/11/lib/msun/man/lgamma.3 ============================================================================== --- stable/11/lib/msun/man/lgamma.3 Wed Dec 13 17:11:57 2017 (r326829) +++ stable/11/lib/msun/man/lgamma.3 Wed Dec 13 18:38:02 2017 (r326830) @@ -28,7 +28,7 @@ .\" from: @(#)lgamma.3 6.6 (Berkeley) 12/3/92 .\" $FreeBSD$ .\" -.Dd September 12, 2014 +.Dd December 8, 2017 .Dt LGAMMA 3 .Os .Sh NAME @@ -43,7 +43,8 @@ .Nm gammaf , .Nm gammaf_r , .Nm tgamma , -.Nm tgammaf +.Nm tgammaf , +.Nm tgammal , .Nd log gamma functions, gamma function .Sh LIBRARY .Lb libm @@ -76,6 +77,8 @@ .Fn tgamma "double x" .Ft float .Fn tgammaf "float x" +.Ft "long double" +.Fn tgammal "long double x" .Sh DESCRIPTION .Fn lgamma x , .Fn lgammaf x , @@ -106,9 +109,10 @@ and but the caller must provide an integer to store the sign of \(*G(x). .Pp The -.Fn tgamma x +.Fn tgamma x , +.Fn tgammaf x , and -.Fn tgammaf x +.Fn tgammal x functions return \(*G(x), with no effect on .Fa signgam . .Pp @@ -166,6 +170,15 @@ non-positive integers. For large non-integer negative values, .Fn tgamma will underflow. +.Sh BUGS +To conform with newer C/C++ standards, a stub implementation for +.Nm tgammal +was committed to the math library, where +.Nm tgammal +is mapped to +.Nm tgamma . +Thus, the numerical accuracy is at most that of the 53-bit double +precision implementation. .Sh SEE ALSO .Xr math 3 .Sh STANDARDS @@ -174,8 +187,9 @@ The .Fn lgammaf , .Fn lgammal , .Fn tgamma , +.Fn tgammaf , and -.Fn tgammaf +.Fn tgammal functions are expected to conform to .St -isoC-99 . .Sh HISTORY From owner-svn-src-all@freebsd.org Wed Dec 13 18:52:35 2017 Return-Path: Delivered-To: svn-src-all@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 EE460E8366C; Wed, 13 Dec 2017 18:52:35 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (vps.rulingia.com [103.243.244.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2F537DF32; Wed, 13 Dec 2017 18:52:35 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp59-167-167-3.static.internode.on.net [59.167.167.3]) by vps.rulingia.com (8.15.2/8.15.2) with ESMTPS id vBDIqKNW057884 (version=TLSv1.2 cipher=DHE-RSA-CHACHA20-POLY1305 bits=256 verify=OK); Thu, 14 Dec 2017 05:52:26 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id vBDIqFrT012087 (version=TLSv1.2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256 verify=NO); Thu, 14 Dec 2017 05:52:15 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id vBDIqFBZ012086; Thu, 14 Dec 2017 05:52:15 +1100 (AEDT) (envelope-from peter) Date: Thu, 14 Dec 2017 05:52:15 +1100 From: Peter Jeremy To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r326619 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20171213185214.GA12026@server.rulingia.com> References: <201712061001.vB6A12Ot032201@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <201712061001.vB6A12Ot032201@repo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 18:52:36 -0000 --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2017-Dec-06 10:01:02 +0000, Baptiste Daroussin wrote: >Author: bapt >Date: Wed Dec 6 10:01:02 2017 >New Revision: 326619 >URL: https://svnweb.freebsd.org/changeset/base/326619 > >Log: > MFC r325851: > =20 > remove the poor emulation of the IllumOS needfree global variable to pre= vent > the ARC reclaim thread running longer than needed. > =20 This change appears to break the backpressure mechanism that forces ARC to release wired memory. Running FreeBSD/amd64 r326743, I found that my system was thrashing badly with almost all memory (~31GB out of 32GB) wired (including 19GB ARC, 7GB VBox guests). Running a tool that just allocates and dirties a large amount of memory had no effect on the ARC size. Reverting this change only restores normal behaviour where ARC will shrink under pressure. My ZFS boot tunables are: vfs.zfs.arc_max=3D"24G" vfs.zfs.arc_meta_limit=3D"12G" --=20 Peter Jeremy --wac7ysb48OaltWcw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJaMXbeXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0qBEP/jgEyTai46NhxOuUzzxI6y2g rwnxgAAX+yMOU4ZdaK0SuSQUsmCS1SHQnuORG1Ay1CCaWcf6vtKEt0Ce90+zTMjZ qqmWLvBOOCfBSCTQzcVs1ICcKtML/zsXEO2wxyZu94yIc4kwa5Az4R5J5RCeCb9w 1iGSFWbeyTevC0QReKgj2NKhVZ6Lb9281GXq3aZJH1cONG1xDCOb9V8kw9VRtj/G sy5gaUK8ph+BWySd/PJ02cibJBPUptHSBUQdJGnU2h7HLuy/dO0tFrb2WmDozsFE CXeuPtdE8bOlJVEMFj7w1KYPIXjKBUP6g+y1ZI7hFWrecbwLWVWCiO0AmB5/bZTT +D79/c7DxLMIXwjN8iaRwJiAfMeFJcZQFVu7RtKHHb9gEpAU5QRt57RjJtqTuhXn 5tC5M1DDv5lwz6cACFG7dlRfaLvAcJgfhG0hJKtWlFlSUSfpX/Mlcv2gJUWZz/4t K/wE1iRX+EvRkmFnBThJtzizyu1NIyT+CZu4PbwiL6WJdesoO3f+vfcBnQaDR2gL /bHSofISm/GKhpCbzmbaZ7Xw1Fp/S6TBthKBESYFTExKze4Am6EdayqphIa9Sytj J9euCfAxags1d3IJ30GF7pNzqYBgXmobd4Wfca1F8P1ZQRtPtqHg6wb1kIOKYyAm rTQkYjlzaOmbjMrz0H4Y =fypZ -----END PGP SIGNATURE----- --wac7ysb48OaltWcw-- From owner-svn-src-all@freebsd.org Wed Dec 13 19:03:49 2017 Return-Path: Delivered-To: svn-src-all@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 E2C8DE83A4B; Wed, 13 Dec 2017 19:03:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B48EE7E526; Wed, 13 Dec 2017 19:03:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDJ3mkl020242; Wed, 13 Dec 2017 19:03:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDJ3m5p020237; Wed, 13 Dec 2017 19:03:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712131903.vBDJ3m5p020237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 13 Dec 2017 19:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326831 - head/contrib/llvm/tools/lld/ELF X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm/tools/lld/ELF X-SVN-Commit-Revision: 326831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 19:03:50 -0000 Author: dim Date: Wed Dec 13 19:03:48 2017 New Revision: 326831 URL: https://svnweb.freebsd.org/changeset/base/326831 Log: Pull in r315334 from upstream lld trunk (by Rafael Espindola): Don't create a dummy __tls_get_addr. We just don't need one with the current setup. We only error on undefined references that are used by some relocation. If we managed to relax all uses of __tls_get_addr, no relocation uses it and we don't produce an error. This is less code and fixes the case were we fail to relax. Before we would produce a broken output, but now we produce an error. Pull in r320390 from upstream lld trunk (by Rafael Espindola): Create reserved symbols early so they can be versioned. This fixes pr35570. We were creating these symbols after parsing version scripts, so they could not be versioned. We cannot move the version script parsing later because we need it for lto. One option is to move both addReservedSymbols and createSyntheticSections earlier. The disadvantage is that some sections created by createSyntheticSections replace other input sections. For example, gdb index replaces .debug_gnu_pubnames, so it wants to run after gc sections so that it can set S->Live to false. What this patch does instead is to move just the ElfHeader creation early. Pull in r320412 from upstream lld trunk (by Rafael Espindola): Handle symbols pointing to output sections. Now that gc sections runs after linker defined symbols are added it can see symbols that point to an OutputSection. Should fix a bot failure. Pull in r320431 from upstream lld trunk (by Peter Collingbourne): ELF: Do not follow relocation edges to output sections during GC. This fixes an assertion error introduced by r320390. Differential Revision: https://reviews.llvm.org/D41095 Together these fix handling of reserved symbols, in particular _end, which is needed to make brk(2) and sbrk(2) work correctly. This unbreaks the emacs ports on amd64, and also appears to unbreak most of world on i386. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D13466 Modified: head/contrib/llvm/tools/lld/ELF/Driver.cpp head/contrib/llvm/tools/lld/ELF/MarkLive.cpp head/contrib/llvm/tools/lld/ELF/Writer.cpp head/contrib/llvm/tools/lld/ELF/Writer.h Modified: head/contrib/llvm/tools/lld/ELF/Driver.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/Driver.cpp Wed Dec 13 18:38:02 2017 (r326830) +++ head/contrib/llvm/tools/lld/ELF/Driver.cpp Wed Dec 13 19:03:48 2017 (r326831) @@ -1010,6 +1010,15 @@ template void LinkerDriver::link(opt::Inp if (Args.hasArg(OPT_exclude_libs)) excludeLibs(Args, Files); + // Create ElfHeader early. We need a dummy section in + // addReservedSymbols to mark the created symbols as not absolute. + Out::ElfHeader = make("", 0, SHF_ALLOC); + Out::ElfHeader->Size = sizeof(typename ELFT::Ehdr); + + // We need to create some reserved symbols such as _end. Create them. + if (!Config->Relocatable) + addReservedSymbols(); + // Apply version scripts. Symtab.scanVersionScript(); Modified: head/contrib/llvm/tools/lld/ELF/MarkLive.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/MarkLive.cpp Wed Dec 13 18:38:02 2017 (r326830) +++ head/contrib/llvm/tools/lld/ELF/MarkLive.cpp Wed Dec 13 19:03:48 2017 (r326831) @@ -73,12 +73,13 @@ static void resolveReloc(InputSectionBase &Sec, RelT & std::function Fn) { SymbolBody &B = Sec.getFile()->getRelocTargetSym(Rel); if (auto *D = dyn_cast(&B)) { - if (!D->Section) + auto *RelSec = dyn_cast_or_null(D->Section); + if (!RelSec) return; typename ELFT::uint Offset = D->Value; if (D->isSection()) Offset += getAddend(Sec, Rel); - Fn({cast(D->Section), Offset}); + Fn({RelSec, Offset}); } else if (auto *U = dyn_cast(&B)) { for (InputSectionBase *Sec : CNamedSections.lookup(U->getName())) Fn({Sec, 0}); @@ -220,7 +221,7 @@ template void elf::markLive() { auto MarkSymbol = [&](const SymbolBody *Sym) { if (auto *D = dyn_cast_or_null(Sym)) - if (auto *IS = cast_or_null(D->Section)) + if (auto *IS = dyn_cast_or_null(D->Section)) Enqueue({IS, D->Value}); }; Modified: head/contrib/llvm/tools/lld/ELF/Writer.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/Writer.cpp Wed Dec 13 18:38:02 2017 (r326830) +++ head/contrib/llvm/tools/lld/ELF/Writer.cpp Wed Dec 13 19:03:48 2017 (r326831) @@ -50,7 +50,6 @@ template class Writer { (private) void createSyntheticSections(); void copyLocalSymbols(); void addSectionSymbols(); - void addReservedSymbols(); void createSections(); void forEachRelSec(std::function Fn); void sortSections(); @@ -168,10 +167,6 @@ template void Writer::run() { if (!Config->Relocatable) combineEhFrameSections(); - // We need to create some reserved symbols such as _end. Create them. - if (!Config->Relocatable) - addReservedSymbols(); - // Create output sections. if (Script->Opt.HasSections) { // If linker script contains SECTIONS commands, let it create sections. @@ -286,8 +281,6 @@ template void Writer::createSynthet Config->IsRela ? ".rela.dyn" : ".rel.dyn", Config->ZCombreloc); InX::ShStrTab = make(".shstrtab", false); - Out::ElfHeader = make("", 0, SHF_ALLOC); - Out::ElfHeader->Size = sizeof(Elf_Ehdr); Out::ProgramHeaders = make("", 0, SHF_ALLOC); Out::ProgramHeaders->updateAlignment(Config->Wordsize); @@ -796,7 +789,7 @@ template void Writer::addRelIpltSym // The linker is expected to define some symbols depending on // the linking result. This function defines such symbols. -template void Writer::addReservedSymbols() { +template void elf::addReservedSymbols() { if (Config->EMachine == EM_MIPS) { // Define _gp for MIPS. st_value of _gp symbol will be updated by Writer // so that it points to an absolute address which by default is relative @@ -820,21 +813,9 @@ template void Writer::addReservedSy Symtab::X->addAbsolute("__gnu_local_gp", STV_HIDDEN, STB_LOCAL); } - // The _GLOBAL_OFFSET_TABLE_ symbol is defined by target convention to - // be at some offset from the base of the .got section, usually 0 or the end - // of the .got - InputSection *GotSection = InX::MipsGot ? cast(InX::MipsGot) - : cast(InX::Got); ElfSym::GlobalOffsetTable = addOptionalRegular( - "_GLOBAL_OFFSET_TABLE_", GotSection, Target->GotBaseSymOff); + "_GLOBAL_OFFSET_TABLE_", Out::ElfHeader, Target->GotBaseSymOff); - // __tls_get_addr is defined by the dynamic linker for dynamic ELFs. For - // static linking the linker is required to optimize away any references to - // __tls_get_addr, so it's not defined anywhere. Create a hidden definition - // to avoid the undefined symbol error. - if (!InX::DynSymTab) - Symtab::X->addIgnored("__tls_get_addr"); - // __ehdr_start is the location of ELF file headers. Note that we define // this symbol unconditionally even when using a linker script, which // differs from the behavior implemented by GNU linker which only define @@ -1721,6 +1702,15 @@ static uint16_t getELFType() { // to each section. This function fixes some predefined // symbol values that depend on section address and size. template void Writer::fixPredefinedSymbols() { + if (ElfSym::GlobalOffsetTable) { + // The _GLOBAL_OFFSET_TABLE_ symbol is defined by target convention to + // be at some offset from the base of the .got section, usually 0 or the end + // of the .got + InputSection *GotSection = InX::MipsGot ? cast(InX::MipsGot) + : cast(InX::Got); + ElfSym::GlobalOffsetTable->Section = GotSection; + } + // _etext is the first location after the last read-only loadable segment. // _edata is the first location after the last read-write loadable segment. // _end is the first location after the uninitialized data region. @@ -1911,3 +1901,8 @@ template void elf::writeResult(); template void elf::writeResult(); template void elf::writeResult(); template void elf::writeResult(); + +template void elf::addReservedSymbols(); +template void elf::addReservedSymbols(); +template void elf::addReservedSymbols(); +template void elf::addReservedSymbols(); Modified: head/contrib/llvm/tools/lld/ELF/Writer.h ============================================================================== --- head/contrib/llvm/tools/lld/ELF/Writer.h Wed Dec 13 18:38:02 2017 (r326830) +++ head/contrib/llvm/tools/lld/ELF/Writer.h Wed Dec 13 19:03:48 2017 (r326831) @@ -47,6 +47,7 @@ struct PhdrEntry { bool HasLMA = false; }; +template void addReservedSymbols(); llvm::StringRef getOutputSectionName(llvm::StringRef Name); template uint32_t getMipsEFlags(); From owner-svn-src-all@freebsd.org Wed Dec 13 19:36:31 2017 Return-Path: Delivered-To: svn-src-all@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 3B456E846B6; Wed, 13 Dec 2017 19:36:31 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05B117F525; Wed, 13 Dec 2017 19:36:30 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDJaT4Q032888; Wed, 13 Dec 2017 19:36:29 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDJaT3w032887; Wed, 13 Dec 2017 19:36:29 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201712131936.vBDJaT3w032887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 13 Dec 2017 19:36:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326832 - head/tools/tools/netmap X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/tools/tools/netmap X-SVN-Commit-Revision: 326832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 19:36:31 -0000 Author: cem Date: Wed Dec 13 19:36:29 2017 New Revision: 326832 URL: https://svnweb.freebsd.org/changeset/base/326832 Log: netmap pkt-gen tool: Fix memset(3) argument order Submitted by: Michael McConville Sponsored by: Dell EMC Isilon Modified: head/tools/tools/netmap/pkt-gen.c Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Wed Dec 13 19:03:48 2017 (r326831) +++ head/tools/tools/netmap/pkt-gen.c Wed Dec 13 19:36:29 2017 (r326832) @@ -612,7 +612,7 @@ dump_payload(const char *_p, int len, struct netmap_ri ring->slot[cur].flags, len); /* hexdump routine */ for (i = 0; i < len; ) { - memset(buf, sizeof(buf), ' '); + memset(buf, ' ', sizeof(buf)); sprintf(buf, "%5d: ", i); i0 = i; for (j=0; j < 16 && i < len; i++, j++) From owner-svn-src-all@freebsd.org Wed Dec 13 19:37:15 2017 Return-Path: Delivered-To: svn-src-all@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 BF338E84744; Wed, 13 Dec 2017 19:37:15 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A41E7F685; Wed, 13 Dec 2017 19:37:14 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBDJb0Qq028319 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2017 20:37:01 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: danfe@FreeBSD.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBDJaqpI081158 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 14 Dec 2017 02:36:52 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326809 - head/sys/dev/cardbus To: Alexey Dokuchaev References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> <20171213180801.GA28514@FreeBSD.org> <5A316E7B.8030504@grosbein.net> <20171213182452.GA51526@FreeBSD.org> Cc: rgrimes@freebsd.org, Warner Losh , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: Eugene Grosbein Message-ID: <5A318150.1000601@grosbein.net> Date: Thu, 14 Dec 2017 02:36:48 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20171213182452.GA51526@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS * 2.6 LOCAL_FROM From my domains X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 19:37:15 -0000 14.12.2017 1:24, Alexey Dokuchaev wrote: >>> I'm a plain workstation user with X11+browser+torrent+quake2+you-name-it >>> apps, PAE-less, ZFS-less, and I don't want to get troubles due to r326758. >> >> Add kern.kstack_size=2 to /boot/loader.conf of your workstation now >> and you will notice no difference. > > FreeBSD is largely known for its sane defaults. Users should not touch > those config files, especially if things worked for years without any > /boot/loader.conf tweaking. If there are cases of kernel stack pressure > like your script had revealed, they should be fixed, and defaults stay > as they are now. I agree they should be fixed. I don't see they fixed soon (have not for years and there too many) and until then FreeBSD/i386 should panic due to incoming SCTP/IPV6 packet? > One does not tweak FreeBSD, it just works. (tm) Hmm. Do you really think so? I can assure you this is not true. There are numerous ways to take down untweaked FreeBSD system. From owner-svn-src-all@freebsd.org Wed Dec 13 20:15:25 2017 Return-Path: Delivered-To: svn-src-all@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 3D08DE85344; Wed, 13 Dec 2017 20:15:25 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E26FA80FD0; Wed, 13 Dec 2017 20:15:24 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDKFNtC049728; Wed, 13 Dec 2017 20:15:23 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDKFNNo049726; Wed, 13 Dec 2017 20:15:23 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201712132015.vBDKFNNo049726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 13 Dec 2017 20:15:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326833 - in stable: 10 11 X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10 11 X-SVN-Commit-Revision: 326833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 20:15:25 -0000 Author: cy Date: Wed Dec 13 20:15:23 2017 New Revision: 326833 URL: https://svnweb.freebsd.org/changeset/base/326833 Log: MFC r324248: hen building multiple kernels using KERNCONF, non-existent KERNCONF files will produce an error and buildkernel will fail. Previously missing KERNCONF files silently failed giving no indication as to why, only to subsequently discover during installkernel that the desired kernel was never built in the first place. This is a rework of r302865. This is the correct patch. Reviewed by: ngie (previous version, r302865) Differential Revision: https://reviews.freebsd.org/D7167 Modified: stable/11/Makefile.inc1 stable/11/UPDATING Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/Makefile.inc1 stable/10/UPDATING Directory Properties: stable/10/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Wed Dec 13 19:36:29 2017 (r326832) +++ stable/11/Makefile.inc1 Wed Dec 13 20:15:23 2017 (r326833) @@ -1210,6 +1210,10 @@ BUILDKERNELS+= ${_kernel} .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) INSTALLKERNEL= ${_kernel} .endif +.else +.if make(buildkernel) +.error Missing KERNCONF ${KERNCONFDIR}/${_kernel} +.endif .endif .endfor Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Wed Dec 13 19:36:29 2017 (r326832) +++ stable/11/UPDATING Wed Dec 13 20:15:23 2017 (r326833) @@ -16,6 +16,13 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20171003: + When building multiple kernels using KERNCONF, non-existent KERNCONF + files will produce an error and buildkernel will fail. Previously + missing KERNCONF files silently failed giving no indication as to + why, only to subsequently discover during installkernel that the + desired kernel was never built in the first place. + 20170926: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 5.0.0. Please see the 20141231 entry below for information about prerequisites From owner-svn-src-all@freebsd.org Wed Dec 13 20:15:25 2017 Return-Path: Delivered-To: svn-src-all@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 7196EE85348; Wed, 13 Dec 2017 20:15:25 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A97780FD1; Wed, 13 Dec 2017 20:15:25 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDKFOxT049736; Wed, 13 Dec 2017 20:15:24 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDKFOVe049734; Wed, 13 Dec 2017 20:15:24 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201712132015.vBDKFOVe049734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 13 Dec 2017 20:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326833 - in stable: 10 11 X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10 11 X-SVN-Commit-Revision: 326833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 20:15:25 -0000 Author: cy Date: Wed Dec 13 20:15:23 2017 New Revision: 326833 URL: https://svnweb.freebsd.org/changeset/base/326833 Log: MFC r324248: hen building multiple kernels using KERNCONF, non-existent KERNCONF files will produce an error and buildkernel will fail. Previously missing KERNCONF files silently failed giving no indication as to why, only to subsequently discover during installkernel that the desired kernel was never built in the first place. This is a rework of r302865. This is the correct patch. Reviewed by: ngie (previous version, r302865) Differential Revision: https://reviews.freebsd.org/D7167 Modified: stable/10/Makefile.inc1 stable/10/UPDATING Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/Makefile.inc1 stable/11/UPDATING Directory Properties: stable/11/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Wed Dec 13 19:36:29 2017 (r326832) +++ stable/10/Makefile.inc1 Wed Dec 13 20:15:23 2017 (r326833) @@ -1030,6 +1030,10 @@ BUILDKERNELS+= ${_kernel} .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) INSTALLKERNEL= ${_kernel} .endif +.else +.if make(buildkernel) +.error Missing KERNCONF ${KERNCONFDIR}/${_kernel} +.endif .endif .endfor Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Wed Dec 13 19:36:29 2017 (r326832) +++ stable/10/UPDATING Wed Dec 13 20:15:23 2017 (r326833) @@ -16,6 +16,13 @@ from older versions of FreeBSD, try WITHOUT_CLANG to b stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20171003: + When building multiple kernels using KERNCONF, non-existent KERNCONF + files will produce an error and buildkernel will fail. Previously + missing KERNCONF files silently failed giving no indication as to + why, only to subsequently discover during installkernel that the + desired kernel was never built in the first place. + 20170824: Since the switch to GPT disk labels, fsck for UFS/FFS has been unable to automatically find alternate superblocks. As of r322860, From owner-svn-src-all@freebsd.org Wed Dec 13 20:48:22 2017 Return-Path: Delivered-To: svn-src-all@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 56B8FE864DB; Wed, 13 Dec 2017 20:48:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23CC6269A; Wed, 13 Dec 2017 20:48:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDKmLhd062455; Wed, 13 Dec 2017 20:48:21 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDKmL1b062454; Wed, 13 Dec 2017 20:48:21 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712132048.vBDKmL1b062454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 13 Dec 2017 20:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326834 - head/sbin/dhclient X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/dhclient X-SVN-Commit-Revision: 326834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 20:48:22 -0000 Author: asomers Date: Wed Dec 13 20:48:20 2017 New Revision: 326834 URL: https://svnweb.freebsd.org/changeset/base/326834 Log: dhclient(8): Don't shift through the sign bit of a signed int PR: 208007 Submitted by: Michael McConville MFC after: 3 weeks Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Wed Dec 13 20:15:23 2017 (r326833) +++ head/sbin/dhclient/dhclient.c Wed Dec 13 20:48:20 2017 (r326834) @@ -150,7 +150,7 @@ int findproto(char *cp, int n) { struct sockaddr *sa; - int i; + unsigned i; if (n == 0) return -1; @@ -180,7 +180,7 @@ struct sockaddr * get_ifa(char *cp, int n) { struct sockaddr *sa; - int i; + unsigned i; if (n == 0) return (NULL); From owner-svn-src-all@freebsd.org Wed Dec 13 21:17:01 2017 Return-Path: Delivered-To: svn-src-all@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 BE366E876B8; Wed, 13 Dec 2017 21:17:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9781E6450C; Wed, 13 Dec 2017 21:17:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDLH0cb078544; Wed, 13 Dec 2017 21:17:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBDLH0eH078533; Wed, 13 Dec 2017 21:17:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201712132117.vBDLH0eH078533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 Dec 2017 21:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326835 - in head/sys/cam: ata nvme scsi X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/sys/cam: ata nvme scsi X-SVN-Commit-Revision: 326835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 21:17:01 -0000 Author: mav Date: Wed Dec 13 21:17:00 2017 New Revision: 326835 URL: https://svnweb.freebsd.org/changeset/base/326835 Log: Reduce size of several on-stack string buffers. Submitted by: Dmitry Luhtionov MFC after: 2 weeks Modified: head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_pmp.c head/sys/cam/nvme/nvme_da.c head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_sa.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Dec 13 20:48:20 2017 (r326834) +++ head/sys/cam/ata/ata_da.c Wed Dec 13 21:17:00 2017 (r326835) @@ -1411,7 +1411,7 @@ adasysctlinit(void *context, int pending) { struct cam_periph *periph; struct ada_softc *softc; - char tmpstr[80], tmpstr2[80]; + char tmpstr[32], tmpstr2[16]; periph = (struct cam_periph *)context; Modified: head/sys/cam/ata/ata_pmp.c ============================================================================== --- head/sys/cam/ata/ata_pmp.c Wed Dec 13 20:48:20 2017 (r326834) +++ head/sys/cam/ata/ata_pmp.c Wed Dec 13 21:17:00 2017 (r326835) @@ -340,7 +340,7 @@ pmpsysctlinit(void *context, int pending) { struct cam_periph *periph; struct pmp_softc *softc; - char tmpstr[80], tmpstr2[80]; + char tmpstr[32], tmpstr2[16]; periph = (struct cam_periph *)context; if (cam_periph_acquire(periph) != CAM_REQ_CMP) Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Wed Dec 13 20:48:20 2017 (r326834) +++ head/sys/cam/nvme/nvme_da.c Wed Dec 13 21:17:00 2017 (r326835) @@ -584,7 +584,7 @@ ndasysctlinit(void *context, int pending) { struct cam_periph *periph; struct nda_softc *softc; - char tmpstr[80], tmpstr2[80]; + char tmpstr[32], tmpstr2[16]; periph = (struct cam_periph *)context; Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Wed Dec 13 20:48:20 2017 (r326834) +++ head/sys/cam/scsi/scsi_cd.c Wed Dec 13 21:17:00 2017 (r326835) @@ -477,7 +477,7 @@ cdsysctlinit(void *context, int pending) { struct cam_periph *periph; struct cd_softc *softc; - char tmpstr[80], tmpstr2[80]; + char tmpstr[32], tmpstr2[16]; periph = (struct cam_periph *)context; if (cam_periph_acquire(periph) != CAM_REQ_CMP) Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Dec 13 20:48:20 2017 (r326834) +++ head/sys/cam/scsi/scsi_da.c Wed Dec 13 21:17:00 2017 (r326835) @@ -1951,7 +1951,7 @@ dasysctlinit(void *context, int pending) { struct cam_periph *periph; struct da_softc *softc; - char tmpstr[80], tmpstr2[80]; + char tmpstr[32], tmpstr2[16]; struct ccb_trans_settings cts; periph = (struct cam_periph *)context; Modified: head/sys/cam/scsi/scsi_sa.c ============================================================================== --- head/sys/cam/scsi/scsi_sa.c Wed Dec 13 20:48:20 2017 (r326834) +++ head/sys/cam/scsi/scsi_sa.c Wed Dec 13 21:17:00 2017 (r326835) @@ -2296,7 +2296,7 @@ sasysctlinit(void *context, int pending) { struct cam_periph *periph; struct sa_softc *softc; - char tmpstr[80], tmpstr2[80]; + char tmpstr[32], tmpstr2[16]; periph = (struct cam_periph *)context; /* From owner-svn-src-all@freebsd.org Thu Dec 14 01:58:07 2017 Return-Path: Delivered-To: svn-src-all@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 AC5D1E8F000; Thu, 14 Dec 2017 01:58:07 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C50C6D104; Thu, 14 Dec 2017 01:58:07 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBE1w6Rj095072; Thu, 14 Dec 2017 01:58:06 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBE1w5d8095065; Thu, 14 Dec 2017 01:58:05 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201712140158.vBE1w5d8095065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Thu, 14 Dec 2017 01:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326836 - in head: share/man/man9 sys/dev/bhnd sys/dev/bhnd/bhndb sys/mips/broadcom X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: in head: share/man/man9 sys/dev/bhnd sys/dev/bhnd/bhndb sys/mips/broadcom X-SVN-Commit-Revision: 326836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 01:58:07 -0000 Author: landonf Date: Thu Dec 14 01:58:05 2017 New Revision: 326836 URL: https://svnweb.freebsd.org/changeset/base/326836 Log: bhnd(4): Include board_devid in the bhnd_board_info structure, and populate the expected default board_vendor value on MIPS SoCs. This is required by bwn(4) to differentiate between single-band and dual-band device variants that otherwise share a common chip ID. Approved by: adrian (mentor, implicit) Sponsored by: The FreeBSD Foundation Modified: head/share/man/man9/bhnd.9 head/sys/dev/bhnd/bhnd.c head/sys/dev/bhnd/bhnd.h head/sys/dev/bhnd/bhnd_match.h head/sys/dev/bhnd/bhnd_subr.c head/sys/dev/bhnd/bhndb/bhndb_pci.c head/sys/mips/broadcom/bhnd_nexus.c Modified: head/share/man/man9/bhnd.9 ============================================================================== --- head/share/man/man9/bhnd.9 Wed Dec 13 21:17:00 2017 (r326835) +++ head/share/man/man9/bhnd.9 Thu Dec 14 01:58:05 2017 (r326836) @@ -1309,8 +1309,9 @@ structure contains the following fields: .It Fa board_vendor Vendor ID of the board manufacturer (PCI-SIG assigned). .It Fa board_type +Board ID. +.It Fa board_devid Device ID. -This is generally a Broadcom-assigned globally unique identifier. .It Fa board_rev Board revision. .It Fa board_srom_rev @@ -1323,12 +1324,25 @@ Board flags (2) Board flags (3) .El .Pp +The +.Fa board_devid +field is the Broadcom PCI device ID that most closely matches the +capabilities of the BHND device (if any). +.Pp On PCI devices, the -.Fa board_vendor +.Fa board_vendor , +.Fa board_type , and -.Fa board_type -fields default to the PCI Subsystem Vendor ID and PCI Subsystem ID, unless -overridden in device NVRAM. +.Fa board_devid +fields default to the PCI Subsystem Vendor ID, PCI Subsystem ID, and PCI +device ID, unless overridden in device NVRAM. +.Pp +On other devices, including SoCs, the +.Fa board_vendor , +.Fa board_type , +and +.Fa board_devid +fields will be populated from device NVRAM. .Pp Symbolic constants for common board flags are defined in .In dev/bhnd/bhnd_ids.h . Modified: head/sys/dev/bhnd/bhnd.c ============================================================================== --- head/sys/dev/bhnd/bhnd.c Wed Dec 13 21:17:00 2017 (r326835) +++ head/sys/dev/bhnd/bhnd.c Thu Dec 14 01:58:05 2017 (r326836) @@ -1140,7 +1140,6 @@ static device_method_t bhnd_methods[] = { /* BHND interface */ DEVMETHOD(bhnd_bus_get_chipid, bhnd_bus_generic_get_chipid), DEVMETHOD(bhnd_bus_is_hw_disabled, bhnd_bus_generic_is_hw_disabled), - DEVMETHOD(bhnd_bus_read_board_info, bhnd_bus_generic_read_board_info), DEVMETHOD(bhnd_bus_get_probe_order, bhnd_generic_get_probe_order), Modified: head/sys/dev/bhnd/bhnd.h ============================================================================== --- head/sys/dev/bhnd/bhnd.h Wed Dec 13 21:17:00 2017 (r326835) +++ head/sys/dev/bhnd/bhnd.h Thu Dec 14 01:58:05 2017 (r326836) @@ -163,20 +163,41 @@ BHND_ACCESSOR(pmu_info, PMU_INFO, void *); * A bhnd(4) board descriptor. */ struct bhnd_board_info { - uint16_t board_vendor; /**< PCI-SIG vendor ID (even on non-PCI - * devices). + uint16_t board_vendor; /**< Board vendor (PCI-SIG vendor ID). * - * On PCI devices, this will generally - * be the subsystem vendor ID, but the - * value may be overridden in device - * NVRAM. + * On PCI devices, this will default to + * the PCI subsystem vendor ID, but may + * be overridden by the 'boardtype' + * NVRAM variable. + * + * On SoCs, this will default to + * PCI_VENDOR_BROADCOM, but may be + * overridden by the 'boardvendor' + * NVRAM variable. */ uint16_t board_type; /**< Board type (See BHND_BOARD_*) * - * On PCI devices, this will generally - * be the subsystem device ID, but the - * value may be overridden in device - * NVRAM. + * This value is usually a + * Broadcom-assigned reference board + * identifier (see BHND_BOARD_*), but + * may be set to an arbitrary value + * assigned by the board vendor. + * + * On PCI devices, this will default + * to the PCI subsystem ID, but may be + * overridden by the 'boardtype' + * NVRAM variable. + * + * On SoCs, this will always be + * populated with the value of the + * 'boardtype' NVRAM variable. + */ + uint16_t board_devid; /**< Board device ID. + * + * On PCI devices, this will default + * to the PCI device ID, but may + * be overridden by the 'devid' + * NVRAM variable. */ uint16_t board_rev; /**< Board revision. */ uint8_t board_srom_rev; /**< Board SROM format revision */ Modified: head/sys/dev/bhnd/bhnd_match.h ============================================================================== --- head/sys/dev/bhnd/bhnd_match.h Wed Dec 13 21:17:00 2017 (r326835) +++ head/sys/dev/bhnd/bhnd_match.h Thu Dec 14 01:58:05 2017 (r326836) @@ -217,14 +217,16 @@ struct bhnd_board_match { uint8_t board_vendor:1, board_type:1, + board_devid:1, board_rev:1, board_srom_rev:1, - flags_unused:4; + flags_unused:3; } match; } m; uint16_t board_vendor; /**< required board vendor */ uint16_t board_type; /**< required board type */ + uint16_t board_devid; /**< required board devid */ struct bhnd_hwrev_match board_rev; /**< matching board revisions */ struct bhnd_hwrev_match board_srom_rev; /**< matching board srom revisions */ }; @@ -232,6 +234,7 @@ struct bhnd_board_match { #define _BHND_BOARD_MATCH_COPY(_src) \ _BHND_COPY_MATCH_FIELD(_src, board_vendor), \ _BHND_COPY_MATCH_FIELD(_src, board_type), \ + _BHND_COPY_MATCH_FIELD(_src, board_devid), \ _BHND_COPY_MATCH_FIELD(_src, board_rev), \ _BHND_COPY_MATCH_FIELD(_src, board_srom_rev) @@ -241,6 +244,11 @@ struct bhnd_board_match { /** Set the required board type within a bhnd match descriptor */ #define BHND_MATCH_BOARD_TYPE(_type) _BHND_SET_MATCH_FIELD(board_type, \ BHND_BOARD_ ## _type) + +/** Set the required board devid within a bhnd match descriptor */ +#define BHND_MATCH_BOARD_DEVID(_devid) _BHND_SET_MATCH_FIELD(board_devid, \ + (_devid)) + /** Set the required SROM revision range within a bhnd match descriptor */ #define BHND_MATCH_SROMREV(_rev) _BHND_SET_MATCH_FIELD(board_srom_rev, \ BHND_HWREV_ ## _rev) @@ -278,9 +286,10 @@ struct bhnd_device_match { chip_type:1, board_vendor:1, board_type:1, + board_devid:1, board_rev:1, board_srom_rev:1, - flags_unused:16; + flags_unused:15; } match; } m; @@ -298,6 +307,7 @@ struct bhnd_device_match { uint16_t board_vendor; /**< required board vendor */ uint16_t board_type; /**< required board type */ + uint16_t board_devid; /**< required board devid */ struct bhnd_hwrev_match board_rev; /**< matching board revisions */ struct bhnd_hwrev_match board_srom_rev; /**< matching board srom revisions */ }; Modified: head/sys/dev/bhnd/bhnd_subr.c ============================================================================== --- head/sys/dev/bhnd/bhnd_subr.c Wed Dec 13 21:17:00 2017 (r326835) +++ head/sys/dev/bhnd/bhnd_subr.c Thu Dec 14 01:58:05 2017 (r326836) @@ -807,6 +807,10 @@ bhnd_board_matches(const struct bhnd_board_info *board if (desc->m.match.board_type && board->board_type != desc->board_type) return (false); + if (desc->m.match.board_devid && + board->board_devid != desc->board_devid) + return (false); + if (desc->m.match.board_rev && !bhnd_hwrev_matches(board->board_rev, &desc->board_rev)) return (false); @@ -2325,6 +2329,7 @@ bhnd_bus_generic_read_board_info(device_t dev, device_ OPT_BHND_GV(info->board_vendor, BOARDVENDOR, 0); OPT_BHND_GV(info->board_type, BOARDTYPE, 0); /* srom >= 2 */ + OPT_BHND_GV(info->board_devid, DEVID, 0); /* srom >= 8 */ REQ_BHND_GV(info->board_rev, BOARDREV); OPT_BHND_GV(info->board_srom_rev,SROMREV, 0); /* missing in some SoC Modified: head/sys/dev/bhnd/bhndb/bhndb_pci.c ============================================================================== --- head/sys/dev/bhnd/bhndb/bhndb_pci.c Wed Dec 13 21:17:00 2017 (r326835) +++ head/sys/dev/bhnd/bhndb/bhndb_pci.c Thu Dec 14 01:58:05 2017 (r326836) @@ -1002,13 +1002,16 @@ bhndb_pci_populate_board_info(device_t dev, device_t c } } - /* If NVRAM did not supply vendor/type info, provide the PCI - * subvendor/subdevice values. */ + /* If NVRAM did not supply vendor/type/devid info, provide the PCI + * subvendor/subdevice/device values. */ if (info->board_vendor == 0) info->board_vendor = pci_get_subvendor(sc->parent); if (info->board_type == 0) info->board_type = pci_get_subdevice(sc->parent); + + if (info->board_devid == 0) + info->board_devid = pci_get_device(sc->parent); return (0); } Modified: head/sys/mips/broadcom/bhnd_nexus.c ============================================================================== --- head/sys/mips/broadcom/bhnd_nexus.c Wed Dec 13 21:17:00 2017 (r326835) +++ head/sys/mips/broadcom/bhnd_nexus.c Thu Dec 14 01:58:05 2017 (r326836) @@ -153,6 +153,27 @@ bhnd_nexus_get_chipid(device_t dev, device_t child) } /** + * Default bhnd_nexus implementation of BHND_BUS_READ_BOARD_INFO(). + */ +static int +bhnd_nexus_read_board_info(device_t dev, device_t child, + struct bhnd_board_info *info) +{ + int error; + + /* Initialize with NVRAM-derived values */ + if ((error = bhnd_bus_generic_read_board_info(dev, child, info))) + return (error); + + /* The board vendor should default to PCI_VENDOR_BROADCOM if not + * otherwise specified */ + if (info->board_vendor == 0) + info->board_vendor = PCI_VENDOR_BROADCOM; + + return (0); +} + +/** * Default bhnd_nexus implementation of BHND_BUS_MAP_INTR(). */ static int @@ -249,6 +270,7 @@ static device_method_t bhnd_nexus_methods[] = { DEVMETHOD(bhnd_bus_get_dma_translation, bhnd_nexus_get_dma_translation), DEVMETHOD(bhnd_bus_get_intr_domain, bhnd_bus_generic_get_intr_domain), DEVMETHOD(bhnd_bus_map_intr, bhnd_nexus_map_intr), + DEVMETHOD(bhnd_bus_read_board_info, bhnd_nexus_read_board_info), DEVMETHOD(bhnd_bus_unmap_intr, bhnd_nexus_unmap_intr), DEVMETHOD_END From owner-svn-src-all@freebsd.org Thu Dec 14 03:03:10 2017 Return-Path: Delivered-To: svn-src-all@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 1C6A7E90DC3; Thu, 14 Dec 2017 03:03:10 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6E546F4DA; Thu, 14 Dec 2017 03:03:09 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBE338gN024710; Thu, 14 Dec 2017 03:03:08 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBE3383B024708; Thu, 14 Dec 2017 03:03:08 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201712140303.vBE3383B024708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Thu, 14 Dec 2017 03:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326837 - in head/sys/dev/bhnd: . tools X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: in head/sys/dev/bhnd: . tools X-SVN-Commit-Revision: 326837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 03:03:10 -0000 Author: landonf Date: Thu Dec 14 03:03:08 2017 New Revision: 326837 URL: https://svnweb.freebsd.org/changeset/base/326837 Log: bhnd(4): Add missing enclosing parentheses to the bhnd bus space macros to avoid precedence bugs. Approved by: adrian (mentor, implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/bhnd/bhnd.h head/sys/dev/bhnd/tools/bus_macro.sh Modified: head/sys/dev/bhnd/bhnd.h ============================================================================== --- head/sys/dev/bhnd/bhnd.h Thu Dec 14 01:58:05 2017 (r326836) +++ head/sys/dev/bhnd/bhnd.h Thu Dec 14 03:03:08 2017 (r326837) @@ -1502,262 +1502,262 @@ bhnd_get_region_addr(device_t dev, bhnd_port_type port * Generated with bhnd/tools/bus_macro.sh */ #define bhnd_bus_barrier(r, o, l, f) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_barrier((r)->res, (o), (l), (f)) : \ BHND_BUS_BARRIER( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (l), (f)) + rman_get_device((r)->res), (r), (o), (l), (f))) #define bhnd_bus_read_1(r, o) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_1((r)->res, (o)) : \ BHND_BUS_READ_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o)) + rman_get_device((r)->res), (r), (o))) #define bhnd_bus_read_multi_1(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_multi_1((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_MULTI_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_read_region_1(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_region_1((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_REGION_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_1(r, o, v) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_1((r)->res, (o), (v)) : \ BHND_BUS_WRITE_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v)) + rman_get_device((r)->res), (r), (o), (v))) #define bhnd_bus_write_multi_1(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_multi_1((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_MULTI_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_region_1(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_region_1((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_REGION_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_read_stream_1(r, o) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_stream_1((r)->res, (o)) : \ BHND_BUS_READ_STREAM_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o)) + rman_get_device((r)->res), (r), (o))) #define bhnd_bus_read_multi_stream_1(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_multi_stream_1((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_MULTI_STREAM_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_read_region_stream_1(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_region_stream_1((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_REGION_STREAM_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_stream_1(r, o, v) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_stream_1((r)->res, (o), (v)) : \ BHND_BUS_WRITE_STREAM_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v)) + rman_get_device((r)->res), (r), (o), (v))) #define bhnd_bus_write_multi_stream_1(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_multi_stream_1((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_MULTI_STREAM_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_region_stream_1(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_region_stream_1((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_REGION_STREAM_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_set_multi_1(r, o, v, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_set_multi_1((r)->res, (o), (v), (c)) : \ BHND_BUS_SET_MULTI_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v), (c)) + rman_get_device((r)->res), (r), (o), (v), (c))) #define bhnd_bus_set_region_1(r, o, v, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_set_region_1((r)->res, (o), (v), (c)) : \ BHND_BUS_SET_REGION_1( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v), (c)) + rman_get_device((r)->res), (r), (o), (v), (c))) #define bhnd_bus_read_2(r, o) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_2((r)->res, (o)) : \ BHND_BUS_READ_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o)) + rman_get_device((r)->res), (r), (o))) #define bhnd_bus_read_multi_2(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_multi_2((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_MULTI_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_read_region_2(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_region_2((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_REGION_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_2(r, o, v) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_2((r)->res, (o), (v)) : \ BHND_BUS_WRITE_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v)) + rman_get_device((r)->res), (r), (o), (v))) #define bhnd_bus_write_multi_2(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_multi_2((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_MULTI_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_region_2(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_region_2((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_REGION_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_read_stream_2(r, o) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_stream_2((r)->res, (o)) : \ BHND_BUS_READ_STREAM_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o)) + rman_get_device((r)->res), (r), (o))) #define bhnd_bus_read_multi_stream_2(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_multi_stream_2((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_MULTI_STREAM_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_read_region_stream_2(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_region_stream_2((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_REGION_STREAM_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_stream_2(r, o, v) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_stream_2((r)->res, (o), (v)) : \ BHND_BUS_WRITE_STREAM_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v)) + rman_get_device((r)->res), (r), (o), (v))) #define bhnd_bus_write_multi_stream_2(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_multi_stream_2((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_MULTI_STREAM_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_region_stream_2(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_region_stream_2((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_REGION_STREAM_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_set_multi_2(r, o, v, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_set_multi_2((r)->res, (o), (v), (c)) : \ BHND_BUS_SET_MULTI_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v), (c)) + rman_get_device((r)->res), (r), (o), (v), (c))) #define bhnd_bus_set_region_2(r, o, v, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_set_region_2((r)->res, (o), (v), (c)) : \ BHND_BUS_SET_REGION_2( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v), (c)) + rman_get_device((r)->res), (r), (o), (v), (c))) #define bhnd_bus_read_4(r, o) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_4((r)->res, (o)) : \ BHND_BUS_READ_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o)) + rman_get_device((r)->res), (r), (o))) #define bhnd_bus_read_multi_4(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_multi_4((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_MULTI_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_read_region_4(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_region_4((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_REGION_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_4(r, o, v) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_4((r)->res, (o), (v)) : \ BHND_BUS_WRITE_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v)) + rman_get_device((r)->res), (r), (o), (v))) #define bhnd_bus_write_multi_4(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_multi_4((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_MULTI_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_region_4(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_region_4((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_REGION_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_read_stream_4(r, o) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_stream_4((r)->res, (o)) : \ BHND_BUS_READ_STREAM_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o)) + rman_get_device((r)->res), (r), (o))) #define bhnd_bus_read_multi_stream_4(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_multi_stream_4((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_MULTI_STREAM_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_read_region_stream_4(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_read_region_stream_4((r)->res, (o), (d), (c)) : \ BHND_BUS_READ_REGION_STREAM_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_stream_4(r, o, v) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_stream_4((r)->res, (o), (v)) : \ BHND_BUS_WRITE_STREAM_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v)) + rman_get_device((r)->res), (r), (o), (v))) #define bhnd_bus_write_multi_stream_4(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_multi_stream_4((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_MULTI_STREAM_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_write_region_stream_4(r, o, d, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_write_region_stream_4((r)->res, (o), (d), (c)) : \ BHND_BUS_WRITE_REGION_STREAM_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (d), (c)) + rman_get_device((r)->res), (r), (o), (d), (c))) #define bhnd_bus_set_multi_4(r, o, v, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_set_multi_4((r)->res, (o), (v), (c)) : \ BHND_BUS_SET_MULTI_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v), (c)) + rman_get_device((r)->res), (r), (o), (v), (c))) #define bhnd_bus_set_region_4(r, o, v, c) \ - ((r)->direct) ? \ + (((r)->direct) ? \ bus_set_region_4((r)->res, (o), (v), (c)) : \ BHND_BUS_SET_REGION_4( \ device_get_parent(rman_get_device((r)->res)), \ - rman_get_device((r)->res), (r), (o), (v), (c)) + rman_get_device((r)->res), (r), (o), (v), (c))) #endif /* _BHND_BHND_H_ */ Modified: head/sys/dev/bhnd/tools/bus_macro.sh ============================================================================== --- head/sys/dev/bhnd/tools/bus_macro.sh Thu Dec 14 01:58:05 2017 (r326836) +++ head/sys/dev/bhnd/tools/bus_macro.sh Thu Dec 14 03:03:08 2017 (r326837) @@ -43,7 +43,7 @@ macro () { echo -n ", ${i}" done echo ") \\" - echo " ((r)->direct) ? \\" + echo " (((r)->direct) ? \\" echo -n " bus_${n}((r)->res" for i do @@ -57,7 +57,7 @@ macro () { do echo -n ", (${i})" done - echo ")" + echo "))" } From owner-svn-src-all@freebsd.org Thu Dec 14 03:12:07 2017 Return-Path: Delivered-To: svn-src-all@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 46731E9115F; Thu, 14 Dec 2017 03:12:07 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D2996FA0B; Thu, 14 Dec 2017 03:12:06 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBE3C6vn028966; Thu, 14 Dec 2017 03:12:06 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBE3C6G9028965; Thu, 14 Dec 2017 03:12:06 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201712140312.vBE3C6G9028965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Thu, 14 Dec 2017 03:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326838 - head/sys/dev/bhnd/cores/chipc X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: head/sys/dev/bhnd/cores/chipc X-SVN-Commit-Revision: 326838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 03:12:07 -0000 Author: landonf Date: Thu Dec 14 03:12:05 2017 New Revision: 326838 URL: https://svnweb.freebsd.org/changeset/base/326838 Log: bhnd_chipc(4): Correct typo in flag macros that broke clearing of GPIO pin flags. Approved by: adrian (mentor, implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/bhnd/cores/chipc/chipc_gpiovar.h Modified: head/sys/dev/bhnd/cores/chipc/chipc_gpiovar.h ============================================================================== --- head/sys/dev/bhnd/cores/chipc/chipc_gpiovar.h Thu Dec 14 03:03:08 2017 (r326837) +++ head/sys/dev/bhnd/cores/chipc/chipc_gpiovar.h Thu Dec 14 03:12:05 2017 (r326838) @@ -111,7 +111,7 @@ struct chipc_gpio_update { if (_val) \ (_upd)->_reg.value |= (1 << (_pin)); \ else \ - (_upd)->_reg.value &= (1 << (_pin)); \ + (_upd)->_reg.value &= ~(1 << (_pin)); \ } while(0) /** From owner-svn-src-all@freebsd.org Thu Dec 14 03:41:13 2017 Return-Path: Delivered-To: svn-src-all@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 EA048E91DED; Thu, 14 Dec 2017 03:41:13 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C139D70765; Thu, 14 Dec 2017 03:41:13 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBE3fCVW040453; Thu, 14 Dec 2017 03:41:12 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBE3fCNK040452; Thu, 14 Dec 2017 03:41:12 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201712140341.vBE3fCNK040452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Thu, 14 Dec 2017 03:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326839 - head/sys/dev/bhnd/bhndb X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: head/sys/dev/bhnd/bhndb X-SVN-Commit-Revision: 326839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 03:41:14 -0000 Author: landonf Date: Thu Dec 14 03:41:12 2017 New Revision: 326839 URL: https://svnweb.freebsd.org/changeset/base/326839 Log: bhndb(4): Fix two register window overcommit bugs introduced in r326297: - The window target must always be updated when stealing a register window. - Fix missing initialization of bhndb(4) region alloc_flags when registering statically mapped port regions (caught by scan-build). Approved by: adrian (mentor, implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/bhnd/bhndb/bhndb.c Modified: head/sys/dev/bhnd/bhndb/bhndb.c ============================================================================== --- head/sys/dev/bhnd/bhndb/bhndb.c Thu Dec 14 03:12:05 2017 (r326838) +++ head/sys/dev/bhnd/bhndb/bhndb.c Thu Dec 14 03:41:12 2017 (r326839) @@ -340,7 +340,7 @@ bhndb_init_region_cfg(struct bhndb_softc *sc, bhnd_ero * always HIGH. */ error = bhndb_add_resource_region(br, addr, size, - BHNDB_PRIORITY_HIGH, 0, regw); + BHNDB_PRIORITY_HIGH, alloc_flags, regw); if (error) return (error); } @@ -1634,14 +1634,33 @@ bhndb_deactivate_bhnd_resource(device_t dev, device_t } /** - * Slow path for bhndb_io_resource(). - * - * Iterates over the existing allocated dynamic windows looking for a viable - * in-use region; the first matching region is returned. + * Find the best available bridge resource allocation record capable of handling + * bus I/O requests of @p size at @p addr. + * + * In order of preference, this function will either: + * + * - Configure and return a free allocation record + * - Return an existing allocation record mapping the requested space, or + * - Steal, configure, and return an in-use allocation record. + * + * Will panic if a usable record cannot be found. + * + * @param sc Bridge driver state. + * @param addr The I/O target address. + * @param size The size of the I/O operation to be performed at @p addr. + * @param[out] borrowed Set to true if the allocation record was borrowed to + * fulfill this request; the borrowed record maps the target address range, + * and must not be modified. + * @param[out] stolen Set to true if the allocation record was stolen to fulfill + * this request. If a stolen allocation record is returned, + * bhndb_io_resource_restore() must be called upon completion of the bus I/O + * request. + * @param[out] restore If the allocation record was stolen, this will be set + * to the target that must be restored. */ static struct bhndb_dw_alloc * -bhndb_io_resource_slow(struct bhndb_softc *sc, bus_addr_t addr, bus_size_t size, - bus_size_t *offset, bool *stolen, bus_addr_t *restore) +bhndb_io_resource_get_window(struct bhndb_softc *sc, bus_addr_t addr, + bus_size_t size, bool *borrowed, bool *stolen, bus_addr_t *restore) { struct bhndb_resources *br; struct bhndb_dw_alloc *dwa; @@ -1650,7 +1669,13 @@ bhndb_io_resource_slow(struct bhndb_softc *sc, bus_add BHNDB_LOCK_ASSERT(sc, MA_OWNED); br = sc->bus_res; + *borrowed = false; + *stolen = false; + /* Try to fetch a free window */ + if ((dwa = bhndb_dw_next_free(br)) != NULL) + return (dwa); + /* Search for an existing dynamic mapping of this address range. * Static regions are not searched, as a statically mapped * region would never be allocated as an indirect resource. */ @@ -1671,16 +1696,12 @@ bhndb_io_resource_slow(struct bhndb_softc *sc, bus_add continue; /* Found */ - *offset = dwa->win->win_offset; - *offset += addr - dwa->target; - - *stolen = false; + *borrowed = true; return (dwa); } - /* No existing dynamic mapping found. We'll need to check for a defined - * region to determine whether we can fulfill this request by - * stealing from an existing allocated register window */ + /* Try to steal a window; this should only be required on very early + * PCI_V0 (BCM4318, etc) Wi-Fi chipsets */ region = bhndb_find_resource_region(br, addr, size); if (region == NULL) return (NULL); @@ -1688,12 +1709,16 @@ bhndb_io_resource_slow(struct bhndb_softc *sc, bus_add if ((region->alloc_flags & BHNDB_ALLOC_FULFILL_ON_OVERCOMMIT) == 0) return (NULL); + /* Steal a window. This acquires our backing spinlock, disabling + * interrupts; the spinlock will be released by + * bhndb_dw_return_stolen() */ if ((dwa = bhndb_dw_steal(br, restore)) != NULL) { *stolen = true; return (dwa); } - return (NULL); + panic("register windows exhausted attempting to map 0x%llx-0x%llx\n", + (unsigned long long) addr, (unsigned long long) addr+size-1); } /** @@ -1721,50 +1746,29 @@ static inline struct bhndb_dw_alloc * bhndb_io_resource(struct bhndb_softc *sc, bus_addr_t addr, bus_size_t size, bus_size_t *offset, bool *stolen, bus_addr_t *restore) { - struct bhndb_resources *br; struct bhndb_dw_alloc *dwa; + bool borrowed; int error; BHNDB_LOCK_ASSERT(sc, MA_OWNED); - br = sc->bus_res; + dwa = bhndb_io_resource_get_window(sc, addr, size, &borrowed, stolen, + restore); - /* Try to fetch a free window */ - dwa = bhndb_dw_next_free(br); - - /* - * If no dynamic windows are available, look for an existing - * region that maps the target range. - * - * If none are found, this is a child driver bug -- our window - * over-commit should only fail in the case where a child driver leaks - * resources, or perform operations out-of-order. - * - * Broadcom HND chipsets are designed to not require register window - * swapping during execution; as long as the child devices are - * attached/detached correctly, using the hardware's required order - * of operations, there should always be a window available for the - * current operation. - */ - if (dwa == NULL) { - dwa = bhndb_io_resource_slow(sc, addr, size, offset, stolen, - restore); - if (dwa == NULL) { - panic("register windows exhausted attempting to map " - "0x%llx-0x%llx\n", - (unsigned long long) addr, - (unsigned long long) addr+size-1); - } - - return (dwa); - } - /* Adjust the window if the I/O request won't fit in the current * target range. */ if (addr < dwa->target || addr > dwa->target + dwa->win->win_size || (dwa->target + dwa->win->win_size) - addr < size) { + /* Cannot modify target of borrowed windows */ + if (borrowed) { + panic("borrowed register window does not map expected " + "range 0x%llx-0x%llx\n", + (unsigned long long) addr, + (unsigned long long) addr+size-1); + } + error = bhndb_dw_set_addr(sc->dev, sc->bus_res, dwa, addr, size); if (error) { @@ -1777,7 +1781,6 @@ bhndb_io_resource(struct bhndb_softc *sc, bus_addr_t a /* Calculate the offset and return */ *offset = (addr - dwa->target) + dwa->win->win_offset; - *stolen = false; return (dwa); } From owner-svn-src-all@freebsd.org Thu Dec 14 04:41:08 2017 Return-Path: Delivered-To: svn-src-all@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 89E42E938D3; Thu, 14 Dec 2017 04:41:08 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DB16721F1; Thu, 14 Dec 2017 04:41:08 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBE4f7uH062926; Thu, 14 Dec 2017 04:41:07 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBE4f7E7062924; Thu, 14 Dec 2017 04:41:07 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201712140441.vBE4f7E7062924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 14 Dec 2017 04:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326840 - head/sys/dev/dpaa X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/dpaa X-SVN-Commit-Revision: 326840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 04:41:08 -0000 Author: jhibbits Date: Thu Dec 14 04:41:07 2017 New Revision: 326840 URL: https://svnweb.freebsd.org/changeset/base/326840 Log: Allow bman-portals and qman-portals to attach to simple-bus Official Linux dts's put the individual portals under a simple-bus, rather than under a '*-portals' grouping. This adds a hack to permit that, which gets us closer to using stock device trees for DPAA-based devices. Modified: head/sys/dev/dpaa/bman_fdt.c head/sys/dev/dpaa/qman_fdt.c Modified: head/sys/dev/dpaa/bman_fdt.c ============================================================================== --- head/sys/dev/dpaa/bman_fdt.c Thu Dec 14 03:41:12 2017 (r326839) +++ head/sys/dev/dpaa/bman_fdt.c Thu Dec 14 04:41:07 2017 (r326840) @@ -122,8 +122,17 @@ get_addr_props(phandle_t node, uint32_t *addrp, uint32 static int bman_portals_fdt_probe(device_t dev) { + phandle_t node; - if (!ofw_bus_is_compatible(dev, "fsl,bman-portals")) + if (ofw_bus_is_compatible(dev, "simple-bus")) { + node = ofw_bus_get_node(dev); + for (node = OF_child(node); node > 0; node = OF_peer(node)) { + if (ofw_bus_node_is_compatible(node, "fsl,bman-portal")) + break; + } + if (node <= 0) + return (ENXIO); + } else if (!ofw_bus_is_compatible(dev, "fsl,bman-portals")) return (ENXIO); device_set_desc(dev, BMAN_PORT_DEVSTR); Modified: head/sys/dev/dpaa/qman_fdt.c ============================================================================== --- head/sys/dev/dpaa/qman_fdt.c Thu Dec 14 03:41:12 2017 (r326839) +++ head/sys/dev/dpaa/qman_fdt.c Thu Dec 14 04:41:07 2017 (r326840) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include "qman.h" #include "portals.h" -#define FBMAN_DEVSTR "Freescale Queue Manager" +#define FQMAN_DEVSTR "Freescale Queue Manager" static int qman_fdt_probe(device_t); @@ -77,15 +77,15 @@ qman_fdt_probe(device_t dev) if (!ofw_bus_is_compatible(dev, "fsl,qman")) return (ENXIO); - device_set_desc(dev, FBMAN_DEVSTR); + device_set_desc(dev, FQMAN_DEVSTR); return (BUS_PROBE_DEFAULT); } /* - * BMAN Portals + * QMAN Portals */ -#define BMAN_PORT_DEVSTR "Freescale Queue Manager - Portals" +#define QMAN_PORT_DEVSTR "Freescale Queue Manager - Portals" static device_probe_t qman_portals_fdt_probe; static device_attach_t qman_portals_fdt_attach; @@ -122,11 +122,20 @@ get_addr_props(phandle_t node, uint32_t *addrp, uint32 static int qman_portals_fdt_probe(device_t dev) { + phandle_t node; - if (!ofw_bus_is_compatible(dev, "fsl,qman-portals")) + if (ofw_bus_is_compatible(dev, "simple-bus")) { + node = ofw_bus_get_node(dev); + for (node = OF_child(node); node > 0; node = OF_peer(node)) { + if (ofw_bus_node_is_compatible(node, "fsl,qman-portal")) + break; + } + if (node <= 0) + return (ENXIO); + } else if (!ofw_bus_is_compatible(dev, "fsl,qman-portals")) return (ENXIO); - device_set_desc(dev, BMAN_PORT_DEVSTR); + device_set_desc(dev, QMAN_PORT_DEVSTR); return (BUS_PROBE_DEFAULT); } From owner-svn-src-all@freebsd.org Thu Dec 14 06:45:05 2017 Return-Path: Delivered-To: svn-src-all@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 9799EE988E7; Thu, 14 Dec 2017 06:45:05 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F60376E13; Thu, 14 Dec 2017 06:45:05 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBE6j4vT015801; Thu, 14 Dec 2017 06:45:04 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBE6j4rk015796; Thu, 14 Dec 2017 06:45:04 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201712140645.vBE6j4rk015796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Thu, 14 Dec 2017 06:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326841 - head/sys/dev/bwn X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: head/sys/dev/bwn X-SVN-Commit-Revision: 326841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 06:45:05 -0000 Author: landonf Date: Thu Dec 14 06:45:04 2017 New Revision: 326841 URL: https://svnweb.freebsd.org/changeset/base/326841 Log: Add basic bwn(4) support for the (BCMA-based) BCM43224 and BCM43225. - Add the BCM4322X D11 core revision and missing BCM43224 PCI device ID to our device tables. - Disable the DMA engine parity check (rather than adding parity support to the to-be-replaced bwn(4) DMA implementation). Currently, N-PHY support in bwn(4) is GPL licensed, and is not included by default. Until this is replaced with Broadcom's ISC-licensed N-PHY implementation, bwn(4) must be rebuilt to enable N-PHY support. To build bwn(4) with N-PHY support, add the following lines to your kernel configuration file and rebuild the kernel (and modules): options BWN_GPL_PHY To test bwn(4) with a BCM43224/BCM43225 device, install the firmware from the net/bwn-firmware-kmod port, and place the following lines in loader.conf(5): hw.bwn_pci.preferred="1" if_bwn_pci_load="YES bwn_v4_ucode_load="YES" bwn_v4_n_ucode_load="YES" bwn_v4_lp_ucode_load="YES" Approved by: adrian (mentor, implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/bwn/if_bwn.c head/sys/dev/bwn/if_bwn_bhnd.c head/sys/dev/bwn/if_bwn_pci.c head/sys/dev/bwn/if_bwnreg.h Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Thu Dec 14 04:41:07 2017 (r326840) +++ head/sys/dev/bwn/if_bwn.c Thu Dec 14 06:45:04 2017 (r326841) @@ -1421,7 +1421,7 @@ bwn_phy_getinfo(struct bwn_mac *mac, int gmode) (phy->type == BWN_PHYTYPE_B && phy->rev != 2 && phy->rev != 4 && phy->rev != 6 && phy->rev != 7) || (phy->type == BWN_PHYTYPE_G && phy->rev > 9) || - (phy->type == BWN_PHYTYPE_N && phy->rev > 4) || + (phy->type == BWN_PHYTYPE_N && phy->rev > 6) || (phy->type == BWN_PHYTYPE_LP && phy->rev > 2)) goto unsupphy; @@ -3110,6 +3110,7 @@ bwn_dma_setup(struct bwn_dma_ring *dr) addrext = ((ring64 >> 32) & SIBA_DMA_TRANSLATION_MASK) >> 30; value = BWN_DMA64_TXENABLE; + value |= BWN_DMA64_TXPARITY_DISABLE; value |= (addrext << BWN_DMA64_TXADDREXT_SHIFT) & BWN_DMA64_TXADDREXT_MASK; BWN_DMA_WRITE(dr, BWN_DMA64_TXCTL, value); @@ -3122,6 +3123,7 @@ bwn_dma_setup(struct bwn_dma_ring *dr) ring32 = (uint32_t)(dr->dr_ring_dmabase); addrext = (ring32 & SIBA_DMA_TRANSLATION_MASK) >> 30; value = BWN_DMA32_TXENABLE; + value |= BWN_DMA32_TXPARITY_DISABLE; value |= (addrext << BWN_DMA32_TXADDREXT_SHIFT) & BWN_DMA32_TXADDREXT_MASK; BWN_DMA_WRITE(dr, BWN_DMA32_TXCTL, value); @@ -3141,6 +3143,7 @@ bwn_dma_setup(struct bwn_dma_ring *dr) addrext = ((ring64 >> 32) & SIBA_DMA_TRANSLATION_MASK) >> 30; value = (dr->dr_frameoffset << BWN_DMA64_RXFROFF_SHIFT); value |= BWN_DMA64_RXENABLE; + value |= BWN_DMA64_RXPARITY_DISABLE; value |= (addrext << BWN_DMA64_RXADDREXT_SHIFT) & BWN_DMA64_RXADDREXT_MASK; BWN_DMA_WRITE(dr, BWN_DMA64_RXCTL, value); @@ -3155,6 +3158,7 @@ bwn_dma_setup(struct bwn_dma_ring *dr) addrext = (ring32 & SIBA_DMA_TRANSLATION_MASK) >> 30; value = (dr->dr_frameoffset << BWN_DMA32_RXFROFF_SHIFT); value |= BWN_DMA32_RXENABLE; + value |= BWN_DMA32_RXPARITY_DISABLE; value |= (addrext << BWN_DMA32_RXADDREXT_SHIFT) & BWN_DMA32_RXADDREXT_MASK; BWN_DMA_WRITE(dr, BWN_DMA32_RXCTL, value); Modified: head/sys/dev/bwn/if_bwn_bhnd.c ============================================================================== --- head/sys/dev/bwn/if_bwn_bhnd.c Thu Dec 14 04:41:07 2017 (r326840) +++ head/sys/dev/bwn/if_bwn_bhnd.c Thu Dec 14 06:45:04 2017 (r326841) @@ -68,11 +68,14 @@ __FBSDID("$FreeBSD$"); #include "if_bwnvar.h" /* Supported device identifiers */ +#define BWN_DEV(_hwrev) {{ \ + BHND_MATCH_CORE(BHND_MFGID_BCM, BHND_COREID_D11), \ + BHND_MATCH_CORE_REV(_hwrev), \ +}} + static const struct bhnd_device bwn_devices[] = { - {{ - BHND_MATCH_CORE (BHND_MFGID_BCM, BHND_COREID_D11), - BHND_MATCH_CORE_REV (HWREV_RANGE(5, 16)) - }}, + BWN_DEV(HWREV_RANGE(5, 16)), + BWN_DEV(HWREV_EQ(23)), BHND_DEVICE_END }; Modified: head/sys/dev/bwn/if_bwn_pci.c ============================================================================== --- head/sys/dev/bwn/if_bwn_pci.c Thu Dec 14 04:41:07 2017 (r326840) +++ head/sys/dev/bwn/if_bwn_pci.c Thu Dec 14 06:45:04 2017 (r326841) @@ -98,6 +98,7 @@ static const struct bwn_pci_device bcma_devices[] = { BWN_BCM_DEV(BCM4331_D11N2G, "BCM4331 802.11n 2GHz", 0), BWN_BCM_DEV(BCM4331_D11N5G, "BCM4331 802.11n 5GHz", 0), BWN_BCM_DEV(BCM43224_D11N, "BCM43224 802.11n Dual-Band", 0), + BWN_BCM_DEV(BCM43224_D11N_ID_VEN1, "BCM43224 802.11n Dual-Band",0), BWN_BCM_DEV(BCM43225_D11N2G, "BCM43225 802.11n 2GHz", 0), { 0, 0, NULL, 0} Modified: head/sys/dev/bwn/if_bwnreg.h ============================================================================== --- head/sys/dev/bwn/if_bwnreg.h Thu Dec 14 04:41:07 2017 (r326840) +++ head/sys/dev/bwn/if_bwnreg.h Thu Dec 14 06:45:04 2017 (r326841) @@ -410,6 +410,7 @@ #define BWN_DMA32_TXCTL 0x00 #define BWN_DMA32_TXENABLE 0x00000001 #define BWN_DMA32_TXSUSPEND 0x00000002 +#define BWN_DMA32_TXPARITY_DISABLE 0x00000800 #define BWN_DMA32_TXADDREXT_MASK 0x00030000 #define BWN_DMA32_TXADDREXT_SHIFT 16 #define BWN_DMA32_TXRING 0x04 @@ -423,6 +424,7 @@ #define BWN_DMA32_RXENABLE 0x00000001 #define BWN_DMA32_RXFROFF_SHIFT 1 #define BWN_DMA32_RXDIRECTFIFO 0x00000100 +#define BWN_DMA32_RXPARITY_DISABLE 0x00000800 #define BWN_DMA32_RXADDREXT_MASK 0x00030000 #define BWN_DMA32_RXADDREXT_SHIFT 16 #define BWN_DMA32_RXRING 0x14 @@ -434,6 +436,7 @@ #define BWN_DMA64_TXCTL 0x00 #define BWN_DMA64_TXENABLE 0x00000001 #define BWN_DMA64_TXSUSPEND 0x00000002 +#define BWN_DMA64_TXPARITY_DISABLE 0x00000800 #define BWN_DMA64_TXADDREXT_MASK 0x00030000 #define BWN_DMA64_TXADDREXT_SHIFT 16 #define BWN_DMA64_TXINDEX 0x04 @@ -448,6 +451,7 @@ #define BWN_DMA64_RXENABLE 0x00000001 #define BWN_DMA64_RXFROFF_SHIFT 1 #define BWN_DMA64_RXDIRECTFIFO 0x00000100 +#define BWN_DMA64_RXPARITY_DISABLE 0x00000800 #define BWN_DMA64_RXADDREXT_MASK 0x00030000 #define BWN_DMA64_RXADDREXT_SHIFT 16 #define BWN_DMA64_RXINDEX 0x24 From owner-svn-src-all@freebsd.org Thu Dec 14 07:52:39 2017 Return-Path: Delivered-To: svn-src-all@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 7D041E9AA3C; Thu, 14 Dec 2017 07:52:39 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4719E791AF; Thu, 14 Dec 2017 07:52:39 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBE7qclE044607; Thu, 14 Dec 2017 07:52:38 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBE7qc0t044606; Thu, 14 Dec 2017 07:52:38 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712140752.vBE7qc0t044606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 14 Dec 2017 07:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326842 - stable/11/sbin/fsck_msdosfs X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/sbin/fsck_msdosfs X-SVN-Commit-Revision: 326842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 07:52:39 -0000 Author: delphij Date: Thu Dec 14 07:52:38 2017 New Revision: 326842 URL: https://svnweb.freebsd.org/changeset/base/326842 Log: MFC r326391: Prevent OOB access on corrupted msdos directories. Submitted by: Veo Zhang Modified: stable/11/sbin/fsck_msdosfs/dir.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/11/sbin/fsck_msdosfs/dir.c Thu Dec 14 06:45:04 2017 (r326841) +++ stable/11/sbin/fsck_msdosfs/dir.c Thu Dec 14 07:52:38 2017 (r326842) @@ -619,7 +619,7 @@ readDosDirSection(int f, struct bootblock *boot, struc dirent.name[8] = '\0'; for (k = 7; k >= 0 && dirent.name[k] == ' '; k--) dirent.name[k] = '\0'; - if (dirent.name[k] != '\0') + if (k < 0 || dirent.name[k] != '\0') k++; if (dirent.name[0] == SLOT_E5) dirent.name[0] = 0xe5; From owner-svn-src-all@freebsd.org Thu Dec 14 07:55:12 2017 Return-Path: Delivered-To: svn-src-all@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 72D69E9ACF5; Thu, 14 Dec 2017 07:55:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F36E794E1; Thu, 14 Dec 2017 07:55:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBE7tB9F044770; Thu, 14 Dec 2017 07:55:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBE7tB63044769; Thu, 14 Dec 2017 07:55:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712140755.vBE7tB63044769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 14 Dec 2017 07:55:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326843 - stable/10/sbin/fsck_msdosfs X-SVN-Group: stable-10 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/10/sbin/fsck_msdosfs X-SVN-Commit-Revision: 326843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 07:55:12 -0000 Author: delphij Date: Thu Dec 14 07:55:11 2017 New Revision: 326843 URL: https://svnweb.freebsd.org/changeset/base/326843 Log: MFC r326391: Prevent OOB access on corrupted msdos directories. Submitted by: Veo Zhang Modified: stable/10/sbin/fsck_msdosfs/dir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/10/sbin/fsck_msdosfs/dir.c Thu Dec 14 07:52:38 2017 (r326842) +++ stable/10/sbin/fsck_msdosfs/dir.c Thu Dec 14 07:55:11 2017 (r326843) @@ -619,7 +619,7 @@ readDosDirSection(int f, struct bootblock *boot, struc dirent.name[8] = '\0'; for (k = 7; k >= 0 && dirent.name[k] == ' '; k--) dirent.name[k] = '\0'; - if (dirent.name[k] != '\0') + if (k < 0 || dirent.name[k] != '\0') k++; if (dirent.name[0] == SLOT_E5) dirent.name[0] = 0xe5; From owner-svn-src-all@freebsd.org Thu Dec 14 08:57:38 2017 Return-Path: Delivered-To: svn-src-all@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 7EC19E9CCD4; Thu, 14 Dec 2017 08:57:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5406F7B260; Thu, 14 Dec 2017 08:57:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBE8vbfM069667; Thu, 14 Dec 2017 08:57:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBE8vbEY069664; Thu, 14 Dec 2017 08:57:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712140857.vBE8vbEY069664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 14 Dec 2017 08:57:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326844 - head/usr.sbin/mailwrapper X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/mailwrapper X-SVN-Commit-Revision: 326844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 08:57:38 -0000 Author: bapt Date: Thu Dec 14 08:57:37 2017 New Revision: 326844 URL: https://svnweb.freebsd.org/changeset/base/326844 Log: Replace usage of fparselen(3) by a getline(3) This allow to remove the dependency on libutil Modified: head/usr.sbin/mailwrapper/Makefile head/usr.sbin/mailwrapper/Makefile.depend head/usr.sbin/mailwrapper/mailwrapper.c Modified: head/usr.sbin/mailwrapper/Makefile ============================================================================== --- head/usr.sbin/mailwrapper/Makefile Thu Dec 14 07:55:11 2017 (r326843) +++ head/usr.sbin/mailwrapper/Makefile Thu Dec 14 08:57:37 2017 (r326844) @@ -5,8 +5,6 @@ .if ${MK_MAILWRAPPER} != "no" PROG= mailwrapper MAN= mailwrapper.8 - -LIBADD= util .endif .if ${MK_MAILWRAPPER} != "no" || ${MK_SENDMAIL} != "no" Modified: head/usr.sbin/mailwrapper/Makefile.depend ============================================================================== --- head/usr.sbin/mailwrapper/Makefile.depend Thu Dec 14 07:55:11 2017 (r326843) +++ head/usr.sbin/mailwrapper/Makefile.depend Thu Dec 14 08:57:37 2017 (r326844) @@ -7,8 +7,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libcompiler_rt \ - lib/libutil \ + lib/libcompiler_rt .include Modified: head/usr.sbin/mailwrapper/mailwrapper.c ============================================================================== --- head/usr.sbin/mailwrapper/mailwrapper.c Thu Dec 14 07:55:11 2017 (r326843) +++ head/usr.sbin/mailwrapper/mailwrapper.c Thu Dec 14 08:57:37 2017 (r326844) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -89,14 +88,17 @@ int main(int argc, char *argv[], char *envp[]) { FILE *config; - char *line, *cp, *from, *to, *ap; + char *line, *cp, *from, *to, *ap, *walk; const char *progname; char localmailerconf[MAXPATHLEN]; const char *mailerconf; - size_t len, lineno = 0; + size_t linecap = 0, lineno = 0; + ssize_t linelen; int i; struct arglist al; + line = NULL; + /* change __progname to mailwrapper so we get sensible error messages */ progname = getprogname(); setprogname("mailwrapper"); @@ -123,12 +125,16 @@ main(int argc, char *argv[], char *envp[]) } for (;;) { - if ((line = fparseln(config, &len, &lineno, NULL, 0)) == NULL) { - if (feof(config)) + if ((linelen = getline(&line, &linecap, config)) <= 0) { + if (feof(config)) { errx(EX_CONFIG, "no mapping in %s", mailerconf); + } err(EX_CONFIG, "cannot parse line %lu", (u_long)lineno); } - + lineno++; + walk = line; + /* strip comments */ + strsep(&walk, "#"); #define WS " \t\n" cp = line; From owner-svn-src-all@freebsd.org Thu Dec 14 11:34:33 2017 Return-Path: Delivered-To: svn-src-all@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 26865EA08F8; Thu, 14 Dec 2017 11:34:33 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 926627FC36; Thu, 14 Dec 2017 11:34:31 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBEBYPu5035578 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2017 12:34:26 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jhb@FreeBSD.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBEBYLTj044175; Thu, 14 Dec 2017 18:34:21 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: John Baldwin , Konstantin Belousov , Conrad Meyer References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A3261BD.5050404@grosbein.net> Date: Thu, 14 Dec 2017 18:34:21 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_Q_PLUS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_Q_PLUS Date: is over 4 months after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 11:34:33 -0000 On 13.12.2017 04:55, John Baldwin wrote: > On 12/12/17 3:09 PM, Eugene Grosbein wrote: >> On 13.12.2017 02:32, John Baldwin wrote: >> >>> Certainly for MIPS I have found that compiling with clang >>> instead of gcc for mips64 gives a kernel that panics for stack overflow for any >>> use of NFS. It might be that this is due to something MIPS-specific, but it >>> might be worthwhile retesting with kstack_pages=2 and building the kernel >>> with CROSS_TOOLCHAIN=i386-gcc after installing the appropriate package. >> >> You may want to check NFS code that uses stack heavily. >> Here are numbers for i386 (bytes-on-stack, module, what function): >> >> 1344 nfs_nfsdport.o : >> 1152 nfs_nfsdserv.o : >> 1128 nfs_nfsdserv.o : >> 952 nfs_nfsdserv.o : >> 664 nfs_nfsdserv.o : >> 640 nfs_nfsdserv.o : >> 624 nfs_nfsdserv.o : >> 608 nfs_nfsdserv.o : >> 600 nfs_clvfsops.o : > > My point is that you should compare gcc with clang as 10.x switched to > clang and that may be a factor in the stack overflows beginning with 10.x. I think thats's NFS code who is guilty. You can see example of amd64 (sic!) kstack exhaustion due to 40+ frames deep call chain here: https://lists.freebsd.org/pipermail/freebsd-stable/2017-July/087429.html From owner-svn-src-all@freebsd.org Thu Dec 14 11:41:13 2017 Return-Path: Delivered-To: svn-src-all@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 61E5BEA0C05; Thu, 14 Dec 2017 11:41:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E8E27FF85; Thu, 14 Dec 2017 11:41:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEBfCEH038816; Thu, 14 Dec 2017 11:41:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEBfCJN038815; Thu, 14 Dec 2017 11:41:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712141141.vBEBfCJN038815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 14 Dec 2017 11:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326845 - stable/11/sys/ufs/ufs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/ufs/ufs X-SVN-Commit-Revision: 326845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 11:41:13 -0000 Author: kib Date: Thu Dec 14 11:41:12 2017 New Revision: 326845 URL: https://svnweb.freebsd.org/changeset/base/326845 Log: MFC r326657: Fix livelock in ufsdirhash_create(). Modified: stable/11/sys/ufs/ufs/ufs_dirhash.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_dirhash.c Thu Dec 14 08:57:37 2017 (r326844) +++ stable/11/sys/ufs/ufs/ufs_dirhash.c Thu Dec 14 11:41:12 2017 (r326845) @@ -190,9 +190,11 @@ ufsdirhash_create(struct inode *ip) struct dirhash *ndh; struct dirhash *dh; struct vnode *vp; + bool excl; ndh = dh = NULL; vp = ip->i_vnode; + excl = false; for (;;) { /* Racy check for i_dirhash to prefetch a dirhash structure. */ if (ip->i_dirhash == NULL && ndh == NULL) { @@ -229,8 +231,11 @@ ufsdirhash_create(struct inode *ip) ufsdirhash_hold(dh); VI_UNLOCK(vp); - /* Acquire a shared lock on existing hashes. */ - sx_slock(&dh->dh_lock); + /* Acquire a lock on existing hashes. */ + if (excl) + sx_xlock(&dh->dh_lock); + else + sx_slock(&dh->dh_lock); /* The hash could've been recycled while we were waiting. */ VI_LOCK(vp); @@ -251,9 +256,10 @@ ufsdirhash_create(struct inode *ip) * so we can recreate it. If we fail the upgrade, drop our * lock and try again. */ - if (sx_try_upgrade(&dh->dh_lock)) + if (excl || sx_try_upgrade(&dh->dh_lock)) break; sx_sunlock(&dh->dh_lock); + excl = true; } /* Free the preallocated structure if it was not necessary. */ if (ndh) { From owner-svn-src-all@freebsd.org Thu Dec 14 11:45:03 2017 Return-Path: Delivered-To: svn-src-all@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 90B2DEA0D36; Thu, 14 Dec 2017 11:45:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C9D680226; Thu, 14 Dec 2017 11:45:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEBj2wA040570; Thu, 14 Dec 2017 11:45:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEBj27T040569; Thu, 14 Dec 2017 11:45:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712141145.vBEBj27T040569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 14 Dec 2017 11:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326846 - stable/10/sys/ufs/ufs X-SVN-Group: stable-10 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/10/sys/ufs/ufs X-SVN-Commit-Revision: 326846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 11:45:03 -0000 Author: kib Date: Thu Dec 14 11:45:02 2017 New Revision: 326846 URL: https://svnweb.freebsd.org/changeset/base/326846 Log: MFC r326657: Fix livelock in ufsdirhash_create(). Modified: stable/10/sys/ufs/ufs/ufs_dirhash.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_dirhash.c Thu Dec 14 11:41:12 2017 (r326845) +++ stable/10/sys/ufs/ufs/ufs_dirhash.c Thu Dec 14 11:45:02 2017 (r326846) @@ -189,9 +189,11 @@ ufsdirhash_create(struct inode *ip) struct dirhash *ndh; struct dirhash *dh; struct vnode *vp; + bool excl; ndh = dh = NULL; vp = ip->i_vnode; + excl = false; for (;;) { /* Racy check for i_dirhash to prefetch a dirhash structure. */ if (ip->i_dirhash == NULL && ndh == NULL) { @@ -228,8 +230,11 @@ ufsdirhash_create(struct inode *ip) ufsdirhash_hold(dh); VI_UNLOCK(vp); - /* Acquire a shared lock on existing hashes. */ - sx_slock(&dh->dh_lock); + /* Acquire a lock on existing hashes. */ + if (excl) + sx_xlock(&dh->dh_lock); + else + sx_slock(&dh->dh_lock); /* The hash could've been recycled while we were waiting. */ VI_LOCK(vp); @@ -250,9 +255,10 @@ ufsdirhash_create(struct inode *ip) * so we can recreate it. If we fail the upgrade, drop our * lock and try again. */ - if (sx_try_upgrade(&dh->dh_lock)) + if (excl || sx_try_upgrade(&dh->dh_lock)) break; sx_sunlock(&dh->dh_lock); + excl = true; } /* Free the preallocated structure if it was not necessary. */ if (ndh) { From owner-svn-src-all@freebsd.org Thu Dec 14 11:49:34 2017 Return-Path: Delivered-To: svn-src-all@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 04CF9EA0F51; Thu, 14 Dec 2017 11:49:34 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C556804E8; Thu, 14 Dec 2017 11:49:33 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBEBnSM1035698 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2017 12:49:29 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jhb@FreeBSD.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBEBnOGc048087; Thu, 14 Dec 2017 18:49:24 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: John Baldwin , Konstantin Belousov , Conrad Meyer , Alexey Dokuchaev References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> <5A3261BD.5050404@grosbein.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <5A326544.1030706@grosbein.net> Date: Thu, 14 Dec 2017 18:49:24 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5A3261BD.5050404@grosbein.net> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_Q_PLUS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_Q_PLUS Date: is over 4 months after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 11:49:34 -0000 On 14.12.2017 18:34, Eugene Grosbein wrote: > On 13.12.2017 04:55, John Baldwin wrote: >> On 12/12/17 3:09 PM, Eugene Grosbein wrote: >>> On 13.12.2017 02:32, John Baldwin wrote: >>> >>>> Certainly for MIPS I have found that compiling with clang >>>> instead of gcc for mips64 gives a kernel that panics for stack overflow for any >>>> use of NFS. It might be that this is due to something MIPS-specific, but it >>>> might be worthwhile retesting with kstack_pages=2 and building the kernel >>>> with CROSS_TOOLCHAIN=i386-gcc after installing the appropriate package. >>> >>> You may want to check NFS code that uses stack heavily. >>> Here are numbers for i386 (bytes-on-stack, module, what function): >>> >>> 1344 nfs_nfsdport.o : >>> 1152 nfs_nfsdserv.o : >>> 1128 nfs_nfsdserv.o : >>> 952 nfs_nfsdserv.o : >>> 664 nfs_nfsdserv.o : >>> 640 nfs_nfsdserv.o : >>> 624 nfs_nfsdserv.o : >>> 608 nfs_nfsdserv.o : >>> 600 nfs_clvfsops.o : >> >> My point is that you should compare gcc with clang as 10.x switched to >> clang and that may be a factor in the stack overflows beginning with 10.x. > > I think thats's NFS code who is guilty. You can see example of amd64 (sic!) kstack exhaustion > due to 40+ frames deep call chain here: > > https://lists.freebsd.org/pipermail/freebsd-stable/2017-July/087429.html Final post in the thread describes amd64 crash with kstack_pages=5 due to 75 frames: https://lists.freebsd.org/pipermail/freebsd-stable/2017-July/087477.html He increased kstack_pages upto 6 and stopped posting, as it obviously helped him finally. By the way, I finally realised why I do not have KVA problems with my i386 hosts: I run all of them (no PAE) with options KVA_PAGES=512 (2GB) at least and even 768 (3GB) in case of ZFS instead of default 256 (1GB) to make it stable. Tell me more of untweaked FreeBSD stability... From owner-svn-src-all@freebsd.org Thu Dec 14 11:51:58 2017 Return-Path: Delivered-To: svn-src-all@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 89D02EA122F; Thu, 14 Dec 2017 11:51:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31804808BE; Thu, 14 Dec 2017 11:51:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vBEBpnch094111 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Dec 2017 13:51:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vBEBpnch094111 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vBEBpnDm094110; Thu, 14 Dec 2017 13:51:49 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 14 Dec 2017 13:51:49 +0200 From: Konstantin Belousov To: Eugene Grosbein Cc: John Baldwin , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Message-ID: <20171214115149.GC2272@kib.kiev.ua> References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> <5A3261BD.5050404@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A3261BD.5050404@grosbein.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 11:51:58 -0000 On Thu, Dec 14, 2017 at 06:34:21PM +0700, Eugene Grosbein wrote: > On 13.12.2017 04:55, John Baldwin wrote: > > On 12/12/17 3:09 PM, Eugene Grosbein wrote: > >> On 13.12.2017 02:32, John Baldwin wrote: > >> > >>> Certainly for MIPS I have found that compiling with clang > >>> instead of gcc for mips64 gives a kernel that panics for stack overflow for any > >>> use of NFS. It might be that this is due to something MIPS-specific, but it > >>> might be worthwhile retesting with kstack_pages=2 and building the kernel > >>> with CROSS_TOOLCHAIN=i386-gcc after installing the appropriate package. > >> > >> You may want to check NFS code that uses stack heavily. > >> Here are numbers for i386 (bytes-on-stack, module, what function): > >> > >> 1344 nfs_nfsdport.o : > >> 1152 nfs_nfsdserv.o : > >> 1128 nfs_nfsdserv.o : > >> 952 nfs_nfsdserv.o : > >> 664 nfs_nfsdserv.o : > >> 640 nfs_nfsdserv.o : > >> 624 nfs_nfsdserv.o : > >> 608 nfs_nfsdserv.o : > >> 600 nfs_clvfsops.o : > > > > My point is that you should compare gcc with clang as 10.x switched to > > clang and that may be a factor in the stack overflows beginning with 10.x. > > I think thats's NFS code who is guilty. You can see example of amd64 (sic!) kstack exhaustion > due to 40+ frames deep call chain here: > > https://lists.freebsd.org/pipermail/freebsd-stable/2017-July/087429.html Yes, NFS crosses network/VFS and often VM boundaries, so each subsystem adds its usual stack use footprint to the overall picture. NFS reconnect is especially hard in this regard, and in case the direct dispatch is triggered (in this case over loopback) machine has no chance. The backtrace you cited just reinforces the point that the i386 commit is wrong. It breaks the workload we aims as the main FreeBSD target, which is generic-purpose Unix workstation or server. The commit tries to make defaults fit for specific appliance load of router with IPSEC or ZFS on i386, which require extensive tuning on i386 anyway. Worse, as you prove above, the commit in fact does not fix the issues, it only papers over them and move easily triggered faults from one configuration to another. From owner-svn-src-all@freebsd.org Thu Dec 14 12:05:15 2017 Return-Path: Delivered-To: svn-src-all@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 22B8EEA1FBC; Thu, 14 Dec 2017 12:05:15 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 907371369; Thu, 14 Dec 2017 12:05:14 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBEC51PV035834 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2017 13:05:02 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: kostikbel@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBEC4vFv052267; Thu, 14 Dec 2017 19:04:57 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Konstantin Belousov References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> <5A3261BD.5050404@grosbein.net> <20171214115149.GC2272@kib.kiev.ua> Cc: John Baldwin , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <5A3268E9.506@grosbein.net> Date: Thu, 14 Dec 2017 19:04:57 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20171214115149.GC2272@kib.kiev.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_Q_PLUS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_Q_PLUS Date: is over 4 months after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 12:05:15 -0000 On 14.12.2017 18:51, Konstantin Belousov wrote: >> I think thats's NFS code who is guilty. You can see example of amd64 (sic!) kstack exhaustion >> due to 40+ frames deep call chain here: >> >> https://lists.freebsd.org/pipermail/freebsd-stable/2017-July/087429.html > > Yes, NFS crosses network/VFS and often VM boundaries, so each subsystem > adds its usual stack use footprint to the overall picture. NFS reconnect > is especially hard in this regard, and in case the direct dispatch is > triggered (in this case over loopback) machine has no chance. > > The backtrace you cited just reinforces the point that the i386 commit > is wrong. It breaks the workload we aims as the main FreeBSD target, > which is generic-purpose Unix workstation or server. The commit tries > to make defaults fit for specific appliance load of router with IPSEC > or ZFS on i386, which require extensive tuning on i386 anyway. Worse, > as you prove above, the commit in fact does not fix the issues, it only > papers over them and move easily triggered faults from one configuration > to another. Modern FreeBSD usage as workstation/server should not exclude IPv6, SCTP, WiFi, and even ZFS nor IPSEC for i386. GENERIC kernel should not panic due to low volume network activity with default settings. Perhaps, it's time to make KVA_PAGES loader tunnable too? And/or increase its default for i386 upto some value corresponding to stable management of kern.threads.max_threads_per_proc=1500 (by default) with kstack_pages=4 ? Maybe, KVA_PAGES=384 (1.5GB for 1500 threads)? From owner-svn-src-all@freebsd.org Thu Dec 14 12:27:08 2017 Return-Path: Delivered-To: svn-src-all@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 6B10EEA26EB; Thu, 14 Dec 2017 12:27:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11B6F1EA3; Thu, 14 Dec 2017 12:27:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vBECQxSK002496 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Dec 2017 14:27:02 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vBECQxSK002496 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vBECQxCB002495; Thu, 14 Dec 2017 14:26:59 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 14 Dec 2017 14:26:59 +0200 From: Konstantin Belousov To: Eugene Grosbein Cc: John Baldwin , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Message-ID: <20171214122659.GF2272@kib.kiev.ua> References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> <5A3261BD.5050404@grosbein.net> <20171214115149.GC2272@kib.kiev.ua> <5A3268E9.506@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A3268E9.506@grosbein.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 12:27:08 -0000 On Thu, Dec 14, 2017 at 07:04:57PM +0700, Eugene Grosbein wrote: > On 14.12.2017 18:51, Konstantin Belousov wrote: > > >> I think thats's NFS code who is guilty. You can see example of amd64 (sic!) kstack exhaustion > >> due to 40+ frames deep call chain here: > >> > >> https://lists.freebsd.org/pipermail/freebsd-stable/2017-July/087429.html > > > > Yes, NFS crosses network/VFS and often VM boundaries, so each subsystem > > adds its usual stack use footprint to the overall picture. NFS reconnect > > is especially hard in this regard, and in case the direct dispatch is > > triggered (in this case over loopback) machine has no chance. > > > > The backtrace you cited just reinforces the point that the i386 commit > > is wrong. It breaks the workload we aims as the main FreeBSD target, > > which is generic-purpose Unix workstation or server. The commit tries > > to make defaults fit for specific appliance load of router with IPSEC > > or ZFS on i386, which require extensive tuning on i386 anyway. Worse, > > as you prove above, the commit in fact does not fix the issues, it only > > papers over them and move easily triggered faults from one configuration > > to another. > > Modern FreeBSD usage as workstation/server should not exclude IPv6, SCTP, WiFi, > and even ZFS nor IPSEC for i386. GENERIC kernel should not panic due to low volume > network activity with default settings. And two ponies should be given to everybody who wishes for them. > > Perhaps, it's time to make KVA_PAGES loader tunnable too? Sure, make it the tunable. Just to make you know in advance, this is quite delicate. > And/or increase its default for i386 upto some value corresponding to stable management > of kern.threads.max_threads_per_proc=1500 (by default) with kstack_pages=4 ? > > Maybe, KVA_PAGES=384 (1.5GB for 1500 threads)? Sigh. This would make i386 even less usable for everybody, perhaps except you. Because default 3G of UVA is too small for some common tasks (thanks clang, but also e.g. pypy), and you reduce the user address space even more. From owner-svn-src-all@freebsd.org Thu Dec 14 12:54:22 2017 Return-Path: Delivered-To: svn-src-all@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 28191EA3008; Thu, 14 Dec 2017 12:54:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E97FE2D44; Thu, 14 Dec 2017 12:54:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBECsLZU069281; Thu, 14 Dec 2017 12:54:21 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBECsLee069280; Thu, 14 Dec 2017 12:54:21 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201712141254.vBECsLee069280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 14 Dec 2017 12:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326847 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 326847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 12:54:22 -0000 Author: ae Date: Thu Dec 14 12:54:20 2017 New Revision: 326847 URL: https://svnweb.freebsd.org/changeset/base/326847 Log: Fix mbuf leak when TCPMD5_OUTPUT() method returns error. PR: 223817 MFC after: 1 week Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Thu Dec 14 11:45:02 2017 (r326846) +++ head/sys/netinet/tcp_output.c Thu Dec 14 12:54:20 2017 (r326847) @@ -1239,12 +1239,13 @@ send: * NOTE: since TCP options buffer doesn't point into * mbuf's data, calculate offset and use it. */ - if (!TCPMD5_ENABLED() || TCPMD5_OUTPUT(m, th, - (u_char *)(th + 1) + (to.to_signature - opt)) != 0) { + if (!TCPMD5_ENABLED() || (error = TCPMD5_OUTPUT(m, th, + (u_char *)(th + 1) + (to.to_signature - opt))) != 0) { /* * Do not send segment if the calculation of MD5 * digest has failed. */ + m_freem(m); goto out; } } From owner-svn-src-all@freebsd.org Thu Dec 14 12:59:13 2017 Return-Path: Delivered-To: svn-src-all@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 3496DEA3169; Thu, 14 Dec 2017 12:59:13 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B84672F0B; Thu, 14 Dec 2017 12:59:12 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBECx7qr036122 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2017 13:59:08 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: kostikbel@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBECx3YN066726; Thu, 14 Dec 2017 19:59:03 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Konstantin Belousov References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> <5A3261BD.5050404@grosbein.net> <20171214115149.GC2272@kib.kiev.ua> <5A3268E9.506@grosbein.net> <20171214122659.GF2272@kib.kiev.ua> Cc: John Baldwin , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A327597.3010300@grosbein.net> Date: Thu, 14 Dec 2017 19:59:03 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20171214122659.GF2272@kib.kiev.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_Q_PLUS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_Q_PLUS Date: is over 4 months after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 12:59:13 -0000 On 14.12.2017 19:26, Konstantin Belousov wrote: > Sigh. This would make i386 even less usable for everybody, perhaps > except you. Because default 3G of UVA is too small for some common tasks > (thanks clang, but also e.g. pypy), and you reduce the user address > space even more. Those who need 3GB of UVA within single process should not use 32 bit system in first place, should they? From owner-svn-src-all@freebsd.org Thu Dec 14 13:06:43 2017 Return-Path: Delivered-To: svn-src-all@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 74F9DEA35F8; Thu, 14 Dec 2017 13:06:43 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D1EE34AC; Thu, 14 Dec 2017 13:06:43 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBED6gYS073509; Thu, 14 Dec 2017 13:06:42 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBED6f0Y073503; Thu, 14 Dec 2017 13:06:41 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201712141306.vBED6f0Y073503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 14 Dec 2017 13:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326848 - stable/11/usr.sbin/pw X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/usr.sbin/pw X-SVN-Commit-Revision: 326848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 13:06:43 -0000 Author: eugen Date: Thu Dec 14 13:06:41 2017 New Revision: 326848 URL: https://svnweb.freebsd.org/changeset/base/326848 Log: MFC r326738: pw(8): correct expiration period handling and command line overrides to preconfigured values for -e, -p and -w flags. Use non-negative symbols instead of magic values in passwd_val/pw_password functions. PR: 223431 Submitted by: Yuri Pankov (in part, patch for the manual) Approved by: mav (mentor) Relnotes: yes Modified: stable/11/usr.sbin/pw/psdate.c stable/11/usr.sbin/pw/psdate.h stable/11/usr.sbin/pw/pw.8 stable/11/usr.sbin/pw/pw.h stable/11/usr.sbin/pw/pw_conf.c stable/11/usr.sbin/pw/pw_user.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/pw/psdate.c ============================================================================== --- stable/11/usr.sbin/pw/psdate.c Thu Dec 14 12:54:20 2017 (r326847) +++ stable/11/usr.sbin/pw/psdate.c Thu Dec 14 13:06:41 2017 (r326848) @@ -38,7 +38,7 @@ static const char rcsid[] = #include "psdate.h" -static int +int numerics(char const * str) { Modified: stable/11/usr.sbin/pw/psdate.h ============================================================================== --- stable/11/usr.sbin/pw/psdate.h Thu Dec 14 12:54:20 2017 (r326847) +++ stable/11/usr.sbin/pw/psdate.h Thu Dec 14 13:06:41 2017 (r326848) @@ -33,6 +33,7 @@ #include __BEGIN_DECLS +int numerics(char const * str); time_t parse_date(time_t dt, char const * str); void print_date(char *buf, time_t t, int dotime); __END_DECLS Modified: stable/11/usr.sbin/pw/pw.8 ============================================================================== --- stable/11/usr.sbin/pw/pw.8 Thu Dec 14 12:54:20 2017 (r326847) +++ stable/11/usr.sbin/pw/pw.8 Thu Dec 14 13:06:41 2017 (r326848) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 23, 2016 +.Dd December 10, 2017 .Dt PW 8 .Os .Sh NAME @@ -611,6 +611,14 @@ that the account expires. A value of 0 suppresses automatic calculation of the expiry date. .It Fl p Ar days Set the default password expiration period in days. +When +.Fl D +is used, the +.Ar days +argument is interpreted differently. +It must be numeric and represents the number of days after creation +that the account expires. +A value of 0 suppresses automatic calculation of the expiry date. .It Fl g Ar group Set the default group for new users. If a blank group is specified using Modified: stable/11/usr.sbin/pw/pw.h ============================================================================== --- stable/11/usr.sbin/pw/pw.h Thu Dec 14 12:54:20 2017 (r326847) +++ stable/11/usr.sbin/pw/pw.h Thu Dec 14 13:06:41 2017 (r326848) @@ -47,6 +47,14 @@ enum _mode M_NUM }; +enum _passmode +{ + P_NO, + P_NONE, + P_RANDOM, + P_YES +}; + enum _which { W_USER, Modified: stable/11/usr.sbin/pw/pw_conf.c ============================================================================== --- stable/11/usr.sbin/pw/pw_conf.c Thu Dec 14 12:54:20 2017 (r326847) +++ stable/11/usr.sbin/pw/pw_conf.c Thu Dec 14 13:06:41 2017 (r326848) @@ -198,18 +198,18 @@ passwd_val(char const * str, int dflt) for (i = 0; booltrue[i]; i++) if (strcmp(str, booltrue[i]) == 0) - return 1; + return P_YES; for (i = 0; boolfalse[i]; i++) if (strcmp(str, boolfalse[i]) == 0) - return 0; + return P_NO; /* * Special cases for defaultpassword */ if (strcmp(str, "random") == 0) - return -1; + return P_RANDOM; if (strcmp(str, "none") == 0) - return -2; + return P_NONE; errx(1, "Invalid value for default password"); } Modified: stable/11/usr.sbin/pw/pw_user.c ============================================================================== --- stable/11/usr.sbin/pw/pw_user.c Thu Dec 14 12:54:20 2017 (r326847) +++ stable/11/usr.sbin/pw/pw_user.c Thu Dec 14 13:06:41 2017 (r326848) @@ -515,7 +515,9 @@ pw_password(struct userconf * cnf, char const * user, char pwbuf[32]; switch (cnf->default_password) { - case -1: /* Random password */ + case P_NONE: /* No password at all! */ + return ""; + case P_RANDOM: /* Random password */ l = (arc4random() % 8 + 8); /* 8 - 16 chars */ for (i = 0; i < l; i++) pwbuf[i] = chars[arc4random_uniform(sizeof(chars)-1)]; @@ -531,17 +533,13 @@ pw_password(struct userconf * cnf, char const * user, fflush(stdout); } break; - - case -2: /* No password at all! */ - return ""; - - case 0: /* No login - default */ - default: - return "*"; - - case 1: /* user's name */ + case P_YES: /* user's name */ strlcpy(pwbuf, user, sizeof(pwbuf)); break; + case P_NO: /* No login - default */ + /* FALLTHROUGH */ + default: + return "*"; } return pw_pwcrypt(pwbuf); } @@ -1122,11 +1120,20 @@ validate_mode(char *mode) return (m); } +static long +validate_expire(char *str, int opt) +{ + if (!numerics(str)) + errx(EX_DATAERR, "-%c argument must be numeric " + "when setting defaults: %s", (char)opt, str); + return strtol(str, NULL, 0); +} + static void mix_config(struct userconf *cmdcnf, struct userconf *cfg) { - if (cmdcnf->default_password == 0) + if (cmdcnf->default_password < 0) cmdcnf->default_password = cfg->default_password; if (cmdcnf->reuse_uids == 0) cmdcnf->reuse_uids = cfg->reuse_uids; @@ -1164,9 +1171,9 @@ mix_config(struct userconf *cmdcnf, struct userconf *c cmdcnf->min_gid = cfg->min_gid; if (cmdcnf->max_gid == 0) cmdcnf->max_gid = cfg->max_gid; - if (cmdcnf->expire_days == 0) + if (cmdcnf->expire_days < 0) cmdcnf->expire_days = cfg->expire_days; - if (cmdcnf->password_days == 0) + if (cmdcnf->password_days < 0) cmdcnf->password_days = cfg->password_days; } @@ -1198,6 +1205,9 @@ pw_user_add(int argc, char **argv, char *arg1) if ((cmdcnf = calloc(1, sizeof(struct userconf))) == NULL) err(EXIT_FAILURE, "calloc()"); + cmdcnf->default_password = cmdcnf->expire_days = cmdcnf->password_days = -1; + now = time(NULL); + if (arg1 != NULL) { if (arg1[strspn(arg1, "0123456789")] == '\0') id = pw_checkid(arg1, UID_MAX); @@ -1226,12 +1236,16 @@ pw_user_add(int argc, char **argv, char *arg1) homedir = optarg; break; case 'e': - now = time(NULL); - cmdcnf->expire_days = parse_date(now, optarg); + if (genconf) + cmdcnf->expire_days = validate_expire(optarg, ch); + else + cmdcnf->expire_days = parse_date(now, optarg); break; case 'p': - now = time(NULL); - cmdcnf->password_days = parse_date(now, optarg); + if (genconf) + cmdcnf->password_days = validate_expire(optarg, ch); + else + cmdcnf->password_days = parse_date(now, optarg); break; case 'g': validate_grname(cmdcnf, optarg); @@ -1369,8 +1383,12 @@ pw_user_add(int argc, char **argv, char *arg1) pwd->pw_uid = pw_uidpolicy(cmdcnf, id); pwd->pw_gid = pw_gidpolicy(cnf, grname, pwd->pw_name, (gid_t) pwd->pw_uid, dryrun); - pwd->pw_change = cmdcnf->password_days; - pwd->pw_expire = cmdcnf->expire_days; + + if (cmdcnf->password_days > 0) + pwd->pw_change = now + cmdcnf->password_days * 86400L; + if (cmdcnf->expire_days > 0) + pwd->pw_expire = now + cmdcnf->expire_days * 86400L; + pwd->pw_dir = pw_homepolicy(cmdcnf, homedir, pwd->pw_name); pwd->pw_shell = pw_shellpolicy(cmdcnf); lc = login_getpwclass(pwd); @@ -1511,6 +1529,7 @@ pw_user_mod(int argc, char **argv, char *arg1) class = nispasswd = NULL; quiet = createhome = pretty = dryrun = nis = precrypted = false; edited = false; + now = time(NULL); if (arg1 != NULL) { if (arg1[strspn(arg1, "0123456789")] == '\0') @@ -1540,11 +1559,9 @@ pw_user_mod(int argc, char **argv, char *arg1) homedir = optarg; break; case 'e': - now = time(NULL); expire_days = parse_date(now, optarg); break; case 'p': - now = time(NULL); password_days = parse_date(now, optarg); break; case 'g': @@ -1679,13 +1696,14 @@ pw_user_mod(int argc, char **argv, char *arg1) } } - if (password_days >= 0 && pwd->pw_change != password_days) { - pwd->pw_change = password_days; + + if (password_days >= 0) { + pwd->pw_change = now + password_days * 86400L; edited = true; } - if (expire_days >= 0 && pwd->pw_expire != expire_days) { - pwd->pw_expire = expire_days; + if (expire_days >= 0) { + pwd->pw_expire = now + expire_days * 86400L; edited = true; } From owner-svn-src-all@freebsd.org Thu Dec 14 13:10:24 2017 Return-Path: Delivered-To: svn-src-all@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 10FF9EA38DB; Thu, 14 Dec 2017 13:10:24 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF0C437AA; Thu, 14 Dec 2017 13:10:23 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEDANc2073720; Thu, 14 Dec 2017 13:10:23 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEDAMKd073714; Thu, 14 Dec 2017 13:10:22 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201712141310.vBEDAMKd073714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 14 Dec 2017 13:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326849 - stable/10/usr.sbin/pw X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/usr.sbin/pw X-SVN-Commit-Revision: 326849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 13:10:24 -0000 Author: eugen Date: Thu Dec 14 13:10:22 2017 New Revision: 326849 URL: https://svnweb.freebsd.org/changeset/base/326849 Log: MFC r326738: pw(8): correct expiration period handling and command line overrides to preconfigured values for -e, -p and -w flags. Use non-negative symbols instead of magic values in passwd_val/pw_password functions. PR: 223431 Submitted by: Yuri Pankov (in part, patch for the manual) Approved by: mav (mentor) Relnotes: yes Modified: stable/10/usr.sbin/pw/psdate.c stable/10/usr.sbin/pw/psdate.h stable/10/usr.sbin/pw/pw.8 stable/10/usr.sbin/pw/pw.h stable/10/usr.sbin/pw/pw_conf.c stable/10/usr.sbin/pw/pw_user.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/psdate.c ============================================================================== --- stable/10/usr.sbin/pw/psdate.c Thu Dec 14 13:06:41 2017 (r326848) +++ stable/10/usr.sbin/pw/psdate.c Thu Dec 14 13:10:22 2017 (r326849) @@ -38,7 +38,7 @@ static const char rcsid[] = #include "psdate.h" -static int +int numerics(char const * str) { Modified: stable/10/usr.sbin/pw/psdate.h ============================================================================== --- stable/10/usr.sbin/pw/psdate.h Thu Dec 14 13:06:41 2017 (r326848) +++ stable/10/usr.sbin/pw/psdate.h Thu Dec 14 13:10:22 2017 (r326849) @@ -33,6 +33,7 @@ #include __BEGIN_DECLS +int numerics(char const * str); time_t parse_date(time_t dt, char const * str); void print_date(char *buf, time_t t, int dotime); __END_DECLS Modified: stable/10/usr.sbin/pw/pw.8 ============================================================================== --- stable/10/usr.sbin/pw/pw.8 Thu Dec 14 13:06:41 2017 (r326848) +++ stable/10/usr.sbin/pw/pw.8 Thu Dec 14 13:10:22 2017 (r326849) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 23, 2016 +.Dd December 10, 2017 .Dt PW 8 .Os .Sh NAME @@ -611,6 +611,14 @@ that the account expires. A value of 0 suppresses automatic calculation of the expiry date. .It Fl p Ar days Set the default password expiration period in days. +When +.Fl D +is used, the +.Ar days +argument is interpreted differently. +It must be numeric and represents the number of days after creation +that the account expires. +A value of 0 suppresses automatic calculation of the expiry date. .It Fl g Ar group Set the default group for new users. If a blank group is specified using Modified: stable/10/usr.sbin/pw/pw.h ============================================================================== --- stable/10/usr.sbin/pw/pw.h Thu Dec 14 13:06:41 2017 (r326848) +++ stable/10/usr.sbin/pw/pw.h Thu Dec 14 13:10:22 2017 (r326849) @@ -47,6 +47,14 @@ enum _mode M_NUM }; +enum _passmode +{ + P_NO, + P_NONE, + P_RANDOM, + P_YES +}; + enum _which { W_USER, Modified: stable/10/usr.sbin/pw/pw_conf.c ============================================================================== --- stable/10/usr.sbin/pw/pw_conf.c Thu Dec 14 13:06:41 2017 (r326848) +++ stable/10/usr.sbin/pw/pw_conf.c Thu Dec 14 13:10:22 2017 (r326849) @@ -198,18 +198,18 @@ passwd_val(char const * str, int dflt) for (i = 0; booltrue[i]; i++) if (strcmp(str, booltrue[i]) == 0) - return 1; + return P_YES; for (i = 0; boolfalse[i]; i++) if (strcmp(str, boolfalse[i]) == 0) - return 0; + return P_NO; /* * Special cases for defaultpassword */ if (strcmp(str, "random") == 0) - return -1; + return P_RANDOM; if (strcmp(str, "none") == 0) - return -2; + return P_NONE; errx(1, "Invalid value for default password"); } Modified: stable/10/usr.sbin/pw/pw_user.c ============================================================================== --- stable/10/usr.sbin/pw/pw_user.c Thu Dec 14 13:06:41 2017 (r326848) +++ stable/10/usr.sbin/pw/pw_user.c Thu Dec 14 13:10:22 2017 (r326849) @@ -517,7 +517,9 @@ pw_password(struct userconf * cnf, char const * user, char pwbuf[32]; switch (cnf->default_password) { - case -1: /* Random password */ + case P_NONE: /* No password at all! */ + return ""; + case P_RANDOM: /* Random password */ l = (arc4random() % 8 + 8); /* 8 - 16 chars */ for (i = 0; i < l; i++) pwbuf[i] = chars[arc4random_uniform(sizeof(chars)-1)]; @@ -533,17 +535,13 @@ pw_password(struct userconf * cnf, char const * user, fflush(stdout); } break; - - case -2: /* No password at all! */ - return ""; - - case 0: /* No login - default */ - default: - return "*"; - - case 1: /* user's name */ + case P_YES: /* user's name */ strlcpy(pwbuf, user, sizeof(pwbuf)); break; + case P_NO: /* No login - default */ + /* FALLTHROUGH */ + default: + return "*"; } return pw_pwcrypt(pwbuf); } @@ -1124,11 +1122,20 @@ validate_mode(char *mode) return (m); } +static long +validate_expire(char *str, int opt) +{ + if (!numerics(str)) + errx(EX_DATAERR, "-%c argument must be numeric " + "when setting defaults: %s", (char)opt, str); + return strtol(str, NULL, 0); +} + static void mix_config(struct userconf *cmdcnf, struct userconf *cfg) { - if (cmdcnf->default_password == 0) + if (cmdcnf->default_password < 0) cmdcnf->default_password = cfg->default_password; if (cmdcnf->reuse_uids == 0) cmdcnf->reuse_uids = cfg->reuse_uids; @@ -1166,9 +1173,9 @@ mix_config(struct userconf *cmdcnf, struct userconf *c cmdcnf->min_gid = cfg->min_gid; if (cmdcnf->max_gid == 0) cmdcnf->max_gid = cfg->max_gid; - if (cmdcnf->expire_days == 0) + if (cmdcnf->expire_days < 0) cmdcnf->expire_days = cfg->expire_days; - if (cmdcnf->password_days == 0) + if (cmdcnf->password_days < 0) cmdcnf->password_days = cfg->password_days; } @@ -1200,6 +1207,9 @@ pw_user_add(int argc, char **argv, char *arg1) if ((cmdcnf = calloc(1, sizeof(struct userconf))) == NULL) err(EXIT_FAILURE, "calloc()"); + cmdcnf->default_password = cmdcnf->expire_days = cmdcnf->password_days = -1; + now = time(NULL); + if (arg1 != NULL) { if (arg1[strspn(arg1, "0123456789")] == '\0') id = pw_checkid(arg1, UID_MAX); @@ -1228,12 +1238,16 @@ pw_user_add(int argc, char **argv, char *arg1) homedir = optarg; break; case 'e': - now = time(NULL); - cmdcnf->expire_days = parse_date(now, optarg); + if (genconf) + cmdcnf->expire_days = validate_expire(optarg, ch); + else + cmdcnf->expire_days = parse_date(now, optarg); break; case 'p': - now = time(NULL); - cmdcnf->password_days = parse_date(now, optarg); + if (genconf) + cmdcnf->password_days = validate_expire(optarg, ch); + else + cmdcnf->password_days = parse_date(now, optarg); break; case 'g': validate_grname(cmdcnf, optarg); @@ -1371,8 +1385,12 @@ pw_user_add(int argc, char **argv, char *arg1) pwd->pw_uid = pw_uidpolicy(cmdcnf, id); pwd->pw_gid = pw_gidpolicy(cnf, grname, pwd->pw_name, (gid_t) pwd->pw_uid, dryrun); - pwd->pw_change = cmdcnf->password_days; - pwd->pw_expire = cmdcnf->expire_days; + + if (cmdcnf->password_days > 0) + pwd->pw_change = now + cmdcnf->password_days * 86400L; + if (cmdcnf->expire_days > 0) + pwd->pw_expire = now + cmdcnf->expire_days * 86400L; + pwd->pw_dir = pw_homepolicy(cmdcnf, homedir, pwd->pw_name); pwd->pw_shell = pw_shellpolicy(cmdcnf); lc = login_getpwclass(pwd); @@ -1513,6 +1531,7 @@ pw_user_mod(int argc, char **argv, char *arg1) class = nispasswd = NULL; quiet = createhome = pretty = dryrun = nis = precrypted = false; edited = false; + now = time(NULL); if (arg1 != NULL) { if (arg1[strspn(arg1, "0123456789")] == '\0') @@ -1542,11 +1561,9 @@ pw_user_mod(int argc, char **argv, char *arg1) homedir = optarg; break; case 'e': - now = time(NULL); expire_days = parse_date(now, optarg); break; case 'p': - now = time(NULL); password_days = parse_date(now, optarg); break; case 'g': @@ -1681,13 +1698,14 @@ pw_user_mod(int argc, char **argv, char *arg1) } } - if (password_days >= 0 && pwd->pw_change != password_days) { - pwd->pw_change = password_days; + + if (password_days >= 0) { + pwd->pw_change = now + password_days * 86400L; edited = true; } - if (expire_days >= 0 && pwd->pw_expire != expire_days) { - pwd->pw_expire = expire_days; + if (expire_days >= 0) { + pwd->pw_expire = now + expire_days * 86400L; edited = true; } From owner-svn-src-all@freebsd.org Thu Dec 14 13:19:44 2017 Return-Path: Delivered-To: svn-src-all@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 7890BEA3D91; Thu, 14 Dec 2017 13:19:44 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5296F3F8B; Thu, 14 Dec 2017 13:19:44 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEDJh97078015; Thu, 14 Dec 2017 13:19:43 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEDJhLj078014; Thu, 14 Dec 2017 13:19:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201712141319.vBEDJhLj078014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 14 Dec 2017 13:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326850 - head/sys/arm/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/include X-SVN-Commit-Revision: 326850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 13:19:44 -0000 Author: andrew Date: Thu Dec 14 13:19:43 2017 New Revision: 326850 URL: https://svnweb.freebsd.org/changeset/base/326850 Log: Add the virtualisation special register definitions. Submitted by: Mihai Carabas Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D11846 Modified: head/sys/arm/include/sysreg.h Modified: head/sys/arm/include/sysreg.h ============================================================================== --- head/sys/arm/include/sysreg.h Thu Dec 14 13:10:22 2017 (r326849) +++ head/sys/arm/include/sysreg.h Thu Dec 14 13:19:43 2017 (r326850) @@ -76,12 +76,6 @@ #define CP15_ID_MMFR2(rr) p15, 0, rr, c0, c1, 6 /* Memory Model Feature Register 2 */ #define CP15_ID_MMFR3(rr) p15, 0, rr, c0, c1, 7 /* Memory Model Feature Register 3 */ -#define CP15_HCR(rr) p15, 4, rr, c1, c1, 0 /* Hyp Configuration Register */ -#define CP15_HCPTR(rr) p15, 4, rr, c1, c1, 2 /* Hyp Coprocessor Trap Register */ -#define CP15_HSTR(rr) p15, 4, rr, c1, c1, 3 /* Hyp System Trap Register */ -#define CP15_HSCTLR(rr) p15, 4, rr, c1, c0, 0 /* Hyp System Control Register */ -#define CP15_HDCR(rr) p15, 4, rr, c1, c1, 1 /* Hyp Debug Configuration Register */ - #define CP15_ID_ISAR0(rr) p15, 0, rr, c0, c2, 0 /* Instruction Set Attribute Register 0 */ #define CP15_ID_ISAR1(rr) p15, 0, rr, c0, c2, 1 /* Instruction Set Attribute Register 1 */ #define CP15_ID_ISAR2(rr) p15, 0, rr, c0, c2, 2 /* Instruction Set Attribute Register 2 */ @@ -95,6 +89,9 @@ #define CP15_CSSELR(rr) p15, 2, rr, c0, c0, 0 /* Cache Size Selection Register */ +#define CP15_VPIDR(rr) p15, 4, rr, c0, c0, 0 /* Virtualization Processor ID Register */ +#define CP15_VMPIDR(rr) p15, 4, rr, c0, c0, 5 /* Virtualization Multiprocessor ID Register */ + /* * CP15 C1 registers */ @@ -106,6 +103,13 @@ #define CP15_SDER(rr) p15, 0, rr, c1, c1, 1 /* Secure Debug Enable Register */ #define CP15_NSACR(rr) p15, 0, rr, c1, c1, 2 /* Non-Secure Access Control Register */ +#define CP15_HSCTLR(rr) p15, 4, rr, c1, c0, 0 /* Hyp System Control Register */ + +#define CP15_HCR(rr) p15, 4, rr, c1, c1, 0 /* Hyp Configuration Register */ +#define CP15_HDCR(rr) p15, 4, rr, c1, c1, 1 /* Hyp Debug Configuration Register */ +#define CP15_HCPTR(rr) p15, 4, rr, c1, c1, 2 /* Hyp Coprocessor Trap Register */ +#define CP15_HSTR(rr) p15, 4, rr, c1, c1, 3 /* Hyp System Trap Register */ + /* * CP15 C2 registers */ @@ -113,6 +117,9 @@ #define CP15_TTBR1(rr) p15, 0, rr, c2, c0, 1 /* Translation Table Base Register 1 */ #define CP15_TTBCR(rr) p15, 0, rr, c2, c0, 2 /* Translation Table Base Control Register */ +#define CP15_HTCR(rr) p15, 4, rr, c2, c0, 2 /* Hyp Translation Control Register */ +#define CP15_VTCR(rr) p15, 4, rr, c2, c1, 2 /* Virtualization Translation Control Register */ + /* * CP15 C3 registers */ @@ -122,6 +129,7 @@ * CP15 C5 registers */ #define CP15_DFSR(rr) p15, 0, rr, c5, c0, 0 /* Data Fault Status Register */ +#define CP15_HSR(rr) p15, 4, rr, c5, c2, 0 /* Hyp Syndrome Register */ #if __ARM_ARCH >= 6 /* From ARMv6: */ @@ -137,6 +145,9 @@ * CP15 C6 registers */ #define CP15_DFAR(rr) p15, 0, rr, c6, c0, 0 /* Data Fault Address Register */ +#define CP15_HDFAR(rr) p15, 4, rr, c6, c0, 0 /* Hyp Data Fault Address Register */ +#define CP15_HIFAR(rr) p15, 4, rr, c6, c0, 2 /* Hyp Instruction Fault Address Register */ +#define CP15_HPFAR(rr) p15, 4, rr, c6, c0, 4 /* Hyp IPA Fault Address Register */ #if __ARM_ARCH >= 6 /* From ARMv6k: */ @@ -223,6 +234,8 @@ #define CP15_TLBIMVA(rr) p15, 0, rr, c8, c7, 1 /* Invalidate unified TLB by MVA */ #define CP15_TLBIASID(rr) p15, 0, rr, c8, c7, 2 /* Invalidate unified TLB by ASID */ +#define CP15_TLBIALLH(rr) p15, 4, rr, c8, c7, 0 /* Invalidate Entire Hyp Unified TLB */ + #if __ARM_ARCH >= 6 /* From ARMv6: */ #define CP15_TLBIMVAA(rr) p15, 0, rr, c8, c7, 3 /* Invalidate unified TLB by MVA, all ASID */ @@ -264,6 +277,9 @@ #define CP15_AMAIR0(rr) p15, 0, rr, c10, c3, 0 /* Auxiliary Memory Attribute Indirection Register 0 */ #define CP15_AMAIR1(rr) p15, 0, rr, c10, c3, 1 /* Auxiliary Memory Attribute Indirection Register 1 */ +#define CP15_HMAIR0(rr) p15, 4, rr, c10, c2, 0 /* Hyp Memory Attribute Indirection Register 0 */ +#define CP15_HMAIR1(rr) p15, 4, rr, c10, c2, 1 /* Hyp Memory Attribute Indirection Register 1 */ + /* * CP15 C12 registers */ @@ -281,6 +297,7 @@ #define CP15_TPIDRURW(rr) p15, 0, rr, c13, c0, 2 /* User Read/Write Thread ID Register */ #define CP15_TPIDRURO(rr) p15, 0, rr, c13, c0, 3 /* User Read-Only Thread ID Register */ #define CP15_TPIDRPRW(rr) p15, 0, rr, c13, c0, 4 /* PL1 only Thread ID Register */ +#define CP15_HTPIDR(rr) p15, 4, rr, c13, c0, 2 /* Hyp Software Thread ID Register */ /* * CP15 C14 registers @@ -303,6 +320,12 @@ #define CP15_CNTV_CVAL(rq, rr) p15, 3, rq, rr, c14 /* Virtual Timer Compare Value Register */ #define CP15_CNTVOFF(rq, rr) p15, 4, rq, rr, c14 /* Virtual Offset Register */ #define CP15_CNTHP_CVAL(rq, rr) p15, 6, rq, rr, c14 /* PL2 Physical Timer Compare Value Register */ + +#define CP15_VTTBR(rq, rr) p15, 6, rq, rr, c2 /* Virtualization Translation Table Base Register */ +#define CP15_HTTBR(rq, rr) p15, 4, rq, rr, c2 /* Hyp Translation Table Base Register */ +#define CP15_TTBR0_2(rq, rr) p15, 0, rq, rr, c2 /* Translation Table Base Register 0 */ +#define CP15_TTBR1_2(rq, rr) p15, 1, rq, rr, c2 /* Translation Table Base Register 1 */ +#define CP15_PAR_2(rq, rr) p15, 0, rq, rr, c7 /* Physical Address Register */ /* * CP15 C15 registers From owner-svn-src-all@freebsd.org Thu Dec 14 13:38:55 2017 Return-Path: Delivered-To: svn-src-all@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 BBAE2E80470; Thu, 14 Dec 2017 13:38:55 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AD7B63CF3; Thu, 14 Dec 2017 13:38:55 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id ED8C51AD94; Thu, 14 Dec 2017 13:38:54 +0000 (UTC) Date: Thu, 14 Dec 2017 13:38:54 +0000 From: Alexey Dokuchaev To: Eugene Grosbein Cc: rgrimes@freebsd.org, Warner Losh , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r326809 - head/sys/dev/cardbus Message-ID: <20171214133854.GB51526@FreeBSD.org> References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> <20171213180801.GA28514@FreeBSD.org> <5A316E7B.8030504@grosbein.net> <20171213182452.GA51526@FreeBSD.org> <5A318150.1000601@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A318150.1000601@grosbein.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 13:38:55 -0000 On Thu, Dec 14, 2017 at 02:36:48AM +0700, Eugene Grosbein wrote: > 14.12.2017 1:24, Alexey Dokuchaev wrote: > ... > > One does not tweak FreeBSD, it just works. (tm) > > Hmm. Do you really think so? I do. > I can assure you this is not true. There are numerous ways to take > down untweaked FreeBSD system. This means that there are bugs that should be fixed. Do you have PR numbers? ./danfe From owner-svn-src-all@freebsd.org Thu Dec 14 13:41:13 2017 Return-Path: Delivered-To: svn-src-all@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 1A288E805DB; Thu, 14 Dec 2017 13:41:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB46F641EB; Thu, 14 Dec 2017 13:41:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEDfBAt088804; Thu, 14 Dec 2017 13:41:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEDfBW1088803; Thu, 14 Dec 2017 13:41:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712141341.vBEDfBW1088803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 14 Dec 2017 13:41:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326851 - head/sys/fs/devfs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/fs/devfs X-SVN-Commit-Revision: 326851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 13:41:13 -0000 Author: kib Date: Thu Dec 14 13:41:11 2017 New Revision: 326851 URL: https://svnweb.freebsd.org/changeset/base/326851 Log: In devfs_lookupx() dotdot lookup case, avoid dereferencing dvp->v_mount after dvp is unlocked. The vnode might be reclaimed after unlock, so v_mount becomes NULL. Cache the struct mount pointer before the unlock, the struct is type-stable. Note that devfs_allocv() reads mp->mnt_data but does not operate on it further when dirent is doomed. The unmount cannot proceed until all dirents are reclaimed. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Thu Dec 14 13:19:43 2017 (r326850) +++ head/sys/fs/devfs/devfs_vnops.c Thu Dec 14 13:41:11 2017 (r326851) @@ -896,6 +896,7 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlo struct devfs_dirent *de, *dd; struct devfs_dirent **dde; struct devfs_mount *dmp; + struct mount *mp; struct cdev *cdev; int error, flags, nameiop, dvplocked; char specname[SPECNAMELEN + 1], *pname; @@ -907,7 +908,8 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlo td = cnp->cn_thread; flags = cnp->cn_flags; nameiop = cnp->cn_nameiop; - dmp = VFSTODEVFS(dvp->v_mount); + mp = dvp->v_mount; + dmp = VFSTODEVFS(mp); dd = dvp->v_data; *vpp = NULLVP; @@ -940,8 +942,8 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlo return (ENOENT); dvplocked = VOP_ISLOCKED(dvp); VOP_UNLOCK(dvp, 0); - error = devfs_allocv(de, dvp->v_mount, - cnp->cn_lkflags & LK_TYPE_MASK, vpp); + error = devfs_allocv(de, mp, cnp->cn_lkflags & LK_TYPE_MASK, + vpp); *dm_unlock = 0; vn_lock(dvp, dvplocked | LK_RETRY); return (error); @@ -1026,8 +1028,7 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlo return (0); } } - error = devfs_allocv(de, dvp->v_mount, cnp->cn_lkflags & LK_TYPE_MASK, - vpp); + error = devfs_allocv(de, mp, cnp->cn_lkflags & LK_TYPE_MASK, vpp); *dm_unlock = 0; return (error); } From owner-svn-src-all@freebsd.org Thu Dec 14 14:37:00 2017 Return-Path: Delivered-To: svn-src-all@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 DA94FE8293D; Thu, 14 Dec 2017 14:37:00 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 69A01667D2; Thu, 14 Dec 2017 14:36:59 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBEEarcw036826 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2017 15:36:54 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: danfe@FreeBSD.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBEEanrR089533; Thu, 14 Dec 2017 21:36:49 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326809 - head/sys/dev/cardbus To: Alexey Dokuchaev References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> <20171213180801.GA28514@FreeBSD.org> <5A316E7B.8030504@grosbein.net> <20171213182452.GA51526@FreeBSD.org> <5A318150.1000601@grosbein.net> <20171214133854.GB51526@FreeBSD.org> Cc: rgrimes@freebsd.org, Warner Losh , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <5A328C81.4040501@grosbein.net> Date: Thu, 14 Dec 2017 21:36:49 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20171214133854.GB51526@FreeBSD.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_Q_PLUS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_Q_PLUS Date: is over 4 months after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 14:37:01 -0000 On 14.12.2017 20:38, Alexey Dokuchaev wrote: > On Thu, Dec 14, 2017 at 02:36:48AM +0700, Eugene Grosbein wrote: >> 14.12.2017 1:24, Alexey Dokuchaev wrote: >> ... >>> One does not tweak FreeBSD, it just works. (tm) >> >> Hmm. Do you really think so? > > I do. > >> I can assure you this is not true. There are numerous ways to take >> down untweaked FreeBSD system. > > This means that there are bugs that should be fixed. Sure. > Do you have PR numbers? To start with: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224218 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223824 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223803 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204700 Etc., but I should not recite our Bugzilla here. And that hilaroius "75-frames" NFS-related panic requiring tweaks: https://lists.freebsd.org/pipermail/freebsd-stable/2017-July/087477.html There are problems other kinds of problems, that is: - a need to increase kern.cam.boot_delay/kern.cam.scsi_delay (or similar newer tweaks) to make boot happen; - firewall_nat_enable="YES" with GENERIC kernel requires manual loading of modules like alias_ftp.ko or alias_pptp.ko or else NAT would be useless for such transit traffic; - net.isr.maxthreads may be erronously set to 1 by default affecting performance and requiring manual tweak; - zfsloader(8) failing to find any ZFS pool after zfsboot(8) successfully loaded and started zfsload(8) from zpool (PR pending, need to collect more info) - net.graph.maxdata/net.graph.maxalloc do not auto-scale resulting in DoS and lots of other problems within NETGRAPH... I use FreeBSD in many diverse environments and if I strain my memory, I can remember more. (NFS itself is full of surprises...) From owner-svn-src-all@freebsd.org Thu Dec 14 15:23:32 2017 Return-Path: Delivered-To: svn-src-all@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 905D9E83CAF; Thu, 14 Dec 2017 15:23:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A860684FD; Thu, 14 Dec 2017 15:23:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vBEFNOsv042612 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Dec 2017 17:23:27 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vBEFNOsv042612 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vBEFNO2q042611; Thu, 14 Dec 2017 17:23:24 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 14 Dec 2017 17:23:24 +0200 From: Konstantin Belousov To: Eugene Grosbein Cc: John Baldwin , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Message-ID: <20171214152324.GJ2272@kib.kiev.ua> References: <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> <5A3261BD.5050404@grosbein.net> <20171214115149.GC2272@kib.kiev.ua> <5A3268E9.506@grosbein.net> <20171214122659.GF2272@kib.kiev.ua> <5A327597.3010300@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A327597.3010300@grosbein.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 15:23:32 -0000 On Thu, Dec 14, 2017 at 07:59:03PM +0700, Eugene Grosbein wrote: > On 14.12.2017 19:26, Konstantin Belousov wrote: > > > Sigh. This would make i386 even less usable for everybody, perhaps > > except you. Because default 3G of UVA is too small for some common tasks > > (thanks clang, but also e.g. pypy), and you reduce the user address > > space even more. > > Those who need 3GB of UVA within single process should not use 32 bit system in first place, should they? Why do you even consider it acceptable to break the configuration just because you are not interested in the workload ? 3G cumulative VA does not translate into 3G of usable addresses: the bss is reserved, the address space is fragmented due to need of growing stack to not conflict with mmaped regions. As result, applications get slightly less than 2G usable without tricks, and to apply the tricks apps must know details of the AS layout, i.e. breaking the portability. 386 arch configuration is not perfect but it provides the main intended service of general-purpose workstation, with some limitation caused by 32bit of address space being somewhat low for modern code. Appliance flavoring of the default 386 config is unacceptable. Keep your tweaks local. From owner-svn-src-all@freebsd.org Thu Dec 14 15:39:37 2017 Return-Path: Delivered-To: svn-src-all@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 B64D5E8460E; Thu, 14 Dec 2017 15:39:37 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1356900E; Thu, 14 Dec 2017 15:39:36 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBEFdQOR037211 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2017 16:39:27 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: kostikbel@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBEFdIqU002699; Thu, 14 Dec 2017 22:39:18 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Konstantin Belousov References: <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> <5A3261BD.5050404@grosbein.net> <20171214115149.GC2272@kib.kiev.ua> <5A3268E9.506@grosbein.net> <20171214122659.GF2272@kib.kiev.ua> <5A327597.3010300@grosbein.net> <20171214152324.GJ2272@kib.kiev.ua> Cc: John Baldwin , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A329B26.9040504@grosbein.net> Date: Thu, 14 Dec 2017 22:39:18 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20171214152324.GJ2272@kib.kiev.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_Q_PLUS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_Q_PLUS Date: is over 4 months after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 15:39:37 -0000 On 14.12.2017 22:23, Konstantin Belousov wrote: >>> Sigh. This would make i386 even less usable for everybody, perhaps >>> except you. Because default 3G of UVA is too small for some common tasks >>> (thanks clang, but also e.g. pypy), and you reduce the user address >>> space even more. >> >> Those who need 3GB of UVA within single process should not use 32 bit system in first place, should they? > > Why do you even consider it acceptable to break the configuration just > because you are not interested in the workload ? I do not consider it is acceptable. I'm trying to find compromise. > 3G cumulative VA does not translate into 3G of usable addresses: the bss > is reserved, the address space is fragmented due to need of growing > stack to not conflict with mmaped regions. As result, applications get > slightly less than 2G usable without tricks, and to apply the tricks > apps must know details of the AS layout, i.e. breaking the portability. > > 386 arch configuration is not perfect but it provides the main intended > service of general-purpose workstation, with some limitation caused by > 32bit of address space being somewhat low for modern code. Appliance > flavoring of the default 386 config is unacceptable. Keep your tweaks > local. Do you think that kstack overflow of general-purpose workstation using NFS or IPv6 or WiFi with SCTP is OK? I do not. From owner-svn-src-all@freebsd.org Thu Dec 14 15:40:05 2017 Return-Path: Delivered-To: svn-src-all@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 4AB8DE846A9; Thu, 14 Dec 2017 15:40:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 151D969178; Thu, 14 Dec 2017 15:40:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEFe4LJ038465; Thu, 14 Dec 2017 15:40:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEFe47r038464; Thu, 14 Dec 2017 15:40:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712141540.vBEFe47r038464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 14 Dec 2017 15:40:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326852 - head/usr.bin/vmstat X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.bin/vmstat X-SVN-Commit-Revision: 326852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 15:40:05 -0000 Author: markj Date: Thu Dec 14 15:40:03 2017 New Revision: 326852 URL: https://svnweb.freebsd.org/changeset/base/326852 Log: Re-add spaces lost in r326436. X-MFC with: r326436 Modified: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c ============================================================================== --- head/usr.bin/vmstat/vmstat.c Thu Dec 14 13:41:11 2017 (r326851) +++ head/usr.bin/vmstat/vmstat.c Thu Dec 14 15:40:03 2017 (r326852) @@ -1041,15 +1041,15 @@ dosum(void) sum.v_vnodepgsout); xo_emit("{:page-daemon-wakeups/%9u} {N:page daemon wakeups}\n", sum.v_pdwakeups); - xo_emit("{:page-daemon-pages/%9u} {N:pages examined by the page" + xo_emit("{:page-daemon-pages/%9u} {N:pages examined by the page " "daemon}\n", sum.v_pdpages); - xo_emit("{:page-reclamation-shortfalls/%9u} {N:clean page reclamation" + xo_emit("{:page-reclamation-shortfalls/%9u} {N:clean page reclamation " "shortfalls}\n", sum.v_pdshortfalls); xo_emit("{:reactivated/%9u} {N:pages reactivated by the page daemon}\n", sum.v_reactivated); xo_emit("{:copy-on-write-faults/%9u} {N:copy-on-write faults}\n", sum.v_cow_faults); - xo_emit("{:copy-on-write-optimized-faults/%9u} {N:copy-on-write" + xo_emit("{:copy-on-write-optimized-faults/%9u} {N:copy-on-write " "optimized faults}\n", sum.v_cow_optim); xo_emit("{:zero-fill-pages/%9u} {N:zero fill pages zeroed}\n", sum.v_zfod); @@ -1061,7 +1061,7 @@ dosum(void) sum.v_vm_faults); xo_emit("{:faults-requiring-io/%9u} {N:page faults requiring I\\/O}\n", sum.v_io_faults); - xo_emit("{:faults-from-thread-creation/%9u} {N:pages affected by" + xo_emit("{:faults-from-thread-creation/%9u} {N:pages affected by " "kernel thread creation}\n", sum.v_kthreadpages); xo_emit("{:faults-from-fork/%9u} {N:pages affected by fork}()\n", sum.v_forkpages); From owner-svn-src-all@freebsd.org Thu Dec 14 15:41:35 2017 Return-Path: Delivered-To: svn-src-all@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 615A8E848B0; Thu, 14 Dec 2017 15:41:35 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 256C769493; Thu, 14 Dec 2017 15:41:35 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEFfY8g038561; Thu, 14 Dec 2017 15:41:34 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEFfXmb038550; Thu, 14 Dec 2017 15:41:33 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712141541.vBEFfXmb038550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 14 Dec 2017 15:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326853 - head/sbin/dhclient X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/dhclient X-SVN-Commit-Revision: 326853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 15:41:35 -0000 Author: asomers Date: Thu Dec 14 15:41:32 2017 New Revision: 326853 URL: https://svnweb.freebsd.org/changeset/base/326853 Log: dhclient(8): raise WARNS to 3 Mostly had to fix a lot of signed/unsigned comparison warnings MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/sbin/dhclient/Makefile head/sbin/dhclient/clparse.c head/sbin/dhclient/conflex.c head/sbin/dhclient/dhclient.c head/sbin/dhclient/dhcpd.h head/sbin/dhclient/inet.c head/sbin/dhclient/options.c head/sbin/dhclient/packet.c head/sbin/dhclient/parse.c head/sbin/dhclient/privsep.c head/sbin/dhclient/tree.c Modified: head/sbin/dhclient/Makefile ============================================================================== --- head/sbin/dhclient/Makefile Thu Dec 14 15:40:03 2017 (r326852) +++ head/sbin/dhclient/Makefile Thu Dec 14 15:41:32 2017 (r326853) @@ -50,7 +50,7 @@ LIBADD+= cap_syslog CFLAGS+=-DWITH_CASPER .endif -WARNS?= 2 +WARNS?= 3 HAS_TESTS= SUBDIR.${MK_TESTS}+= tests Modified: head/sbin/dhclient/clparse.c ============================================================================== --- head/sbin/dhclient/clparse.c Thu Dec 14 15:40:03 2017 (r326852) +++ head/sbin/dhclient/clparse.c Thu Dec 14 15:41:32 2017 (r326853) @@ -296,12 +296,12 @@ parse_client_statement(FILE *cfile, struct interface_i } } -int -parse_X(FILE *cfile, u_int8_t *buf, int max) +unsigned +parse_X(FILE *cfile, u_int8_t *buf, unsigned max) { int token; char *val; - int len; + unsigned len; token = peek_token(&val, cfile); if (token == NUMBER_OR_NAME || token == NUMBER) { @@ -685,14 +685,14 @@ parse_option_decl(FILE *cfile, struct option_data *opt int token; u_int8_t buf[4]; u_int8_t hunkbuf[1024]; - int hunkix = 0; + unsigned hunkix = 0; char *vendor; char *fmt; struct universe *universe; struct option *option; struct iaddr ip_addr; u_int8_t *dp; - int len; + unsigned len; int nul_term = 0; token = next_token(&val, cfile); Modified: head/sbin/dhclient/conflex.c ============================================================================== --- head/sbin/dhclient/conflex.c Thu Dec 14 15:40:03 2017 (r326852) +++ head/sbin/dhclient/conflex.c Thu Dec 14 15:41:32 2017 (r326853) @@ -60,8 +60,8 @@ int eol_token; static char line1[81]; static char line2[81]; -static int lpos; -static int line; +static unsigned lpos; +static unsigned line; static int tlpos; static int tline; static int token; @@ -228,7 +228,8 @@ skip_to_eol(FILE *cfile) static int read_string(FILE *cfile) { - int i, c, bs = 0; + int c, bs = 0; + unsigned i; for (i = 0; i < sizeof(tokbuf); i++) { c = get_char(cfile); @@ -263,7 +264,8 @@ read_string(FILE *cfile) static int read_number(int c, FILE *cfile) { - int seenx = 0, i = 0, token = NUMBER; + int seenx = 0, token = NUMBER; + unsigned i = 0; tokbuf[i++] = c; for (; i < sizeof(tokbuf); i++) { @@ -290,7 +292,7 @@ read_number(int c, FILE *cfile) static int read_num_or_name(int c, FILE *cfile) { - int i = 0; + unsigned i = 0; int rv = NUMBER_OR_NAME; tokbuf[i++] = c; Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Thu Dec 14 15:40:03 2017 (r326852) +++ head/sbin/dhclient/dhclient.c Thu Dec 14 15:41:32 2017 (r326853) @@ -195,7 +195,7 @@ get_ifa(char *cp, int n) return (NULL); } -struct iaddr defaddr = { 4 }; +struct iaddr defaddr = { .len = 4 }; uint8_t curbssid[6]; static void @@ -237,7 +237,8 @@ routehandler(struct protocol *p) n = read(routefd, &msg, sizeof(msg)); rtm = (struct rt_msghdr *)msg; - if (n < sizeof(rtm->rtm_msglen) || n < rtm->rtm_msglen || + if (n < (ssize_t)sizeof(rtm->rtm_msglen) || + n < (ssize_t)rtm->rtm_msglen || rtm->rtm_version != RTM_VERSION) return; @@ -2059,7 +2060,8 @@ priv_script_write_params(char *prefix, struct client_l { struct interface_info *ip = ifi; u_int8_t dbuf[1500], *dp = NULL; - int i, len; + int i; + size_t len; char tbuf[128]; script_set_env(ip->client, prefix, "ip_address", @@ -2209,12 +2211,14 @@ script_write_params(char *prefix, struct client_lease pr_len = strlen(prefix); hdr.code = IMSG_SCRIPT_WRITE_PARAMS; - hdr.len = sizeof(hdr) + sizeof(struct client_lease) + - sizeof(size_t) + fn_len + sizeof(size_t) + sn_len + - sizeof(size_t) + pr_len; + hdr.len = sizeof(hdr) + sizeof(*lease) + + sizeof(fn_len) + fn_len + sizeof(sn_len) + sn_len + + sizeof(pr_len) + pr_len; - for (i = 0; i < 256; i++) - hdr.len += sizeof(int) + lease->options[i].len; + for (i = 0; i < 256; i++) { + hdr.len += sizeof(lease->options[i].len); + hdr.len += lease->options[i].len; + } scripttime = time(NULL); @@ -2223,7 +2227,7 @@ script_write_params(char *prefix, struct client_lease errs = 0; errs += buf_add(buf, &hdr, sizeof(hdr)); - errs += buf_add(buf, lease, sizeof(struct client_lease)); + errs += buf_add(buf, lease, sizeof(*lease)); errs += buf_add(buf, &fn_len, sizeof(fn_len)); errs += buf_add(buf, lease->filename, fn_len); errs += buf_add(buf, &sn_len, sizeof(sn_len)); @@ -2328,7 +2332,8 @@ void script_set_env(struct client_state *client, const char *prefix, const char *name, const char *value) { - int i, j, namelen; + int i, namelen; + size_t j; /* No `` or $() command substitution allowed in environment values! */ for (j=0; j < strlen(value); j++) @@ -2396,7 +2401,7 @@ script_flush_env(struct client_state *client) int dhcp_option_ev_name(char *buf, size_t buflen, struct option *option) { - int i; + size_t i; for (i = 0; option->name[i]; i++) { if (i + 1 == buflen) Modified: head/sbin/dhclient/dhcpd.h ============================================================================== --- head/sbin/dhclient/dhcpd.h Thu Dec 14 15:40:03 2017 (r326852) +++ head/sbin/dhclient/dhcpd.h Thu Dec 14 15:41:32 2017 (r326853) @@ -85,7 +85,7 @@ #define REMOTE_PORT 67 struct option_data { - int len; + size_t len; u_int8_t *data; }; @@ -95,7 +95,7 @@ struct string_list { }; struct iaddr { - int len; + size_t len; unsigned char iabuf[16]; }; @@ -288,9 +288,9 @@ char *parse_string(FILE *); int parse_ip_addr(FILE *, struct iaddr *); void parse_hardware_param(FILE *, struct hardware *); void parse_lease_time(FILE *, time_t *); -unsigned char *parse_numeric_aggregate(FILE *, unsigned char *, int *, - int, int, int); -void convert_num(unsigned char *, char *, int, int); +unsigned char *parse_numeric_aggregate(FILE *, unsigned char *, size_t *, + int, unsigned, int); +void convert_num(unsigned char *, char *, unsigned, int); time_t parse_date(FILE *); /* tree.c */ @@ -427,7 +427,7 @@ int read_client_conf(void); void read_client_leases(void); void parse_client_statement(FILE *, struct interface_info *, struct client_config *); -int parse_X(FILE *, u_int8_t *, int); +unsigned parse_X(FILE *, u_int8_t *, unsigned); int parse_option_list(FILE *, u_int8_t *); void parse_interface_declaration(FILE *, struct client_config *); struct interface_info *interface_or_dummy(char *); Modified: head/sbin/dhclient/inet.c ============================================================================== --- head/sbin/dhclient/inet.c Thu Dec 14 15:40:03 2017 (r326852) +++ head/sbin/dhclient/inet.c Thu Dec 14 15:41:32 2017 (r326853) @@ -56,7 +56,7 @@ struct iaddr subnet_number(struct iaddr addr, struct iaddr mask) { struct iaddr rv; - int i; + unsigned i; rv.len = 0; @@ -79,7 +79,7 @@ struct iaddr broadcast_addr(struct iaddr subnet, struct iaddr mask) { struct iaddr rv; - int i; + unsigned i; if (subnet.len != mask.len) { rv.len = 0; Modified: head/sbin/dhclient/options.c ============================================================================== --- head/sbin/dhclient/options.c Thu Dec 14 15:40:03 2017 (r326852) +++ head/sbin/dhclient/options.c Thu Dec 14 15:41:32 2017 (r326853) @@ -55,11 +55,11 @@ int bad_options_max = 5; void parse_options(struct packet *); void parse_option_buffer(struct packet *, unsigned char *, int); -int store_options(unsigned char *, int, struct tree_cache **, +unsigned store_options(unsigned char *, int, struct tree_cache **, unsigned char *, int, int, int, int); void expand_domain_search(struct packet *packet); -int find_search_domain_name_len(struct option_data *option, int *offset); -void expand_search_domain_name(struct option_data *option, int *offset, +int find_search_domain_name_len(struct option_data *option, size_t *offset); +void expand_search_domain_name(struct option_data *option, size_t *offset, unsigned char **domain_search); @@ -213,7 +213,8 @@ parse_option_buffer(struct packet *packet, void expand_domain_search(struct packet *packet) { - int offset, expanded_len, next_domain_len; + size_t offset; + int expanded_len, next_domain_len; struct option_data *option; unsigned char *domain_search, *cursor; @@ -257,9 +258,10 @@ expand_domain_search(struct packet *packet) } int -find_search_domain_name_len(struct option_data *option, int *offset) +find_search_domain_name_len(struct option_data *option, size_t *offset) { - int domain_name_len, i, label_len, pointer, pointed_len; + int domain_name_len, label_len, pointed_len; + size_t i, pointer; domain_name_len = 0; @@ -324,10 +326,11 @@ find_search_domain_name_len(struct option_data *option } void -expand_search_domain_name(struct option_data *option, int *offset, +expand_search_domain_name(struct option_data *option, size_t *offset, unsigned char **domain_search) { - int i, label_len, pointer; + int label_len; + size_t i, pointer; unsigned char *cursor; /* @@ -381,8 +384,10 @@ cons_options(struct packet *inpacket, struct dhcp_pack int terminate, int bootpp, u_int8_t *prl, int prl_len) { unsigned char priority_list[300], buffer[4096]; - int priority_len, main_buffer_size, mainbufix, bufix; - int option_size, length; + unsigned priority_len; + size_t main_buffer_size; + unsigned option_size, bufix, mainbufix; + int length; /* * If the client has provided a maximum DHCP message size, use @@ -424,7 +429,7 @@ cons_options(struct packet *inpacket, struct dhcp_pack */ if (inpacket && inpacket->options[DHO_DHCP_PARAMETER_REQUEST_LIST].data) { - int prlen = + unsigned prlen = inpacket->options[DHO_DHCP_PARAMETER_REQUEST_LIST].len; if (prlen + priority_len > sizeof(priority_list)) prlen = sizeof(priority_list) - priority_len; @@ -518,7 +523,7 @@ cons_options(struct packet *inpacket, struct dhcp_pack /* * Store all the requested options into the requested buffer. */ -int +unsigned store_options(unsigned char *buffer, int buflen, struct tree_cache **options, unsigned char *priority_list, int priority_len, int first_cutoff, int second_cutoff, int terminate) Modified: head/sbin/dhclient/packet.c ============================================================================== --- head/sbin/dhclient/packet.c Thu Dec 14 15:40:03 2017 (r326852) +++ head/sbin/dhclient/packet.c Thu Dec 14 15:41:32 2017 (r326853) @@ -60,7 +60,7 @@ u_int32_t wrapsum(u_int32_t); u_int32_t checksum(unsigned char *buf, unsigned nbytes, u_int32_t sum) { - int i; + unsigned i; /* Checksum all the pairs of bytes first... */ for (i = 0; i < (nbytes & ~1U); i += 2) { Modified: head/sbin/dhclient/parse.c ============================================================================== --- head/sbin/dhclient/parse.c Thu Dec 14 15:40:03 2017 (r326852) +++ head/sbin/dhclient/parse.c Thu Dec 14 15:41:32 2017 (r326853) @@ -158,7 +158,8 @@ void parse_hardware_param(FILE *cfile, struct hardware *hardware) { unsigned char *t; - int token, hlen; + int token; + size_t hlen; char *val; token = next_token(&val, cfile); @@ -242,13 +243,13 @@ parse_lease_time(FILE *cfile, time_t *timep) * tokenized. */ unsigned char * -parse_numeric_aggregate(FILE *cfile, unsigned char *buf, int *max, - int separator, int base, int size) +parse_numeric_aggregate(FILE *cfile, unsigned char *buf, size_t *max, + int separator, unsigned base, int size) { unsigned char *bufp = buf, *s = NULL; - int token, count = 0; + int token; char *val, *t; - size_t valsize; + size_t valsize, count = 0; pair c = NULL; unsigned char *lbufp = NULL; @@ -329,14 +330,15 @@ parse_numeric_aggregate(FILE *cfile, unsigned char *bu } void -convert_num(unsigned char *buf, char *str, int base, int size) +convert_num(unsigned char *buf, char *str, unsigned base, int size) { - int negative = 0, tval, max; + bool negative = false; + unsigned tval, max; u_int32_t val = 0; char *ptr = str; if (*ptr == '-') { - negative = 1; + negative = true; ptr++; } Modified: head/sbin/dhclient/privsep.c ============================================================================== --- head/sbin/dhclient/privsep.c Thu Dec 14 15:40:03 2017 (r326852) +++ head/sbin/dhclient/privsep.c Thu Dec 14 15:41:32 2017 (r326853) @@ -76,7 +76,8 @@ buf_close(int sock, struct buf *buf) ssize_t buf_read(int sock, void *buf, size_t nbytes) { - ssize_t n, r = 0; + ssize_t n; + size_t r = 0; char *p = buf; do { @@ -84,7 +85,7 @@ buf_read(int sock, void *buf, size_t nbytes) if (n == 0) error("connection closed"); if (n != -1) { - r += n; + r += (size_t)n; p += n; nbytes -= n; } @@ -107,9 +108,9 @@ dispatch_imsg(struct interface_info *ifi, int fd) char *medium, *reason, *filename, *servername, *prefix; size_t medium_len, reason_len, filename_len, - servername_len, prefix_len, totlen; + servername_len, optlen, prefix_len, totlen; struct client_lease lease; - int ret, i, optlen; + int ret, i; struct buf *buf; u_int16_t mtu; Modified: head/sbin/dhclient/tree.c ============================================================================== --- head/sbin/dhclient/tree.c Thu Dec 14 15:40:03 2017 (r326852) +++ head/sbin/dhclient/tree.c Thu Dec 14 15:41:32 2017 (r326853) @@ -47,8 +47,6 @@ __FBSDID("$FreeBSD$"); #include "dhcpd.h" -extern int h_errno; - pair cons(caddr_t car, pair cdr) { From owner-svn-src-all@freebsd.org Thu Dec 14 16:01:00 2017 Return-Path: Delivered-To: svn-src-all@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 412FCE8511E; Thu, 14 Dec 2017 16:01:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C415069EDC; Thu, 14 Dec 2017 16:00:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vBEG0lpU051718 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Dec 2017 18:00:51 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vBEG0lpU051718 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vBEG0lxU051712; Thu, 14 Dec 2017 18:00:47 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 14 Dec 2017 18:00:47 +0200 From: Konstantin Belousov To: Eugene Grosbein Cc: John Baldwin , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326758 - in head/sys/i386: conf include Message-ID: <20171214160047.GL2272@kib.kiev.ua> References: <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> <5A3261BD.5050404@grosbein.net> <20171214115149.GC2272@kib.kiev.ua> <5A3268E9.506@grosbein.net> <20171214122659.GF2272@kib.kiev.ua> <5A327597.3010300@grosbein.net> <20171214152324.GJ2272@kib.kiev.ua> <5A329B26.9040504@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A329B26.9040504@grosbein.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 16:01:00 -0000 On Thu, Dec 14, 2017 at 10:39:18PM +0700, Eugene Grosbein wrote: > On 14.12.2017 22:23, Konstantin Belousov wrote: > > >>> Sigh. This would make i386 even less usable for everybody, perhaps > >>> except you. Because default 3G of UVA is too small for some common tasks > >>> (thanks clang, but also e.g. pypy), and you reduce the user address > >>> space even more. > >> > >> Those who need 3GB of UVA within single process should not use 32 bit system in first place, should they? > > > > Why do you even consider it acceptable to break the configuration just > > because you are not interested in the workload ? > > I do not consider it is acceptable. I'm trying to find compromise. If you do not find the proposed change acceptable, why do you propose it at all ? > > > 3G cumulative VA does not translate into 3G of usable addresses: the bss > > is reserved, the address space is fragmented due to need of growing > > stack to not conflict with mmaped regions. As result, applications get > > slightly less than 2G usable without tricks, and to apply the tricks > > apps must know details of the AS layout, i.e. breaking the portability. > > > > 386 arch configuration is not perfect but it provides the main intended > > service of general-purpose workstation, with some limitation caused by > > 32bit of address space being somewhat low for modern code. Appliance > > flavoring of the default 386 config is unacceptable. Keep your tweaks > > local. > > Do you think that kstack overflow of general-purpose workstation using NFS > or IPv6 or WiFi with SCTP is OK? I do not. Kernel stack overflow is not 'OK', but two things are equally troublesome: - papering over the problem of large structures allocated on stack by increasing the stack size; - ignoring the explanation why the stack increase is problematic by itself and generating thread consisting of 50+ content-less messages claiming that 'it fixes the problem for me'. The proper route to fix the issues was already explained more than several times, and you (and I, and other people) participated in the ongoing efforts there. If it is so much important to you, wave the flag and herd the action, by asking relevant people to help with fixes, be it writing the patches, providing reviews or just finding the place where the stack is abused. It requires identification and time to think and develop specific changes for each place, and cannot happen in one day. But it also would not break KVA-starved architectures and provide fixes relevant to even KVA-ample machines, as you other example shown. For the case of extreme use, there is still the tunable (and ZFS on i386 is extreme). From owner-svn-src-all@freebsd.org Thu Dec 14 16:27:46 2017 Return-Path: Delivered-To: svn-src-all@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 5CB8EE85DFB for ; Thu, 14 Dec 2017 16:27:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (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 19EA96B21B for ; Thu, 14 Dec 2017 16:27:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22d.google.com with SMTP id d16so12427761itj.1 for ; Thu, 14 Dec 2017 08:27:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=XMbebEtcrCiYxixVFXGaEVa4U9/VjbN+zQN52cbAbmg=; b=oI6ZGNFwtVUDvhMM/n/P6p0SKoc1JysO7MJUf39vSLU/6ngUn8OJkdl862jTX9jvyI vT8WJrRi4hM7GCX97Dm0LQZvrDvILZoWkHABN9YXtT2sjE96HcEnpgIevafDqWDYjm4N KTtv30fpTF1Y/LryM6xVeimaH6UNIFG8WZRfs5ZYJvWpWn3m6iXXMFxZKpHUDK9QODPP 2k/7MW0ZvXP9fyNpydmDgWPjl2fNa759uAX1Aqonh9zy3oa9hf9VOy2UeAPQmbEoqP4V G4f6Z9UuIGjXOA0rlrfw1x0Gn7HZ7LyWuIuOhpraUP4BP9DSAaRRAte1xM18v3aBUgk5 uR8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=XMbebEtcrCiYxixVFXGaEVa4U9/VjbN+zQN52cbAbmg=; b=O7eQjCgfKDTsVpuJyotb3J3lr9R0Gjp8QZZ62Jov2nflDfuyDVMwKlWhhlsZtcgELo OUQsF9PnyNctOnYK0jKvZBJct6hMFNux4//Hd3cJjpf64O0WfNPyBQId3SeMhvly5QRm LTkmUMZdvhTSrgdEZvl7NnXbk7k1BZ9cwdtsDk1Xn9k1NJjLKDF7ZYsD4mxHI8z7wp9m u/aAQ5Xdogo485sQyoc7DKn0cAptr008H6QCJqBZtA8I2o8LE15HPLe+gXTxscytgpFg Frun4HbC386Aeu5O/360sHfrpAlvEnBerxVyBald6YO0zbWSl1ZYvTgafotTe8IHwycG 193A== X-Gm-Message-State: AKGB3mKasJUB+8L1wS0ikSCGRhn4JIaFtIFdOzi8jWanc7PKfZJAspyI RiiIgL4l53SRR7ll3pZ7n1oaJ3PAuVHUXyl5bNxuuA== X-Google-Smtp-Source: ACJfBovAyOMaNeOh67NjWxnE+q7N8m3WSMVJTppI7DDBZCBspykL2rdTXtXAUhgvWwkLGthkY86zfR0OhdF7HeDbMy8= X-Received: by 10.107.48.197 with SMTP id w188mr8061200iow.301.1513268865250; Thu, 14 Dec 2017 08:27:45 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Thu, 14 Dec 2017 08:27:44 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <5A328C81.4040501@grosbein.net> References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> <20171213180801.GA28514@FreeBSD.org> <5A316E7B.8030504@grosbein.net> <20171213182452.GA51526@FreeBSD.org> <5A318150.1000601@grosbein.net> <20171214133854.GB51526@FreeBSD.org> <5A328C81.4040501@grosbein.net> From: Warner Losh Date: Thu, 14 Dec 2017 16:27:44 +0000 X-Google-Sender-Auth: 6EJf8vx1gNCommj2Wrp0x_TgTVQ Message-ID: Subject: Re: svn commit: r326809 - head/sys/dev/cardbus To: Eugene Grosbein Cc: Alexey Dokuchaev , "Rodney W. Grimes" , Warner Losh , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 16:27:46 -0000 On Thu, Dec 14, 2017 at 2:36 PM, Eugene Grosbein wrote: > - zfsloader(8) failing to find any ZFS pool after zfsboot(8) successfully > loaded and started zfsload(8) from zpool (PR pending, need to collect more > info) > GPT or MBR? If you disable GELI support, it will work. If you roll back to r326583 it will work. I'm tracking down the breakage related to my efforts to get the loader in shape for a gentle transition to lua. It's either GELI related or size related. Warner From owner-svn-src-all@freebsd.org Thu Dec 14 16:41:53 2017 Return-Path: Delivered-To: svn-src-all@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 E0975E86C9E; Thu, 14 Dec 2017 16:41:53 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A29D66C096; Thu, 14 Dec 2017 16:41:53 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEGfqEf067599; Thu, 14 Dec 2017 16:41:52 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEGfqX9067594; Thu, 14 Dec 2017 16:41:52 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201712141641.vBEGfqX9067594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 14 Dec 2017 16:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326854 - in head/stand/efi: boot1 include libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/stand/efi: boot1 include libefi X-SVN-Commit-Revision: 326854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 16:41:54 -0000 Author: tsoome Date: Thu Dec 14 16:41:52 2017 New Revision: 326854 URL: https://svnweb.freebsd.org/changeset/base/326854 Log: libefi: make efichar.h more usable in stand code Use _STANDALONE for guard expression in efichar.[ch] and add efi_char typedef. clean up boot1.c, and replace for loop in efipart.c with ucs2len(). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D13488 Modified: head/stand/efi/boot1/boot1.c head/stand/efi/include/efichar.h head/stand/efi/libefi/Makefile head/stand/efi/libefi/efichar.c head/stand/efi/libefi/efipart.c Modified: head/stand/efi/boot1/boot1.c ============================================================================== --- head/stand/efi/boot1/boot1.c Thu Dec 14 15:41:32 2017 (r326853) +++ head/stand/efi/boot1/boot1.c Thu Dec 14 16:41:52 2017 (r326854) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include #include -typedef CHAR16 efi_char; #include #include "boot_module.h" Modified: head/stand/efi/include/efichar.h ============================================================================== --- head/stand/efi/include/efichar.h Thu Dec 14 15:41:32 2017 (r326853) +++ head/stand/efi/include/efichar.h Thu Dec 14 16:41:52 2017 (r326854) @@ -29,6 +29,12 @@ #ifndef _BOOT_EFI_EFICHAR_H_ #define _BOOT_EFI_EFICHAR_H_ +#ifdef _STANDALONE +#include + +typedef CHAR16 efi_char; +#endif + int ucs2_to_utf8(const efi_char *, char **); int utf8_to_ucs2(const char *, efi_char **, size_t *); int ucs2len(const efi_char *); Modified: head/stand/efi/libefi/Makefile ============================================================================== --- head/stand/efi/libefi/Makefile Thu Dec 14 15:41:32 2017 (r326853) +++ head/stand/efi/libefi/Makefile Thu Dec 14 16:41:52 2017 (r326854) @@ -52,6 +52,4 @@ CFLAGS+= ${FORMAT_EXTENSIONS} CFLAGS+= -DTERM_EMU .endif -CFLAGS+= -DLIBEFI - .include Modified: head/stand/efi/libefi/efichar.c ============================================================================== --- head/stand/efi/libefi/efichar.c Thu Dec 14 15:41:32 2017 (r326853) +++ head/stand/efi/libefi/efichar.c Thu Dec 14 16:41:52 2017 (r326854) @@ -29,16 +29,16 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef LIBEFI +#ifdef _STANDALONE #include #else #include #include #include #include -#endif #include #include +#endif #include "efichar.h" Modified: head/stand/efi/libefi/efipart.c ============================================================================== --- head/stand/efi/libefi/efipart.c Thu Dec 14 15:41:32 2017 (r326853) +++ head/stand/efi/libefi/efipart.c Thu Dec 14 16:41:52 2017 (r326854) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static EFI_GUID blkio_guid = BLOCK_IO_PROTOCOL; @@ -564,8 +565,7 @@ efipart_hdinfo_add_filepath(EFI_HANDLE disk_handle) unit = 0; /* FILEPATH_DEVICE_PATH has 0 terminated string */ - for (len = 0; node->PathName[len] != 0; len++) - ; + len = ucs2len(node->PathName); if ((pathname = malloc(len + 1)) == NULL) { printf("Failed to add disk, out of memory\n"); free(pd); From owner-svn-src-all@freebsd.org Thu Dec 14 16:51:28 2017 Return-Path: Delivered-To: svn-src-all@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 3E775E87202; Thu, 14 Dec 2017 16:51:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08F906CBB6; Thu, 14 Dec 2017 16:51:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEGpQhN071484; Thu, 14 Dec 2017 16:51:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEGpQ0B071483; Thu, 14 Dec 2017 16:51:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712141651.vBEGpQ0B071483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Dec 2017 16:51:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326855 - head/stand/ficl X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/ficl X-SVN-Commit-Revision: 326855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 16:51:28 -0000 Author: imp Date: Thu Dec 14 16:51:26 2017 New Revision: 326855 URL: https://svnweb.freebsd.org/changeset/base/326855 Log: Cargo cut a fix for the regressions r326585 caused. We need to include ficl.h after the standard includes, rather than before them. It changes the generated code in ways that haven't been completely analyized. This restores the old code generation (as verified by md5 changing back for zfsloader). This should restore GPT + ZFS and GPT + ZFS + GELI booting that was broken in r326585 (or would have been if r326584 hadn't broken the build). Sponsored by: Netflix Modified: head/stand/ficl/float.c Modified: head/stand/ficl/float.c ============================================================================== --- head/stand/ficl/float.c Thu Dec 14 16:41:52 2017 (r326854) +++ head/stand/ficl/float.c Thu Dec 14 16:51:26 2017 (r326855) @@ -43,13 +43,13 @@ /* $FreeBSD$ */ -#include "ficl.h" - -#if FICL_WANT_FLOAT #include #include #include #include +#include "ficl.h" + +#if FICL_WANT_FLOAT #include /******************************************************************* From owner-svn-src-all@freebsd.org Thu Dec 14 16:51:45 2017 Return-Path: Delivered-To: svn-src-all@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 F4217E87259; Thu, 14 Dec 2017 16:51:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD8E36CD2A; Thu, 14 Dec 2017 16:51:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEGphR3071541; Thu, 14 Dec 2017 16:51:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEGph2k071540; Thu, 14 Dec 2017 16:51:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712141651.vBEGph2k071540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Dec 2017 16:51:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326856 - head/stand/i386/gptboot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/i386/gptboot X-SVN-Commit-Revision: 326856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 16:51:45 -0000 Author: imp Date: Thu Dec 14 16:51:43 2017 New Revision: 326856 URL: https://svnweb.freebsd.org/changeset/base/326856 Log: Fix comments after bump in size. Modified: head/stand/i386/gptboot/gptldr.S Modified: head/stand/i386/gptboot/gptldr.S ============================================================================== --- head/stand/i386/gptboot/gptldr.S Thu Dec 14 16:51:26 2017 (r326855) +++ head/stand/i386/gptboot/gptldr.S Thu Dec 14 16:51:43 2017 (r326856) @@ -46,7 +46,7 @@ .set SIZ_PAG,0x1000 # Page size .set SIZ_SEC,0x200 # Sector size .set COPY_BLKS,0x8 # Number of blocks - # to copy for boot2 + # to copy for boot2 (<= 15) .set COPY_BLK_SZ,0x8000 # Copy in 32k blocks; must be # a multiple of 16 bytes @@ -72,7 +72,7 @@ start: xor %cx,%cx # Zero * its header to find boot2. We need to copy boot2 to MEM_USR and BTX * to MEM_BTX. Since those might overlap, we have to copy boot2 * backwards first and then copy BTX. We aren't sure exactly how long - * boot2 is, but it's currently under 128kB so we'll copy 4 blocks of 32kB + * boot2 is, but it's currently under 256kB so we'll copy 8 blocks of 32kB * each; this can be adjusted via COPY_BLK and COPY_BLK_SZ above. */ mov $end,%bx # BTX From owner-svn-src-all@freebsd.org Thu Dec 14 16:52:19 2017 Return-Path: Delivered-To: svn-src-all@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 6BEB0E8741B; Thu, 14 Dec 2017 16:52:19 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 19DA06CEDE; Thu, 14 Dec 2017 16:52:18 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBEGqAQD037747 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2017 17:52:11 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: kostikbel@gmail.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBEGq6T4020335 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 14 Dec 2017 23:52:06 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Konstantin Belousov References: <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> <5A3261BD.5050404@grosbein.net> <20171214115149.GC2272@kib.kiev.ua> <5A3268E9.506@grosbein.net> <20171214122659.GF2272@kib.kiev.ua> <5A327597.3010300@grosbein.net> <20171214152324.GJ2272@kib.kiev.ua> <5A329B26.9040504@grosbein.net> <20171214160047.GL2272@kib.kiev.ua> Cc: John Baldwin , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A32AC32.8080703@grosbein.net> Date: Thu, 14 Dec 2017 23:52:02 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20171214160047.GL2272@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 16:52:19 -0000 14.12.2017 23:00, Konstantin Belousov wrote: >>>>> Sigh. This would make i386 even less usable for everybody, perhaps >>>>> except you. Because default 3G of UVA is too small for some common tasks >>>>> (thanks clang, but also e.g. pypy), and you reduce the user address >>>>> space even more. >>>> Those who need 3GB of UVA within single process should not use 32 bit system in first place, should they? >>> Why do you even consider it acceptable to break the configuration just >>> because you are not interested in the workload ? >> I do not consider it is acceptable. I'm trying to find compromise. > If you do not find the proposed change acceptable, why do you propose > it at all ? I do not consider breakage acceptable but not the change. I am still in doubt and that's why I'm asking questions. I doubt, how average i386 workstation or server can generate 1000+ threads and what is real threshold to get problems because of KVA fragmentation? >>> 386 arch configuration is not perfect but it provides the main intended >>> service of general-purpose workstation, with some limitation caused by >>> 32bit of address space being somewhat low for modern code. Appliance >>> flavoring of the default 386 config is unacceptable. Keep your tweaks >>> local. >> >> Do you think that kstack overflow of general-purpose workstation using NFS >> or IPv6 or WiFi with SCTP is OK? I do not. > > Kernel stack overflow is not 'OK', but two things are equally troublesome: > - papering over the problem of large structures allocated on stack by > increasing the stack size; > - ignoring the explanation why the stack increase is problematic by itself The change was submitted for discussion before any kind of explanation was given. > and generating thread consisting of 50+ content-less messages claiming > that 'it fixes the problem for me'. Not for "me". For average i386 user of IPv6 or SCTP or NFS etc. reporting double faults. > The proper route to fix the issues was already explained more than > several times, and you (and I, and other people) participated in the > ongoing efforts there. If it is so much important to you, wave the flag > and herd the action, by asking relevant people to help with fixes, be it > writing the patches, providing reviews or just finding the place where > the stack is abused. It requires identification and time to think and > develop specific changes for each place, and cannot happen in one day. Exactly. The problem is officialy noted in our docs since 10.2-RELEASE at least. And I doubt we can fix all the code in some foreseeable future and 11.2-RELEASE will still panic same way. And 12.0-RELEASE too, I'm afraid. And that is more important than keeping old defaults for i386 workstation users *unless* there are really lots of applications creating large number of threads/subprocesses. > But it also would not break KVA-starved architectures and provide fixes > relevant to even KVA-ample machines, as you other example shown. > > For the case of extreme use, there is still the tunable (and ZFS on i386 > is extreme). Sadly, we have too many "extreme" cases, as user reports and code analisys shows. That's the problem. From owner-svn-src-all@freebsd.org Thu Dec 14 17:00:25 2017 Return-Path: Delivered-To: svn-src-all@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 A9404E876A5; Thu, 14 Dec 2017 17:00:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72D606D2E7; Thu, 14 Dec 2017 17:00:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEH0OmJ072944; Thu, 14 Dec 2017 17:00:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEH0O87072941; Thu, 14 Dec 2017 17:00:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712141700.vBEH0O87072941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Dec 2017 17:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326857 - in head: . share/mk stand/i386/zfsboot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . share/mk stand/i386/zfsboot X-SVN-Commit-Revision: 326857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 17:00:25 -0000 Author: imp Date: Thu Dec 14 17:00:24 2017 New Revision: 326857 URL: https://svnweb.freebsd.org/changeset/base/326857 Log: Turn loader GELI support in the boot loaders off by default as a temporary workaround. This fixes zfs booting generally, but breaks all GELI booting by default. Add note to UPDATING to this effect. When the GELI issues are resolved, this will be reverted. Modified: head/UPDATING head/share/mk/src.opts.mk head/stand/i386/zfsboot/zfsldr.S Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Dec 14 16:51:43 2017 (r326856) +++ head/UPDATING Thu Dec 14 17:00:24 2017 (r326857) @@ -51,6 +51,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20171214: + r362593 broke ZFS + GELI support for reasons unknown. However, + it also broke ZFS support generally, so GELI has been turned off + by default as the lessor evil in r326857. If you boot off ZFS and/or + GELI, it might not be a good time to update. + 20171125: PowerPC users must update loader(8) by rebuilding world before installing a new kernel, as the protocol connecting them has Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Thu Dec 14 16:51:43 2017 (r326856) +++ head/share/mk/src.opts.mk Thu Dec 14 17:00:24 2017 (r326857) @@ -119,7 +119,6 @@ __DEFAULT_YES_OPTIONS = \ LIB32 \ LIBPTHREAD \ LIBTHR \ - LOADER_GELI \ LOCALES \ LOCATE \ LPR \ @@ -183,6 +182,7 @@ __DEFAULT_NO_OPTIONS = \ LIBSOFT \ LOADER_FIREWIRE \ LOADER_FORCE_LE \ + LOADER_GELI \ NAND \ OFED \ OPENLDAP \ Modified: head/stand/i386/zfsboot/zfsldr.S ============================================================================== --- head/stand/i386/zfsboot/zfsldr.S Thu Dec 14 16:51:43 2017 (r326856) +++ head/stand/i386/zfsboot/zfsldr.S Thu Dec 14 17:00:24 2017 (r326857) @@ -33,7 +33,7 @@ .set SIZ_PAG,0x1000 # Page size .set SIZ_SEC,0x200 # Sector size .set COPY_BLKS,0x8 # Number of blocks - # to copy for boot2 + # to copy for boot2 (<= 15) .set COPY_BLK_SZ,0x8000 # Copy in 32k blocks; must be # a multiple of 16 bytes .set NSECT,(COPY_BLK_SZ / SIZ_SEC * COPY_BLKS) From owner-svn-src-all@freebsd.org Thu Dec 14 17:00:43 2017 Return-Path: Delivered-To: svn-src-all@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 B2568E876FB; Thu, 14 Dec 2017 17:00:43 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 45C306D447; Thu, 14 Dec 2017 17:00:43 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBEH0XRj037845 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2017 18:00:34 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: imp@bsdimp.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBEH0TXV022918 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 15 Dec 2017 00:00:29 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326809 - head/sys/dev/cardbus To: Warner Losh References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> <20171213180801.GA28514@FreeBSD.org> <5A316E7B.8030504@grosbein.net> <20171213182452.GA51526@FreeBSD.org> <5A318150.1000601@grosbein.net> <20171214133854.GB51526@FreeBSD.org> <5A328C81.4040501@grosbein.net> Cc: Alexey Dokuchaev , "Rodney W. Grimes" , Warner Losh , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers From: Eugene Grosbein Message-ID: <5A32AE29.9090300@grosbein.net> Date: Fri, 15 Dec 2017 00:00:25 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 17:00:43 -0000 14.12.2017 23:27, Warner Losh wrote: > - zfsloader(8) failing to find any ZFS pool after zfsboot(8) successfully > loaded and started zfsload(8) from zpool (PR pending, need to collect more info) > > > GPT or MBR? MBR, no GELI used. > If you disable GELI support, it will work. If you roll back to r326583 it will work. > > I'm tracking down the breakage related to my efforts to get the loader in shape for a gentle transition to lua. It's either GELI related or size related. I'll check it out next day, thanks! From owner-svn-src-all@freebsd.org Thu Dec 14 17:06:32 2017 Return-Path: Delivered-To: svn-src-all@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 CCD24E87970 for ; Thu, 14 Dec 2017 17:06:32 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (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 5B88F6DA87 for ; Thu, 14 Dec 2017 17:06:32 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wm0-x22c.google.com with SMTP id r78so12723351wme.5 for ; Thu, 14 Dec 2017 09:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=IqZDKuJQsP/A1oEi/3kuLJIpSNd+3m6hC6MF1jrgCz0=; b=TvECRdDyyJE/tLEyNBqvczn0/ZgTPxzzs1amW0F5jE/VaFQ/WPRdX/J3b7KXXwzwCJ vIf+vmEcIjyBqpOakVhLXdgncn1O8RATrVyUllNjHaqs6NTU4E7wqOrxwtv2rTRUvOCL 1+Ul89oQ2NGS/xcoThZyLDRPUR1p25blAUDeSrZ4q7mfEHNyxMXZJ/Uhm36YeAUsq572 dZyV5bnhZoY67K/YDYdV8Ux/tp0xhsscxUffj8l9ZUfT4tiGmSp3oxSzwIT/aJ5fgvhE hF3x3in5rMU+l27b0loHC0X7M9ntVZZyzsHHiWbzaKIEd1yN+VJK0ZrP4B5717qqyiOE 9iOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IqZDKuJQsP/A1oEi/3kuLJIpSNd+3m6hC6MF1jrgCz0=; b=ae34jtL4yavIdWIcOZuv4tYX/TBpzO5ePYuFj7zl7ZnJTBnGEAc2KESxumw2TozZRy EYAHnK5tTuOGcEh4aOxphhfoWCPF5zz3eC9LATY2eyfYXtJbMP5xKBqkpaMwb3d7n0n5 mHHj5xXYtlfXFduP28ypdkyccG5qAgEMEDZ9O9oM8QA14+JlMcu/I+lY7nC8cWibPyfD 2mmsGWi3POreqzagZYfA9hyGGEO21sHU4sEP2n/ROMWQ+O/hUafz222tLLmeE/HJ7RIk T4ZHgjm6XzPPie+Ce+AVEIQ11Eho8uTgFBiH+a3WTa7bKAXauPWdF40cCfSqkENpBxkZ IsIg== X-Gm-Message-State: AKGB3mLc26uM0wbM13dQnDEhB/pTUs/BoMRJRgm55R7QSSVjFqb9J8zg eMCKHTVIQ9KXcgbsMMuMCtomKQ== X-Google-Smtp-Source: ACJfBouIO842N1ipt3c9x1E0EDx+CDPXCsMeqLcDmCLNQspDvSU49A3fsSLHu/FKhHLBRec1fr1Pew== X-Received: by 10.28.2.198 with SMTP id 189mr2860018wmc.69.1513271190637; Thu, 14 Dec 2017 09:06:30 -0800 (PST) Received: from mutt-hbsd (tor-exit.boingboing.net. [204.11.50.131]) by smtp.gmail.com with ESMTPSA id n74sm23082295wmi.1.2017.12.14.09.06.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Dec 2017 09:06:29 -0800 (PST) Date: Thu, 14 Dec 2017 12:05:52 -0500 From: Shawn Webb To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326857 - in head: . share/mk stand/i386/zfsboot Message-ID: <20171214170552.w4hebwnkehh5szog@mutt-hbsd> References: <201712141700.vBEH0O87072941@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="behblm43urzblcgz" Content-Disposition: inline In-Reply-To: <201712141700.vBEH0O87072941@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20171027 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 17:06:32 -0000 --behblm43urzblcgz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 14, 2017 at 05:00:24PM +0000, Warner Losh wrote: > Author: imp > Date: Thu Dec 14 17:00:24 2017 > New Revision: 326857 > URL: https://svnweb.freebsd.org/changeset/base/326857 >=20 > Log: > Turn loader GELI support in the boot loaders off by default as a > temporary workaround. This fixes zfs booting generally, but breaks all > GELI booting by default. Add note to UPDATING to this effect. When the > GELI issues are resolved, this will be reverted. On an existing 12-CURRENT GELI + root-on-ZFS system (so, full-disk encryption), if I upgrade to this revision, will my system now fail to boot? Or, will it only fail to boot if I update the bootloader? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --behblm43urzblcgz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAloyr20ACgkQaoRlj1JF bu7Cdg//eyfks+KCSqD2WyuDDyscXX+xuUgcafmIkTwO1CNyNaeQQcJ6AD0eO/kk F9oj/9NS8dJK47kIKtP11Nbuun8+Zw9l/v/cyzHraCzPlWYdnMsBZi59mPAIbzKu mV6ebKIOecQl6s0mEHoXmkdo0KFZzZGPclPgfTvbyrHmO0CZSuvpOqripAdg23mb 1hidoa2pGZj5W1NCF7i+eSM+D73I4u6xW47KjmEea8eytC6GV4Dm4eTG+wCXCmxt Z7fSnJiLDzsnX74OTIffl4a0VpadXDhlPp0LrK0A8LpA/RrjSNwAct88H8XF44cU 8dAxZdE4ClFu7G07LBxEimQQzs/ylEZ7klWrF7qoxvypzVNYTu2lpi5YqGNsaAh6 c7SLZpK7V4uaWhcbxgxuTEi6n+TtMOyPFFXngPbyBwZDZg00OK2PAFeZ2NfGX4iE iftal1fObiVq8eV6qcKUSFeyFHNhtrpBYIN2IKv3c41mcV78U2Ih5A12zpIASIm3 H8wT8YKQcsKv/0Pxci07ekh2Pq6cZcPH1wMJiGcRXDD05TqpYUbEK6CFurJMX5n1 z41yv+C/Sv0cDuS9W6287jEnTGzGEmcqeVsa1L8nFOC8EaM3XWlZcZNhH+AVkzwc yXBiV8CMmKj5xSmsQ6YuRI8cWqpIENeBecBYAWGflDazvFp2xLg= =s2Wl -----END PGP SIGNATURE----- --behblm43urzblcgz-- From owner-svn-src-all@freebsd.org Thu Dec 14 18:11:47 2017 Return-Path: Delivered-To: svn-src-all@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 825DAE89D15; Thu, 14 Dec 2017 18:11:47 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59E6570EB5; Thu, 14 Dec 2017 18:11:47 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBEIBcMn098115; Thu, 14 Dec 2017 10:11:38 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBEIBcWR098114; Thu, 14 Dec 2017 10:11:38 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712141811.vBEIBcWR098114@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326857 - in head: . share/mk stand/i386/zfsboot In-Reply-To: <201712141700.vBEH0O87072941@repo.freebsd.org> To: Warner Losh Date: Thu, 14 Dec 2017 10:11:38 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 18:11:47 -0000 > Author: imp > Date: Thu Dec 14 17:00:24 2017 > New Revision: 326857 > URL: https://svnweb.freebsd.org/changeset/base/326857 > > Log: > Turn loader GELI support in the boot loaders off by default as a > temporary workaround. This fixes zfs booting generally, but breaks all > GELI booting by default. Add note to UPDATING to this effect. When the > GELI issues are resolved, this will be reverted. > > Modified: > head/UPDATING > head/share/mk/src.opts.mk > head/stand/i386/zfsboot/zfsldr.S Was the change to this an unintentional oops merge, as This looks to be doing more than what you document in the log entry. > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Thu Dec 14 16:51:43 2017 (r326856) > +++ head/UPDATING Thu Dec 14 17:00:24 2017 (r326857) > @@ -51,6 +51,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: > > ****************************** SPECIAL WARNING: ****************************** > > +20171214: > + r362593 broke ZFS + GELI support for reasons unknown. However, > + it also broke ZFS support generally, so GELI has been turned off > + by default as the lessor evil in r326857. If you boot off ZFS and/or > + GELI, it might not be a good time to update. > + > 20171125: > PowerPC users must update loader(8) by rebuilding world before > installing a new kernel, as the protocol connecting them has > > Modified: head/share/mk/src.opts.mk > ============================================================================== > --- head/share/mk/src.opts.mk Thu Dec 14 16:51:43 2017 (r326856) > +++ head/share/mk/src.opts.mk Thu Dec 14 17:00:24 2017 (r326857) > @@ -119,7 +119,6 @@ __DEFAULT_YES_OPTIONS = \ > LIB32 \ > LIBPTHREAD \ > LIBTHR \ > - LOADER_GELI \ > LOCALES \ > LOCATE \ > LPR \ > @@ -183,6 +182,7 @@ __DEFAULT_NO_OPTIONS = \ > LIBSOFT \ > LOADER_FIREWIRE \ > LOADER_FORCE_LE \ > + LOADER_GELI \ > NAND \ > OFED \ > OPENLDAP \ > > Modified: head/stand/i386/zfsboot/zfsldr.S > ============================================================================== > --- head/stand/i386/zfsboot/zfsldr.S Thu Dec 14 16:51:43 2017 (r326856) > +++ head/stand/i386/zfsboot/zfsldr.S Thu Dec 14 17:00:24 2017 (r326857) > @@ -33,7 +33,7 @@ > .set SIZ_PAG,0x1000 # Page size > .set SIZ_SEC,0x200 # Sector size > .set COPY_BLKS,0x8 # Number of blocks > - # to copy for boot2 > + # to copy for boot2 (<= 15) This seems to match a commit you just made to other parts of the code. > .set COPY_BLK_SZ,0x8000 # Copy in 32k blocks; must be > # a multiple of 16 bytes > .set NSECT,(COPY_BLK_SZ / SIZ_SEC * COPY_BLKS) -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Dec 14 18:57:19 2017 Return-Path: Delivered-To: svn-src-all@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 09F6AE8B6F1; Thu, 14 Dec 2017 18:57:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5F1F7319F; Thu, 14 Dec 2017 18:57:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEIvHQu024804; Thu, 14 Dec 2017 18:57:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEIvHei024803; Thu, 14 Dec 2017 18:57:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712141857.vBEIvHei024803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Dec 2017 18:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326858 - head/stand/ficl X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/ficl X-SVN-Commit-Revision: 326858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 18:57:19 -0000 Author: imp Date: Thu Dec 14 18:57:17 2017 New Revision: 326858 URL: https://svnweb.freebsd.org/changeset/base/326858 Log: Revert r326855: Cargo cut a fix for the regressions r326585 caused. This was an experiment that landed in the wrong branch and was pushed accidentally. It's best if it is ignored because the difference was due to vers.o being different, not float.o... And it was confirmed to not fix anything... Pointy Hat to: imp Modified: head/stand/ficl/float.c Modified: head/stand/ficl/float.c ============================================================================== --- head/stand/ficl/float.c Thu Dec 14 17:00:24 2017 (r326857) +++ head/stand/ficl/float.c Thu Dec 14 18:57:17 2017 (r326858) @@ -43,13 +43,13 @@ /* $FreeBSD$ */ +#include "ficl.h" + +#if FICL_WANT_FLOAT #include #include #include #include -#include "ficl.h" - -#if FICL_WANT_FLOAT #include /******************************************************************* From owner-svn-src-all@freebsd.org Thu Dec 14 20:01:05 2017 Return-Path: Delivered-To: svn-src-all@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 E5F5EE8D642; Thu, 14 Dec 2017 20:01:05 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0B607606B; Thu, 14 Dec 2017 20:01:05 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEK14K3052239; Thu, 14 Dec 2017 20:01:04 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEK14VZ052238; Thu, 14 Dec 2017 20:01:04 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201712142001.vBEK14VZ052238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 14 Dec 2017 20:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326859 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 326859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 20:01:06 -0000 Author: jhibbits Date: Thu Dec 14 20:01:04 2017 New Revision: 326859 URL: https://svnweb.freebsd.org/changeset/base/326859 Log: Add identifier for POWER9 CPU to CPU list Without the identifier in the list booting FreeBSD results in printing the following (from a PowerKVM boot): cpu0: Unknown PowerPC CPU revision 0x1201, 2550.00 MHz For now, add the same feature list as POWER8. As new capabilities are added to support POWER9 specific features, they will be added to this. PR: 224344 Submitted by: Breno Leitao Modified: head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Thu Dec 14 18:57:17 2017 (r326858) +++ head/sys/powerpc/powerpc/cpu.c Thu Dec 14 20:01:04 2017 (r326859) @@ -163,6 +163,12 @@ static const struct cputab models[] = { PPC_FEATURE_HAS_VSX, PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HAS_HTM | PPC_FEATURE2_ISEL | PPC_FEATURE2_HAS_VCRYPTO, NULL }, + { "IBM POWER9", IBMPOWER9, REVFMT_MAJMIN, + PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU | + PPC_FEATURE_SMT | PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06 | + PPC_FEATURE_HAS_VSX, + PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HAS_HTM | PPC_FEATURE2_ISEL | + PPC_FEATURE2_HAS_VCRYPTO, NULL }, { "Motorola PowerPC 7400", MPC7400, REVFMT_MAJMIN, PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU, 0, cpu_6xx_setup }, { "Motorola PowerPC 7410", MPC7410, REVFMT_MAJMIN, From owner-svn-src-all@freebsd.org Thu Dec 14 20:48:51 2017 Return-Path: Delivered-To: svn-src-all@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 AB917E8EFF6; Thu, 14 Dec 2017 20:48:51 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 785D478FD2; Thu, 14 Dec 2017 20:48:51 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEKmogw076612; Thu, 14 Dec 2017 20:48:50 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEKmor6076611; Thu, 14 Dec 2017 20:48:50 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201712142048.vBEKmor6076611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Thu, 14 Dec 2017 20:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326860 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: rstone X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 326860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 20:48:51 -0000 Author: rstone Date: Thu Dec 14 20:48:50 2017 New Revision: 326860 URL: https://svnweb.freebsd.org/changeset/base/326860 Log: Plug an ifaddr leak when changing a route's src If a route is modified in a way that changes the route's source address (i.e. the address used to access the gateway), then a reference on the ifaddr representing the old source address will be leaked if the address type does not have an ifa_rtrequest method defined. Plug the leak by releasing the reference in all cases. Differential Revision: https://reviews.freebsd.org/D13417 Reviewed by: ae MFC after: 3 weeks Sponsored by: Dell Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Thu Dec 14 20:01:04 2017 (r326859) +++ head/sys/net/route.c Thu Dec 14 20:48:50 2017 (r326860) @@ -1781,8 +1781,9 @@ rtrequest1_fib_change(struct rib_head *rnh, struct rt_ /* Check if outgoing interface has changed */ if (info->rti_ifa != NULL && info->rti_ifa != rt->rt_ifa && - rt->rt_ifa != NULL && rt->rt_ifa->ifa_rtrequest != NULL) { - rt->rt_ifa->ifa_rtrequest(RTM_DELETE, rt, info); + rt->rt_ifa != NULL) { + if (rt->rt_ifa->ifa_rtrequest != NULL) + rt->rt_ifa->ifa_rtrequest(RTM_DELETE, rt, info); ifa_free(rt->rt_ifa); } /* Update gateway address */ From owner-svn-src-all@freebsd.org Thu Dec 14 22:11:37 2017 Return-Path: Delivered-To: svn-src-all@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 3C92FE918E9; Thu, 14 Dec 2017 22:11:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDD537BE3E; Thu, 14 Dec 2017 22:11:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEMBZrE013778; Thu, 14 Dec 2017 22:11:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEMBZwf013772; Thu, 14 Dec 2017 22:11:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712142211.vBEMBZwf013772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 14 Dec 2017 22:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326861 - in head/tests/sys/geom/class: . mirror X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/tests/sys/geom/class: . mirror X-SVN-Commit-Revision: 326861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 22:11:37 -0000 Author: markj Date: Thu Dec 14 22:11:35 2017 New Revision: 326861 URL: https://svnweb.freebsd.org/changeset/base/326861 Log: Add some basic tests for gmirror read and write error handling. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Added: head/tests/sys/geom/class/mirror/10_test.sh (contents, props changed) head/tests/sys/geom/class/mirror/11_test.sh (contents, props changed) head/tests/sys/geom/class/mirror/12_test.sh (contents, props changed) head/tests/sys/geom/class/mirror/13_test.sh (contents, props changed) Modified: head/tests/sys/geom/class/geom_subr.sh head/tests/sys/geom/class/mirror/Makefile Modified: head/tests/sys/geom/class/geom_subr.sh ============================================================================== --- head/tests/sys/geom/class/geom_subr.sh Thu Dec 14 20:48:50 2017 (r326860) +++ head/tests/sys/geom/class/geom_subr.sh Thu Dec 14 22:11:35 2017 (r326861) @@ -20,6 +20,16 @@ attach_md() echo $test_md } +detach_md() +{ + local test_md unit + + test_md=$1 + unit=${test_md#md} + mdconfig -d -u $unit || exit + sed -i '' "/^${test_md}$/d" $TEST_MDS_FILE || exit +} + geom_test_cleanup() { local test_md @@ -38,6 +48,7 @@ if [ $(id -u) -ne 0 ]; then echo '1..0 # SKIP tests must be run as root' exit 0 fi + # If the geom class isn't already loaded, try loading it. if ! kldstat -q -m g_${class}; then if ! geom ${class} load; then Added: head/tests/sys/geom/class/mirror/10_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/class/mirror/10_test.sh Thu Dec 14 22:11:35 2017 (r326861) @@ -0,0 +1,69 @@ +#!/bin/sh +# $FreeBSD$ + +# Test handling of read errors. + +. $(dirname $0)/conf.sh + +echo 1..3 + +set -e + +ddbs=2048 +regreadfp="debug.fail_point.g_mirror_regular_request_read" +m1=$(mktemp $base.XXXXXX) +m2=$(mktemp $base.XXXXXX) + +dd if=/dev/random of=$m1 bs=$ddbs count=1024 >/dev/null 2>&1 +dd if=/dev/zero of=$m2 bs=$ddbs count=1024 >/dev/null 2>&1 + +us0=$(attach_md -t vnode -f $m1) +us1=$(attach_md -t vnode -f $m2) + +gmirror label $name /dev/$us0 +gmirror insert $name /dev/$us1 +devwait +syncwait + +tmp1=$(mktemp $base.XXXXXX) +tmp2=$(mktemp $base.XXXXXX) + +EIO=5 +# gmirror should retry a failed read from the other mirror. +sysctl ${regreadfp}="1*return(${EIO})" +dd if=/dev/mirror/$name of=$tmp1 iseek=256 bs=$ddbs count=1 >/dev/null 2>&1 +dd if=/dev/$us1 of=$tmp2 iseek=256 bs=$ddbs count=1 >/dev/null 2>&1 +sysctl ${regreadfp}='off' + +if cmp -s $tmp1 $tmp2; then + echo "ok 1" +else + echo "not ok 1" +fi + +# Make sure that one of the mirrors was marked broken. +genid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*genid: /{print $2}') +genid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*genid: /{print $2}') +if [ $genid1 -eq $(($genid2 + 1)) -o $genid2 -eq $(($genid1 + 1)) ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +# Force a retaste of the disconnected component. +if [ $(gmirror status -s $name | awk '{print $3}') = $us0 ]; then + detach_md $us1 + us1=$(attach_md -t vnode -f $m2) +else + detach_md $us0 + us0=$(attach_md -t vnode -f $m1) +fi + +# Make sure that the component wasn't re-added to the gmirror. +if [ $(gmirror status -s $name | wc -l) -eq 1 ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +rm -f $m1 $m2 $tmp1 $tmp2 Added: head/tests/sys/geom/class/mirror/11_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/class/mirror/11_test.sh Thu Dec 14 22:11:35 2017 (r326861) @@ -0,0 +1,84 @@ +#!/bin/sh +# $FreeBSD$ + +# Test handling of read errors. + +. $(dirname $0)/conf.sh + +echo 1..4 + +set -e + +ddbs=2048 +regreadfp="debug.fail_point.g_mirror_regular_request_read" +m1=$(mktemp $base.XXXXXX) +m2=$(mktemp $base.XXXXXX) + +dd if=/dev/random of=$m1 bs=$ddbs count=1024 >/dev/null 2>&1 +dd if=/dev/zero of=$m2 bs=$ddbs count=1024 >/dev/null 2>&1 + +us0=$(attach_md -t vnode -f $m1) +us1=$(attach_md -t vnode -f $m2) + +gmirror label $name /dev/$us0 +gmirror insert $name /dev/$us1 +devwait +syncwait + +tmp1=$(mktemp $base.XXXXXX) +tmp2=$(mktemp $base.XXXXXX) + +ENXIO=6 +# gmirror has special handling for ENXIO. It does not mark the failed component +# as broken, allowing it to rejoin the mirror automatically when it appears. +sysctl ${regreadfp}="1*return(${ENXIO})" +dd if=/dev/mirror/$name of=$tmp1 iseek=512 bs=$ddbs count=1 >/dev/null 2>&1 +dd if=/dev/$us1 of=$tmp2 iseek=512 bs=$ddbs count=1 >/dev/null 2>&1 +sysctl ${regreadfp}='off' + +if cmp -s $tmp1 $tmp2; then + echo "ok 1" +else + echo "not ok 1" +fi + +# Verify that the genids still match after ENXIO. +genid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*genid: /{print $2}') +genid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*genid: /{print $2}') +if [ $genid1 -eq $genid2 ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +# Trigger a syncid bump. +dd if=/dev/zero of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1 + +# The ENXIO+write should have caused a syncid bump. +syncid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*syncid: /{print $2}') +syncid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*syncid: /{print $2}') +if [ $syncid1 -eq $(($syncid2 + 1)) -o $syncid2 -eq $(($syncid1 + 1)) ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +# Force a retaste of the disconnected component. +if [ $(gmirror status -s $name | awk '{print $3}') = $us0 ]; then + detach_md $us1 + us1=$(attach_md -t vnode -f $m2) +else + detach_md $us0 + us0=$(attach_md -t vnode -f $m1) +fi + +# Make sure that the retaste caused the mirror to automatically be re-added. +if [ $(gmirror status -s $name | wc -l) -eq 2 ]; then + echo "ok 4" +else + echo "not ok 4" +fi + +syncwait + +rm -f $m1 $m2 $tmp1 $tmp2 Added: head/tests/sys/geom/class/mirror/12_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/class/mirror/12_test.sh Thu Dec 14 22:11:35 2017 (r326861) @@ -0,0 +1,68 @@ +#!/bin/sh +# $FreeBSD$ + +# Test handling of write errors. + +. $(dirname $0)/conf.sh + +echo 1..3 + +set -e + +ddbs=2048 +regwritefp="debug.fail_point.g_mirror_regular_request_write" +m1=$(mktemp $base.XXXXXX) +m2=$(mktemp $base.XXXXXX) + +dd if=/dev/zero of=$m1 bs=$ddbs count=1024 >/dev/null 2>&1 +dd if=/dev/zero of=$m2 bs=$ddbs count=1024 >/dev/null 2>&1 + +us0=$(attach_md -t vnode -f $m1) +us1=$(attach_md -t vnode -f $m2) + +gmirror label $name /dev/$us0 /dev/$us1 +devwait + +tmp1=$(mktemp $base.XXXXXX) +tmp2=$(mktemp $base.XXXXXX) +dd if=/dev/random of=$tmp1 bs=$ddbs count=1 >/dev/null 2>&1 + +EIO=5 +# gmirror should kick one of the mirrors out after hitting EIO. +sysctl ${regwritefp}="1*return(${EIO})" +dd if=$tmp1 of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1 +dd if=/dev/mirror/$name of=$tmp2 bs=$ddbs count=1 >/dev/null 2>&1 +sysctl ${regwritefp}='off' + +if cmp -s $tmp1 $tmp2; then + echo "ok 1" +else + echo "not ok 1" +fi + +# Make sure that one of the mirrors was marked broken. +genid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*genid: /{print $2}') +genid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*genid: /{print $2}') +if [ $genid1 -eq $(($genid2 + 1)) -o $genid2 -eq $(($genid1 + 1)) ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +# Force a retaste of the disconnected component. +if [ $(gmirror status -s $name | awk '{print $3}') = $us0 ]; then + detach_md $us1 + us1=$(attach_md -t vnode -f $m2) +else + detach_md $us0 + us0=$(attach_md -t vnode -f $m1) +fi + +# Make sure that the component wasn't re-added to the gmirror. +if [ $(gmirror status -s $name | wc -l) -eq 1 ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +rm -f $m1 $m2 $tmp1 $tmp2 Added: head/tests/sys/geom/class/mirror/13_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/class/mirror/13_test.sh Thu Dec 14 22:11:35 2017 (r326861) @@ -0,0 +1,81 @@ +#!/bin/sh +# $FreeBSD$ + +# Test handling of write errors. + +. $(dirname $0)/conf.sh + +echo 1..4 + +set -e + +ddbs=2048 +regwritefp="debug.fail_point.g_mirror_regular_request_write" +m1=$(mktemp $base.XXXXXX) +m2=$(mktemp $base.XXXXXX) + +dd if=/dev/random of=$m1 bs=$ddbs count=1024 >/dev/null 2>&1 +dd if=/dev/zero of=$m2 bs=$ddbs count=1024 >/dev/null 2>&1 + +us0=$(attach_md -t vnode -f $m1) +us1=$(attach_md -t vnode -f $m2) + +gmirror label $name /dev/$us0 /dev/$us1 +devwait + +tmp1=$(mktemp $base.XXXXXX) +tmp2=$(mktemp $base.XXXXXX) + +dd if=/dev/random of=$tmp1 bs=$ddbs count=1 >/dev/null 2>&1 + +ENXIO=6 +# gmirror has special handling for ENXIO. It does not mark the failed component +# as broken, allowing it to rejoin the mirror automatically when it appears. +sysctl ${regwritefp}="1*return(${ENXIO})" +dd if=$tmp1 of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1 +dd if=/dev/mirror/$name of=$tmp2 bs=$ddbs count=1 >/dev/null 2>&1 +sysctl ${regwritefp}='off' + +if cmp -s $tmp1 $tmp2; then + echo "ok 1" +else + echo "not ok 1" +fi + +# Verify that the genids still match after ENXIO. +genid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*genid: /{print $2}') +genid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*genid: /{print $2}') +if [ $genid1 -eq $genid2 ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +# The ENXIO should have caused a syncid bump. +syncid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*syncid: /{print $2}') +syncid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*syncid: /{print $2}') +if [ $syncid1 -eq $(($syncid2 + 1)) -o $syncid2 -eq $(($syncid1 + 1)) ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +# Force a retaste of the disconnected component. +if [ $(gmirror status -s $name | awk '{print $3}') = $us0 ]; then + detach_md $us1 + us1=$(attach_md -t vnode -f $m2) +else + detach_md $us0 + us0=$(attach_md -t vnode -f $m1) +fi + +# Make sure that the retaste caused the mirror to automatically be re-added. +if [ $(gmirror status -s $name | wc -l) -eq 2 ]; then + echo "ok 4" +else + echo "not ok 4" +fi + +syncwait + +rm -f $m1 $m2 $tmp1 $tmp2 Modified: head/tests/sys/geom/class/mirror/Makefile ============================================================================== --- head/tests/sys/geom/class/mirror/Makefile Thu Dec 14 20:48:50 2017 (r326860) +++ head/tests/sys/geom/class/mirror/Makefile Thu Dec 14 22:11:35 2017 (r326861) @@ -13,6 +13,10 @@ TAP_TESTS_SH+= 6_test TAP_TESTS_SH+= 7_test TAP_TESTS_SH+= 8_test TAP_TESTS_SH+= 9_test +TAP_TESTS_SH+= 10_test +TAP_TESTS_SH+= 11_test +TAP_TESTS_SH+= 12_test +TAP_TESTS_SH+= 13_test ${PACKAGE}FILES+= conf.sh From owner-svn-src-all@freebsd.org Thu Dec 14 22:14:08 2017 Return-Path: Delivered-To: svn-src-all@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 9B38CE91A1C; Thu, 14 Dec 2017 22:14:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64F9D7C105; Thu, 14 Dec 2017 22:14:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEME7vj013945; Thu, 14 Dec 2017 22:14:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEME7lx013943; Thu, 14 Dec 2017 22:14:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712142214.vBEME7lx013943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 14 Dec 2017 22:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326862 - head/tests/sys/geom/class/mirror X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/tests/sys/geom/class/mirror X-SVN-Commit-Revision: 326862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 22:14:08 -0000 Author: markj Date: Thu Dec 14 22:14:07 2017 New Revision: 326862 URL: https://svnweb.freebsd.org/changeset/base/326862 Log: Make indentation consistent with other tests, and use syncwait. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/geom/class/mirror/8_test.sh head/tests/sys/geom/class/mirror/9_test.sh Modified: head/tests/sys/geom/class/mirror/8_test.sh ============================================================================== --- head/tests/sys/geom/class/mirror/8_test.sh Thu Dec 14 22:11:35 2017 (r326861) +++ head/tests/sys/geom/class/mirror/8_test.sh Thu Dec 14 22:14:07 2017 (r326862) @@ -35,9 +35,7 @@ devwait # This will take kern.geom.mirror.timeout seco # Re-attach the second mirror and wait for it to synchronize. us1=$(attach_md -t vnode -f $m2) || exit 1 -while [ $(gmirror status $name | grep ACTIVE | wc -l) -ne 2 ]; do - sleep 1 -done +syncwait # Verify the two mirrors are identical. Destroy the gmirror first so that # the mirror metadata is wiped; otherwise the metadata blocks will fail @@ -45,9 +43,9 @@ done # command instead. gmirror destroy $name if cmp -s ${m1} ${m2}; then - echo "ok 1" + echo "ok 1" else - echo "not ok 1" + echo "not ok 1" fi rm -f $m1 $m2 Modified: head/tests/sys/geom/class/mirror/9_test.sh ============================================================================== --- head/tests/sys/geom/class/mirror/9_test.sh Thu Dec 14 22:11:35 2017 (r326861) +++ head/tests/sys/geom/class/mirror/9_test.sh Thu Dec 14 22:14:07 2017 (r326862) @@ -33,9 +33,7 @@ sysctl debug.fail_point.g_mirror_metadata_write='off' # Replace the broken mirror, and then stop the gmirror. gmirror forget $name || exit 1 gmirror insert $name /dev/$us2 || exit 1 -while [ $(gmirror status $name | grep ACTIVE | wc -l) -ne 2 ]; do - sleep 1 -done +syncwait gmirror stop $name || exit 1 # Restart the gmirror on the original two mirrors. One of them is broken, @@ -49,14 +47,12 @@ dd if=/dev/random of=/dev/mirror/$name bs=$ddbs count= # the metadata blocks will fail the comparison. It would be nice to do this # with a "gmirror verify" command instead. gmirror activate $name /dev/$us2 || exit 1 -while [ $(gmirror status $name | grep ACTIVE | wc -l) -ne 2 ]; do - sleep 1 -done +syncwait gmirror destroy $name || exit 1 if cmp -s $m1 $m3; then - echo "ok 1" + echo "ok 1" else - echo "not ok 1" + echo "not ok 1" fi rm -f $m1 $m2 $m3 From owner-svn-src-all@freebsd.org Thu Dec 14 22:15:47 2017 Return-Path: Delivered-To: svn-src-all@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 746FAE91AC6; Thu, 14 Dec 2017 22:15:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EB237C270; Thu, 14 Dec 2017 22:15:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEMFkcQ014080; Thu, 14 Dec 2017 22:15:46 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEMFk5G014079; Thu, 14 Dec 2017 22:15:46 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712142215.vBEMFk5G014079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 14 Dec 2017 22:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326863 - head/tests/sys/geom/class/mirror X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/tests/sys/geom/class/mirror X-SVN-Commit-Revision: 326863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 22:15:47 -0000 Author: markj Date: Thu Dec 14 22:15:46 2017 New Revision: 326863 URL: https://svnweb.freebsd.org/changeset/base/326863 Log: Belatedly add syncwait. X-MFC with: r326861 Modified: head/tests/sys/geom/class/mirror/conf.sh Modified: head/tests/sys/geom/class/mirror/conf.sh ============================================================================== --- head/tests/sys/geom/class/mirror/conf.sh Thu Dec 14 22:14:07 2017 (r326862) +++ head/tests/sys/geom/class/mirror/conf.sh Thu Dec 14 22:15:46 2017 (r326863) @@ -12,4 +12,11 @@ gmirror_test_cleanup() } trap gmirror_test_cleanup ABRT EXIT INT TERM +syncwait() +{ + while $(gmirror status -s $name | grep -q SYNCHRONIZING); do + sleep 0.1; + done +} + . `dirname $0`/../geom_subr.sh From owner-svn-src-all@freebsd.org Thu Dec 14 22:56:58 2017 Return-Path: Delivered-To: svn-src-all@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 DF8DBE92BD9; Thu, 14 Dec 2017 22:56:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 338307D7AA; Thu, 14 Dec 2017 22:56:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEMuu8g031721; Thu, 14 Dec 2017 22:56:56 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEMurA9031683; Thu, 14 Dec 2017 22:56:53 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201712142256.vBEMurA9031683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 14 Dec 2017 22:56:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326864 - in vendor-sys/acpica/dist: . generate/unix/acpinames source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher sourc... X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . generate/unix/acpinames source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/components/executer sou... X-SVN-Commit-Revision: 326864 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 22:56:59 -0000 Author: jkim Date: Thu Dec 14 22:56:53 2017 New Revision: 326864 URL: https://svnweb.freebsd.org/changeset/base/326864 Log: Import ACPICA 20171214. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/acpinames/Makefile vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/dmswitch.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtables.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/asldebug.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslparseop.c vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslsupport.l vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/cvcompiler.c vendor-sys/acpica/dist/source/compiler/cvdisasm.c vendor-sys/acpica/dist/source/compiler/cvparser.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dttable1.c vendor-sys/acpica/dist/source/compiler/prscan.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/hardware/hwvalid.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/parser/psutils.c vendor-sys/acpica/dist/source/components/utilities/utdebug.c vendor-sys/acpica/dist/source/components/utilities/utnonansi.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/uttrack.c vendor-sys/acpica/dist/source/include/acexcep.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/os_specific/service_layers/osgendbg.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpihelp/acpihelp.h vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/changes.txt Thu Dec 14 22:56:53 2017 (r326864) @@ -1,4 +1,44 @@ ---------------------------------------- +14 December 2017. Summary of changes for version 20171214: + + +1) ACPICA kernel-resident subsystem: + +Fixed a regression in the external (public) AcpiEvaluateObjectTyped +interface where the optional "pathname" argument had inadvertently become +a required argument returning an error if omitted (NULL pointer +argument). + +Fixed two possible memory leaks related to the recently developed "late +resolution" of reference objects within ASL Package Object definitions. + +Added two recently defined _OSI strings: "Windows 2016" and "Windows +2017". Mario Limonciello. + +Implemented and deployed a safer version of the C library function +strncpy: AcpiUtSafeStrncpy. The intent is to at least prevent the +creation of unterminated strings as a possible result of a standard +strncpy. + +Cleaned up and restructured the global variable file (acglobal.h). There +are many changes, but no functional changes. + + +2) iASL Compiler/Disassembler and Tools: + +iASL Table Compiler: Fixed a problem with the DBG2 ACPI table where the +optional OemData field at the end of the table was incorrectly required +for proper compilation. It is now correctly an optional field. + +ASLTS: The entire suite was converted from standard ASL to the ASL+ +language, using the ASL-to-ASL+ converter which is integrated into the +iASL compiler. A binary compare of all output files has verified the +correctness of the conversion. + +iASL: Fixed the source code build for platforms where "char" is unsigned. +This affected the iASL lexer only. Jung-uk Kim. + +---------------------------------------- 10 November 2017. Summary of changes for version 20171110: Modified: vendor-sys/acpica/dist/generate/unix/acpinames/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpinames/Makefile Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/generate/unix/acpinames/Makefile Thu Dec 14 22:56:53 2017 (r326864) @@ -113,6 +113,7 @@ OBJECTS = \ $(OBJDIR)/utmath.o\ $(OBJDIR)/utmisc.o\ $(OBJDIR)/utmutex.o\ + $(OBJDIR)/utnonansi.o\ $(OBJDIR)/utobject.o\ $(OBJDIR)/utosi.o\ $(OBJDIR)/utownerid.o\ Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/common/adisasm.c Thu Dec 14 22:56:53 2017 (r326864) @@ -457,9 +457,9 @@ AdDisassembleOneTable ( * (.xxx) file produced from the converter in case if * it fails to get deleted. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { - strncpy (Table->Signature, AcpiGbl_TableSig, 4); + strncpy (Table->Signature, AcpiGbl_TableSig, ACPI_NAME_SIZE); } #endif Modified: vendor-sys/acpica/dist/source/common/dmswitch.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmswitch.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/common/dmswitch.c Thu Dec 14 22:56:53 2017 (r326864) @@ -543,6 +543,10 @@ AcpiDmIsSwitchBlock ( * statement, so check for it. */ CurrentOp = StoreOp->Common.Next->Common.Next; + if (!CurrentOp) + { + return (FALSE); + } if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP) { CurrentOp = CurrentOp->Common.Next; Modified: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/common/dmtable.c Thu Dec 14 22:56:53 2017 (r326864) @@ -1654,7 +1654,6 @@ AcpiDmDumpTable ( break; - case ACPI_DMT_FADTPM: /* FADT Preferred PM Profile names */ Modified: vendor-sys/acpica/dist/source/common/dmtables.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtables.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/common/dmtables.c Thu Dec 14 22:56:53 2017 (r326864) @@ -314,7 +314,7 @@ AdCreateTableHeader ( /* * Print comments that come before this definition block. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { ASL_CV_PRINT_ONE_COMMENT(AcpiGbl_ParseOpRoot,AML_COMMENT_STANDARD, NULL, 0); } @@ -517,7 +517,7 @@ AdParseTable ( } #ifdef ACPI_ASL_COMPILER - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { AcpiGbl_ParseOpRoot->Common.CvFilename = AcpiGbl_FileTreeRoot->Filename; } Modified: vendor-sys/acpica/dist/source/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbdump.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/common/dmtbdump.c Thu Dec 14 22:56:53 2017 (r326864) @@ -3734,7 +3734,6 @@ NextSubtable: } - /******************************************************************************* * * FUNCTION: AcpiDmDumpSdev Modified: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Dec 14 22:56:53 2017 (r326864) @@ -370,7 +370,7 @@ CgWriteAmlOpcode ( * Before printing the bytecode, generate comment byte codes * associated with this node. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { CgWriteAmlComment(Op); } @@ -550,13 +550,13 @@ CgWriteTableHeader ( * "XXXX" table signature prevents this AML file from running on the AML * interpreter. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { - strncpy(AcpiGbl_TableSig, Child->Asl.Value.String, 4); + strncpy(AcpiGbl_TableSig, Child->Asl.Value.String, ACPI_NAME_SIZE); Child->Asl.Value.String = ACPI_SIG_XXXX; } - strncpy (TableHeader.Signature, Child->Asl.Value.String, 4); + strncpy (TableHeader.Signature, Child->Asl.Value.String, ACPI_NAME_SIZE); /* Revision */ @@ -573,12 +573,12 @@ CgWriteTableHeader ( /* OEMID */ Child = Child->Asl.Next; - strncpy (TableHeader.OemId, Child->Asl.Value.String, 6); + strncpy (TableHeader.OemId, Child->Asl.Value.String, ACPI_OEM_ID_SIZE); /* OEM TableID */ Child = Child->Asl.Next; - strncpy (TableHeader.OemTableId, Child->Asl.Value.String, 8); + strncpy (TableHeader.OemTableId, Child->Asl.Value.String, ACPI_OEM_TABLE_ID_SIZE); /* OEM Revision */ @@ -600,7 +600,7 @@ CgWriteTableHeader ( /* Calculate the comment lengths for this definition block parseOp */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { CvDbgPrint ("Calculating comment lengths for %s in write header\n", Op->Asl.ParseOpName); @@ -756,7 +756,8 @@ CgWriteNode ( /* Write all comments here. */ - if (Gbl_CaptureComments) + + if (AcpiGbl_CaptureComments) { CgWriteAmlComment(Op); } @@ -822,7 +823,7 @@ CgWriteNode ( case PARSEOP_DEFINITION_BLOCK: CgWriteTableHeader (Op); - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { CgWriteAmlDefBlockComment (Op); } Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Dec 14 22:56:53 2017 (r326864) @@ -469,7 +469,7 @@ CmDoCompile ( * node during compilation. We take the very last comment and save it in a * global for it to be used by the disassembler. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { AcpiGbl_LastListHead = Gbl_ParseTreeRoot->Asl.CommentList; Gbl_ParseTreeRoot->Asl.CommentList = NULL; Modified: vendor-sys/acpica/dist/source/compiler/asldebug.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldebug.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/asldebug.c Thu Dec 14 22:56:53 2017 (r326864) @@ -192,7 +192,7 @@ CvDbgPrint ( va_list Args; - if (!Gbl_CaptureComments || !AcpiGbl_DebugAslConversion) + if (!AcpiGbl_CaptureComments || !AcpiGbl_DebugAslConversion) { return; } Modified: vendor-sys/acpica/dist/source/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu Dec 14 22:56:53 2017 (r326864) @@ -618,7 +618,7 @@ FlOpenAmlOutputFile ( if (!Filename) { /* Create the output AML filename */ - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_AML_CODE); } Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloptions.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/asloptions.c Thu Dec 14 22:56:53 2017 (r326864) @@ -323,7 +323,7 @@ AslDoOptions ( Gbl_IntegerOptimizationFlag = FALSE; Gbl_ReferenceOptimizationFlag = FALSE; Gbl_OptimizeTrivialParseNodes = FALSE; - Gbl_CaptureComments = TRUE; + AcpiGbl_CaptureComments = TRUE; AcpiGbl_DoDisassemblerOptimizations = FALSE; AcpiGbl_DebugAslConversion = TRUE; AcpiGbl_DmEmitExternalOpcodes = TRUE; @@ -391,7 +391,7 @@ AslDoOptions ( Gbl_IntegerOptimizationFlag = FALSE; Gbl_ReferenceOptimizationFlag = FALSE; Gbl_OptimizeTrivialParseNodes = FALSE; - Gbl_CaptureComments = TRUE; + AcpiGbl_CaptureComments = TRUE; AcpiGbl_DoDisassemblerOptimizations = FALSE; AcpiGbl_DmEmitExternalOpcodes = TRUE; Gbl_DoExternalsInPlace = TRUE; @@ -416,25 +416,11 @@ AslDoOptions ( { case '^': - /* Get the required argument */ - - if (AcpiGetoptArgument (argc, argv)) - { - return (-1); - } - Gbl_DoCompile = FALSE; break; case 'a': - /* Get the required argument */ - - if (AcpiGetoptArgument (argc, argv)) - { - return (-1); - } - Gbl_DoCompile = FALSE; Gbl_DisassembleAll = TRUE; break; @@ -796,8 +782,8 @@ AslDoOptions ( Gbl_IntegerOptimizationFlag = FALSE; Gbl_ReferenceOptimizationFlag = FALSE; Gbl_OptimizeTrivialParseNodes = FALSE; - Gbl_CaptureComments = TRUE; Gbl_DoExternalsInPlace = TRUE; + AcpiGbl_CaptureComments = TRUE; return (0); case 'r': /* Override revision found in table header */ Modified: vendor-sys/acpica/dist/source/compiler/aslparseop.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslparseop.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/aslparseop.c Thu Dec 14 22:56:53 2017 (r326864) @@ -269,7 +269,7 @@ TrCreateOp ( * FirstChild place it in the parent. This also means that * legitimate comments for the child gets put to the parent. */ - if (Gbl_CaptureComments && + if (AcpiGbl_CaptureComments && ((ParseOpcode == PARSEOP_CONNECTION) || (ParseOpcode == PARSEOP_EXTERNAL) || (ParseOpcode == PARSEOP_OFFSET) || @@ -308,7 +308,7 @@ TrCreateOp ( /* Get the comment from last child in the resource template call */ - if (Gbl_CaptureComments && + if (AcpiGbl_CaptureComments && (Op->Asl.ParseOpcode == PARSEOP_RESOURCETEMPLATE)) { CvDbgPrint ("Transferred current comment list to this op.\n"); @@ -794,7 +794,7 @@ TrAllocateOp ( /* The following is for capturing comments */ - if(Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { LatestOp = Gbl_CommentState.LatestParseOp; Op->Asl.InlineComment = NULL; Modified: vendor-sys/acpica/dist/source/compiler/aslstartup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslstartup.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/aslstartup.c Thu Dec 14 22:56:53 2017 (r326864) @@ -233,11 +233,11 @@ AslInitializeGlobals ( Gbl_Files[i].Filename = NULL; } - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { Gbl_CommentState.SpacesBefore = 0; Gbl_CommentState.CommentType = 1; - Gbl_CommentState.LatestParseOp = NULL; + Gbl_CommentState.LatestParseOp = NULL; Gbl_CommentState.ParsingParenBraceNode = NULL; Gbl_CommentState.CaptureComments = TRUE; } Modified: vendor-sys/acpica/dist/source/compiler/aslsupport.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslsupport.l Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/aslsupport.l Thu Dec 14 22:56:53 2017 (r326864) @@ -496,7 +496,7 @@ AslInsertLineBuffer ( AslResetCurrentLineBuffer (); } - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { CvProcessCommentState (SourceChar); } @@ -525,7 +525,7 @@ static void count ( int Type) { - int i; + char *p; switch (Type) @@ -547,9 +547,9 @@ count ( break; } - for (i = 0; (yytext[i] != 0) && (yytext[i] != EOF); i++) + for (p = yytext; *p != '\0'; p++) { - AslInsertLineBuffer (yytext[i]); + AslInsertLineBuffer (*p); *Gbl_LineBufPtr = 0; } } @@ -580,7 +580,7 @@ AslDoComment ( AslInsertLineBuffer ('/'); AslInsertLineBuffer ('*'); - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = '/'; ++StringBuffer; @@ -595,7 +595,7 @@ loop: while (((c = input ()) != '*') && (c != EOF)) { AslInsertLineBuffer (c); - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = c; ++StringBuffer; @@ -623,7 +623,7 @@ loop: /* Comment is closed only if the NEXT character is a slash */ AslInsertLineBuffer (c); - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = c; ++StringBuffer; @@ -698,7 +698,7 @@ AslDoCommentType2 ( AslInsertLineBuffer ('/'); - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { AslInsertLineBuffer ('*'); *StringBuffer = '/'; @@ -714,7 +714,7 @@ AslDoCommentType2 ( while (((c = input ()) != '\n') && (c != EOF)) { AslInsertLineBuffer (c); - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = c; ++StringBuffer; Modified: vendor-sys/acpica/dist/source/compiler/asltree.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asltree.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/asltree.c Thu Dec 14 22:56:53 2017 (r326864) @@ -253,7 +253,7 @@ TrSetOpIntegerValue ( /* Converter: if this is a method invocation, turn off capture comments */ - if (Gbl_CaptureComments && + if (AcpiGbl_CaptureComments && (ParseOpcode == PARSEOP_METHODCALL)) { Gbl_CommentState.CaptureComments = FALSE; @@ -509,7 +509,7 @@ TrLinkOpChildren ( /* The following is for capturing comments */ - if(Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { /* * If there are "regular comments" detected at this point, @@ -590,7 +590,7 @@ TrLinkOpChildren ( va_end(ap); DbgPrint (ASL_PARSE_OUTPUT, "\n\n"); - if(Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { Gbl_CommentState.LatestParseOp = Op; CvDbgPrint ("TrLinkOpChildren=====Set latest parse op to this op.\n"); @@ -768,7 +768,7 @@ TrLinkChildOp ( * turn on capture comments as it signifies that we are done parsing * a method call. */ - if (Gbl_CaptureComments && Op1) + if (AcpiGbl_CaptureComments && Op1) { if (Op1->Asl.ParseOpcode == PARSEOP_METHODCALL) { Modified: vendor-sys/acpica/dist/source/compiler/aslutils.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslutils.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/aslutils.c Thu Dec 14 22:56:53 2017 (r326864) @@ -422,7 +422,7 @@ UtSetParseOpName ( ACPI_PARSE_OBJECT *Op) { - strncpy (Op->Asl.ParseOpName, UtGetOpName (Op->Asl.ParseOpcode), + AcpiUtSafeStrncpy (Op->Asl.ParseOpName, UtGetOpName (Op->Asl.ParseOpcode), ACPI_MAX_PARSEOP_NAME); } Modified: vendor-sys/acpica/dist/source/compiler/cvcompiler.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/cvcompiler.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/cvcompiler.c Thu Dec 14 22:56:53 2017 (r326864) @@ -186,7 +186,7 @@ CvProcessComment ( char *FinalCommentString; - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = (char) c1; ++StringBuffer; @@ -309,7 +309,7 @@ CvProcessCommentType2 ( char *FinalCommentString; - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = 0; /* null terminate */ CvDbgPrint ("Single-line comment\n"); @@ -395,7 +395,7 @@ CvCalculateCommentLengths( ACPI_COMMENT_NODE *Current = NULL; - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { return (0); } @@ -497,7 +497,7 @@ CgWriteAmlDefBlockComment( char *DirectoryPosition; - if (!Gbl_CaptureComments || + if (!AcpiGbl_CaptureComments || (Op->Asl.ParseOpcode != PARSEOP_DEFINITION_BLOCK)) { return; @@ -615,7 +615,7 @@ CgWriteAmlComment( if ((Op->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK) || - !Gbl_CaptureComments) + !AcpiGbl_CaptureComments) { return; } Modified: vendor-sys/acpica/dist/source/compiler/cvdisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/cvdisasm.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/cvdisasm.c Thu Dec 14 22:56:53 2017 (r326864) @@ -352,7 +352,7 @@ CvCloseBraceWriteComment( UINT32 Level) { - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { AcpiOsPrintf ("}"); return; @@ -385,7 +385,7 @@ CvCloseParenWriteComment( UINT32 Level) { - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { AcpiOsPrintf (")"); return; Modified: vendor-sys/acpica/dist/source/compiler/cvparser.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/cvparser.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/cvparser.c Thu Dec 14 22:56:53 2017 (r326864) @@ -254,7 +254,7 @@ CvInitFileTree ( char *ChildFilename = NULL; - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { return; } @@ -720,7 +720,7 @@ CvCaptureCommentsOnly ( ACPI_FILE_NODE *FileNode; - if (!Gbl_CaptureComments || + if (!AcpiGbl_CaptureComments || Opcode != AML_COMMENT_OP) { return; @@ -973,7 +973,7 @@ CvCaptureComments ( const ACPI_OPCODE_INFO *OpInfo; - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { return; } Modified: vendor-sys/acpica/dist/source/compiler/dtcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtcompile.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/dtcompile.c Thu Dec 14 22:56:53 2017 (r326864) @@ -559,9 +559,17 @@ DtCompileTable ( ACPI_STATUS Status = AE_OK; - if (!Field || !*Field) + if (!Field) { return (AE_BAD_PARAMETER); + } + if (!*Field) + { + /* + * The field list is empty, this means that we are out of fields to + * parse. In other words, we are at the end of the table. + */ + return (AE_END_OF_TABLE); } /* Ignore optional subtable if name does not match */ Modified: vendor-sys/acpica/dist/source/compiler/dttable1.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dttable1.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/dttable1.c Thu Dec 14 22:56:53 2017 (r326864) @@ -596,8 +596,14 @@ DtCompileDbg2 ( Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2OemData, &Subtable, TRUE); - if (ACPI_FAILURE (Status)) + if (Status == AE_END_OF_TABLE) { + /* optional field was not found and we're at the end of the file */ + + goto subtableDone; + } + else if (ACPI_FAILURE (Status)) + { return (Status); } @@ -615,7 +621,7 @@ DtCompileDbg2 ( DtInsertSubtable (ParentTable, Subtable); } - +subtableDone: SubtableCount--; DtPopSubtable (); /* Get next Device Information subtable */ } Modified: vendor-sys/acpica/dist/source/compiler/prscan.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/prscan.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/compiler/prscan.c Thu Dec 14 22:56:53 2017 (r326864) @@ -1196,7 +1196,7 @@ PrPushDirective ( Info->Next = Gbl_DirectiveStack; Info->Directive = Directive; Info->IgnoringThisCodeBlock = Gbl_IgnoringThisCodeBlock; - strncpy (Info->Argument, Argument, MAX_ARGUMENT_LENGTH); + AcpiUtSafeStrncpy (Info->Argument, Argument, MAX_ARGUMENT_LENGTH); DbgPrint (ASL_DEBUG_OUTPUT, "Pr(%.4u) - [%u %s] %*s Pushed [#%s %s]: IgnoreFlag = %s\n", Modified: vendor-sys/acpica/dist/source/components/debugger/dbfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/components/debugger/dbfileio.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/components/debugger/dbfileio.c Thu Dec 14 22:56:53 2017 (r326864) @@ -218,7 +218,7 @@ AcpiDbOpenDebugFile ( } AcpiOsPrintf ("Debug output file %s opened\n", Name); - strncpy (AcpiGbl_DbDebugFilename, Name, + AcpiUtSafeStrncpy (AcpiGbl_DbDebugFilename, Name, sizeof (AcpiGbl_DbDebugFilename)); AcpiGbl_DbOutputToFile = TRUE; } Modified: vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c Thu Dec 14 22:56:53 2017 (r326864) @@ -527,7 +527,7 @@ AcpiDmDescendingOp ( /* Determine which file this parse node is contained in. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { ASL_CV_LABEL_FILENODE (Op); @@ -1046,7 +1046,7 @@ AcpiDmAscendingOp ( /* Point the Op's filename pointer to the proper file */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { ASL_CV_LABEL_FILENODE (Op); @@ -1074,7 +1074,7 @@ AcpiDmAscendingOp ( /* Print any comments that are at the end of the file here */ - if (Gbl_CaptureComments && AcpiGbl_LastListHead) + if (AcpiGbl_CaptureComments && AcpiGbl_LastListHead) { AcpiOsPrintf ("\n"); ASL_CV_PRINT_ONE_COMMENT_LIST (AcpiGbl_LastListHead, 0); Modified: vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c ============================================================================== --- vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c Thu Dec 14 22:56:53 2017 (r326864) @@ -419,9 +419,12 @@ AcpiDsInitPackageElement ( ACPI_OPERAND_OBJECT **ElementPtr; + ACPI_FUNCTION_TRACE (DsInitPackageElement); + + if (!SourceObject) { - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* @@ -456,7 +459,7 @@ AcpiDsInitPackageElement ( SourceObject->Package.Flags |= AOPOBJ_DATA_VALID; } - return (AE_OK); + return_ACPI_STATUS (AE_OK); } @@ -481,6 +484,7 @@ AcpiDsResolvePackageElement ( ACPI_GENERIC_STATE ScopeInfo; ACPI_OPERAND_OBJECT *Element = *ElementPtr; ACPI_NAMESPACE_NODE *ResolvedNode; + ACPI_NAMESPACE_NODE *OriginalNode; char *ExternalPath = NULL; ACPI_OBJECT_TYPE Type; @@ -576,6 +580,7 @@ AcpiDsResolvePackageElement ( * will remain as named references. This behavior is not described * in the ACPI spec, but it appears to be an oversight. */ + OriginalNode = ResolvedNode; Status = AcpiExResolveNodeToValue (&ResolvedNode, NULL); if (ACPI_FAILURE (Status)) { @@ -607,26 +612,27 @@ AcpiDsResolvePackageElement ( */ case ACPI_TYPE_DEVICE: case ACPI_TYPE_THERMAL: - - /* TBD: This may not be necesssary */ - - AcpiUtAddReference (ResolvedNode->Object); + case ACPI_TYPE_METHOD: break; case ACPI_TYPE_MUTEX: - case ACPI_TYPE_METHOD: case ACPI_TYPE_POWER: case ACPI_TYPE_PROCESSOR: case ACPI_TYPE_EVENT: case ACPI_TYPE_REGION: + /* AcpiExResolveNodeToValue gave these an extra reference */ + + AcpiUtRemoveReference (OriginalNode->Object); break; default: /* * For all other types - the node was resolved to an actual - * operand object with a value, return the object + * operand object with a value, return the object. Remove + * a reference on the existing object. */ + AcpiUtRemoveReference (Element); *ElementPtr = (ACPI_OPERAND_OBJECT *) ResolvedNode; break; } Modified: vendor-sys/acpica/dist/source/components/executer/exdump.c ============================================================================== --- vendor-sys/acpica/dist/source/components/executer/exdump.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/components/executer/exdump.c Thu Dec 14 22:56:53 2017 (r326864) @@ -747,7 +747,7 @@ AcpiExDumpOperand ( UINT32 Index; - ACPI_FUNCTION_NAME (ExDumpOperand) + ACPI_FUNCTION_NAME (ExDumpOperand); /* Check if debug output enabled */ @@ -1042,7 +1042,7 @@ AcpiExDumpOperands ( const char *OpcodeName, UINT32 NumOperands) { - ACPI_FUNCTION_NAME (ExDumpOperands); + ACPI_FUNCTION_TRACE (ExDumpOperands); if (!OpcodeName) @@ -1070,7 +1070,7 @@ AcpiExDumpOperands ( ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "**** End operand dump for [%s]\n", OpcodeName)); - return; + return_VOID; } Modified: vendor-sys/acpica/dist/source/components/hardware/hwvalid.c ============================================================================== --- vendor-sys/acpica/dist/source/components/hardware/hwvalid.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/components/hardware/hwvalid.c Thu Dec 14 22:56:53 2017 (r326864) @@ -245,7 +245,7 @@ AcpiHwValidateIoRequest ( const ACPI_PORT_INFO *PortInfo; - ACPI_FUNCTION_NAME (HwValidateIoRequest); + ACPI_FUNCTION_TRACE (HwValidateIoRequest); /* Supported widths are 8/16/32 */ @@ -256,14 +256,15 @@ AcpiHwValidateIoRequest ( { ACPI_ERROR ((AE_INFO, "Bad BitWidth parameter: %8.8X", BitWidth)); - return (AE_BAD_PARAMETER); + return_ACPI_STATUS (AE_BAD_PARAMETER); } PortInfo = AcpiProtectedPorts; ByteWidth = ACPI_DIV_8 (BitWidth); LastAddress = Address + ByteWidth - 1; - ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X", + ACPI_DEBUG_PRINT ((ACPI_DB_IO, + "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X", ACPI_FORMAT_UINT64 (Address), ACPI_FORMAT_UINT64 (LastAddress), ByteWidth)); @@ -274,14 +275,14 @@ AcpiHwValidateIoRequest ( ACPI_ERROR ((AE_INFO, "Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X", ACPI_FORMAT_UINT64 (Address), ByteWidth)); - return (AE_LIMIT); + return_ACPI_STATUS (AE_LIMIT); } /* Exit if requested address is not within the protected port table */ if (Address > AcpiProtectedPorts[ACPI_PORT_INFO_ENTRIES - 1].End) { - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* Check request against the list of protected I/O ports */ @@ -303,8 +304,8 @@ AcpiHwValidateIoRequest ( if (AcpiGbl_OsiData >= PortInfo->OsiDependency) { - ACPI_DEBUG_PRINT ((ACPI_DB_IO, - "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)", + ACPI_DEBUG_PRINT ((ACPI_DB_VALUES, + "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n", ACPI_FORMAT_UINT64 (Address), ByteWidth, PortInfo->Name, PortInfo->Start, PortInfo->End)); @@ -320,7 +321,7 @@ AcpiHwValidateIoRequest ( } } - return (AE_OK); + return_ACPI_STATUS (AE_OK); } Modified: vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c Thu Dec 14 22:56:53 2017 (r326864) @@ -174,11 +174,11 @@ AcpiNsResolveReferences ( * * PARAMETERS: Handle - Object handle (optional) * Pathname - Object pathname (optional) - * ExternalParams - List of parameters to pass to method, + * ExternalParams - List of parameters to pass to a method, * terminated by NULL. May be NULL * if no parameters are being passed. - * ReturnBuffer - Where to put method's return value (if - * any). If NULL, no value is returned. + * ReturnBuffer - Where to put the object return value (if + * any). Required. * ReturnType - Expected type of return object * * RETURN: Status @@ -218,10 +218,16 @@ AcpiEvaluateObjectTyped ( FreeBufferOnError = TRUE; } - Status = AcpiGetHandle (Handle, Pathname, &TargetHandle); - if (ACPI_FAILURE (Status)) + /* Get a handle here, in order to build an error message if needed */ + + TargetHandle = Handle; + if (Pathname) { - return_ACPI_STATUS (Status); + Status = AcpiGetHandle (Handle, Pathname, &TargetHandle); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } } FullPathname = AcpiNsGetExternalPathname (TargetHandle); Modified: vendor-sys/acpica/dist/source/components/parser/psutils.c ============================================================================== --- vendor-sys/acpica/dist/source/components/parser/psutils.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/components/parser/psutils.c Thu Dec 14 22:56:53 2017 (r326864) @@ -213,7 +213,7 @@ AcpiPsInitOp ( Op->Common.DescriptorType = ACPI_DESC_TYPE_PARSER; Op->Common.AmlOpcode = Opcode; - ACPI_DISASM_ONLY_MEMBERS (strncpy (Op->Common.AmlOpName, + ACPI_DISASM_ONLY_MEMBERS (AcpiUtSafeStrncpy (Op->Common.AmlOpName, (AcpiPsGetOpcodeInfo (Opcode))->Name, sizeof (Op->Common.AmlOpName))); } @@ -293,7 +293,7 @@ AcpiPsAllocOp ( AcpiGbl_CurrentScope = Op; } - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { ASL_CV_TRANSFER_COMMENTS (Op); } Modified: vendor-sys/acpica/dist/source/components/utilities/utdebug.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/utdebug.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/components/utilities/utdebug.c Thu Dec 14 22:56:53 2017 (r326864) @@ -290,8 +290,10 @@ AcpiDebugPrint ( { ACPI_THREAD_ID ThreadId; va_list args; +#ifdef ACPI_APPLICATION + int FillCount; +#endif - /* Check if debug output enabled */ if (!ACPI_IS_DEBUG_ENABLED (RequestedDebugLevel, ComponentId)) @@ -334,10 +336,21 @@ AcpiDebugPrint ( AcpiOsPrintf ("[%u] ", (UINT32) ThreadId); } - AcpiOsPrintf ("[%02ld] ", AcpiGbl_NestingLevel); -#endif + FillCount = 48 - AcpiGbl_NestingLevel - + strlen (AcpiUtTrimFunctionName (FunctionName)); + if (FillCount < 0) + { + FillCount = 0; + } + AcpiOsPrintf ("[%02ld] %*s", + AcpiGbl_NestingLevel, AcpiGbl_NestingLevel + 1, " "); + AcpiOsPrintf ("%s%*s: ", + AcpiUtTrimFunctionName (FunctionName), FillCount, " "); + +#else AcpiOsPrintf ("%-22.22s: ", AcpiUtTrimFunctionName (FunctionName)); +#endif va_start (args, Format); AcpiOsVprintf (Format, args); Modified: vendor-sys/acpica/dist/source/components/utilities/utnonansi.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/utnonansi.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/components/utilities/utnonansi.c Thu Dec 14 22:56:53 2017 (r326864) @@ -344,4 +344,17 @@ AcpiUtSafeStrncat ( strncat (Dest, Source, MaxTransferLength); return (FALSE); } + +void +AcpiUtSafeStrncpy ( + char *Dest, + char *Source, + ACPI_SIZE DestSize) +{ + /* Always terminate destination string */ + + strncpy (Dest, Source, DestSize); + Dest[DestSize - 1] = 0; +} + #endif Modified: vendor-sys/acpica/dist/source/components/utilities/utosi.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/utosi.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/components/utilities/utosi.c Thu Dec 14 22:56:53 2017 (r326864) @@ -214,6 +214,8 @@ static ACPI_INTERFACE_INFO AcpiDefaultSupportedInte {"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */ {"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */ {"Windows 2015", NULL, 0, ACPI_OSI_WIN_10}, /* Windows 10 - Added 03/2015 */ + {"Windows 2016", NULL, 0, ACPI_OSI_WIN_10_RS1}, /* Windows 10 version 1607 - Added 12/2017 */ + {"Windows 2017", NULL, 0, ACPI_OSI_WIN_10_RS2}, /* Windows 10 version 1703 - Added 12/2017 */ /* Feature Group Strings */ Modified: vendor-sys/acpica/dist/source/components/utilities/uttrack.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/uttrack.c Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/components/utilities/uttrack.c Thu Dec 14 22:56:53 2017 (r326864) @@ -557,8 +557,7 @@ AcpiUtTrackAllocation ( Allocation->Component = Component; Allocation->Line = Line; - strncpy (Allocation->Module, Module, ACPI_MAX_MODULE_NAME); - Allocation->Module[ACPI_MAX_MODULE_NAME-1] = 0; + AcpiUtSafeStrncpy (Allocation->Module, (char *) Module, ACPI_MAX_MODULE_NAME); if (!Element) { Modified: vendor-sys/acpica/dist/source/include/acexcep.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acexcep.h Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/include/acexcep.h Thu Dec 14 22:56:53 2017 (r326864) @@ -241,8 +241,9 @@ typedef struct acpi_exception_info #define AE_HEX_OVERFLOW EXCEP_ENV (0x0020) #define AE_DECIMAL_OVERFLOW EXCEP_ENV (0x0021) #define AE_OCTAL_OVERFLOW EXCEP_ENV (0x0022) +#define AE_END_OF_TABLE EXCEP_ENV (0x0023) -#define AE_CODE_ENV_MAX 0x0022 +#define AE_CODE_ENV_MAX 0x0023 /* @@ -379,7 +380,8 @@ static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionN EXCEP_TXT ("AE_NUMERIC_OVERFLOW", "Overflow during string-to-integer conversion"), EXCEP_TXT ("AE_HEX_OVERFLOW", "Overflow during ASCII hex-to-binary conversion"), EXCEP_TXT ("AE_DECIMAL_OVERFLOW", "Overflow during ASCII decimal-to-binary conversion"), - EXCEP_TXT ("AE_OCTAL_OVERFLOW", "Overflow during ASCII octal-to-binary conversion") + EXCEP_TXT ("AE_OCTAL_OVERFLOW", "Overflow during ASCII octal-to-binary conversion"), + EXCEP_TXT ("AE_END_OF_TABLE", "Reached the end of table") }; static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Pgm[] = Modified: vendor-sys/acpica/dist/source/include/acglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acglobal.h Thu Dec 14 22:15:46 2017 (r326863) +++ vendor-sys/acpica/dist/source/include/acglobal.h Thu Dec 14 22:56:53 2017 (r326864) @@ -155,7 +155,7 @@ /***************************************************************************** * - * Globals related to the ACPI tables + * Globals related to the incoming ACPI tables * ****************************************************************************/ @@ -197,7 +197,7 @@ ACPI_GLOBAL (UINT8, AcpiGbl_Intege /***************************************************************************** * - * Mutual exclusion within ACPICA subsystem + * Mutual exclusion within the ACPICA subsystem * ****************************************************************************/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 14 22:57:23 2017 Return-Path: Delivered-To: svn-src-all@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 B6153E92C46; Thu, 14 Dec 2017 22:57:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 831167D8DE; Thu, 14 Dec 2017 22:57:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEMvMeM031784; Thu, 14 Dec 2017 22:57:22 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEMvMtA031783; Thu, 14 Dec 2017 22:57:22 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201712142257.vBEMvMtA031783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 14 Dec 2017 22:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326865 - vendor-sys/acpica/20171214 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20171214 X-SVN-Commit-Revision: 326865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 22:57:23 -0000 Author: jkim Date: Thu Dec 14 22:57:22 2017 New Revision: 326865 URL: https://svnweb.freebsd.org/changeset/base/326865 Log: Tag ACPICA 20171214. Added: vendor-sys/acpica/20171214/ - copied from r326864, vendor-sys/acpica/dist/ From owner-svn-src-all@freebsd.org Thu Dec 14 23:21:36 2017 Return-Path: Delivered-To: svn-src-all@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 4D3E1E934EA; Thu, 14 Dec 2017 23:21:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E53837E424; Thu, 14 Dec 2017 23:21:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBENLZ33044407; Thu, 14 Dec 2017 23:21:35 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBENLVGb044369; Thu, 14 Dec 2017 23:21:31 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201712142321.vBENLVGb044369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 14 Dec 2017 23:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326866 - in head/sys/contrib/dev/acpica: . common compiler components/debugger components/disassembler components/dispatcher components/executer components/hardware components/namespac... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys/contrib/dev/acpica: . common compiler components/debugger components/disassembler components/dispatcher components/executer components/hardware components/namespace components/parser compo... X-SVN-Commit-Revision: 326866 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 23:21:36 -0000 Author: jkim Date: Thu Dec 14 23:21:31 2017 New Revision: 326866 URL: https://svnweb.freebsd.org/changeset/base/326866 Log: MFC: r326864 Merge ACPICA 20171214. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/dmswitch.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtables.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/asldebug.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/aslparseop.c head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/aslsupport.l head/sys/contrib/dev/acpica/compiler/asltree.c head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/cvcompiler.c head/sys/contrib/dev/acpica/compiler/cvdisasm.c head/sys/contrib/dev/acpica/compiler/cvparser.c head/sys/contrib/dev/acpica/compiler/dtcompile.c head/sys/contrib/dev/acpica/compiler/dttable1.c head/sys/contrib/dev/acpica/compiler/prscan.c head/sys/contrib/dev/acpica/components/debugger/dbfileio.c head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c head/sys/contrib/dev/acpica/components/executer/exdump.c head/sys/contrib/dev/acpica/components/hardware/hwvalid.c head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/components/parser/psutils.c head/sys/contrib/dev/acpica/components/utilities/utdebug.c head/sys/contrib/dev/acpica/components/utilities/utnonansi.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/components/utilities/uttrack.c head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/os_specific/service_layers/osgendbg.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/changes.txt Thu Dec 14 23:21:31 2017 (r326866) @@ -1,4 +1,44 @@ ---------------------------------------- +14 December 2017. Summary of changes for version 20171214: + + +1) ACPICA kernel-resident subsystem: + +Fixed a regression in the external (public) AcpiEvaluateObjectTyped +interface where the optional "pathname" argument had inadvertently become +a required argument returning an error if omitted (NULL pointer +argument). + +Fixed two possible memory leaks related to the recently developed "late +resolution" of reference objects within ASL Package Object definitions. + +Added two recently defined _OSI strings: "Windows 2016" and "Windows +2017". Mario Limonciello. + +Implemented and deployed a safer version of the C library function +strncpy: AcpiUtSafeStrncpy. The intent is to at least prevent the +creation of unterminated strings as a possible result of a standard +strncpy. + +Cleaned up and restructured the global variable file (acglobal.h). There +are many changes, but no functional changes. + + +2) iASL Compiler/Disassembler and Tools: + +iASL Table Compiler: Fixed a problem with the DBG2 ACPI table where the +optional OemData field at the end of the table was incorrectly required +for proper compilation. It is now correctly an optional field. + +ASLTS: The entire suite was converted from standard ASL to the ASL+ +language, using the ASL-to-ASL+ converter which is integrated into the +iASL compiler. A binary compare of all output files has verified the +correctness of the conversion. + +iASL: Fixed the source code build for platforms where "char" is unsigned. +This affected the iASL lexer only. Jung-uk Kim. + +---------------------------------------- 10 November 2017. Summary of changes for version 20171110: Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/common/adisasm.c Thu Dec 14 23:21:31 2017 (r326866) @@ -457,9 +457,9 @@ AdDisassembleOneTable ( * (.xxx) file produced from the converter in case if * it fails to get deleted. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { - strncpy (Table->Signature, AcpiGbl_TableSig, 4); + strncpy (Table->Signature, AcpiGbl_TableSig, ACPI_NAME_SIZE); } #endif Modified: head/sys/contrib/dev/acpica/common/dmswitch.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmswitch.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/common/dmswitch.c Thu Dec 14 23:21:31 2017 (r326866) @@ -543,6 +543,10 @@ AcpiDmIsSwitchBlock ( * statement, so check for it. */ CurrentOp = StoreOp->Common.Next->Common.Next; + if (!CurrentOp) + { + return (FALSE); + } if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP) { CurrentOp = CurrentOp->Common.Next; Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/common/dmtable.c Thu Dec 14 23:21:31 2017 (r326866) @@ -1654,7 +1654,6 @@ AcpiDmDumpTable ( break; - case ACPI_DMT_FADTPM: /* FADT Preferred PM Profile names */ Modified: head/sys/contrib/dev/acpica/common/dmtables.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtables.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/common/dmtables.c Thu Dec 14 23:21:31 2017 (r326866) @@ -314,7 +314,7 @@ AdCreateTableHeader ( /* * Print comments that come before this definition block. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { ASL_CV_PRINT_ONE_COMMENT(AcpiGbl_ParseOpRoot,AML_COMMENT_STANDARD, NULL, 0); } @@ -517,7 +517,7 @@ AdParseTable ( } #ifdef ACPI_ASL_COMPILER - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { AcpiGbl_ParseOpRoot->Common.CvFilename = AcpiGbl_FileTreeRoot->Filename; } Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Thu Dec 14 23:21:31 2017 (r326866) @@ -3734,7 +3734,6 @@ NextSubtable: } - /******************************************************************************* * * FUNCTION: AcpiDmDumpSdev Modified: head/sys/contrib/dev/acpica/compiler/aslcodegen.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcodegen.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/aslcodegen.c Thu Dec 14 23:21:31 2017 (r326866) @@ -370,7 +370,7 @@ CgWriteAmlOpcode ( * Before printing the bytecode, generate comment byte codes * associated with this node. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { CgWriteAmlComment(Op); } @@ -550,13 +550,13 @@ CgWriteTableHeader ( * "XXXX" table signature prevents this AML file from running on the AML * interpreter. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { - strncpy(AcpiGbl_TableSig, Child->Asl.Value.String, 4); + strncpy(AcpiGbl_TableSig, Child->Asl.Value.String, ACPI_NAME_SIZE); Child->Asl.Value.String = ACPI_SIG_XXXX; } - strncpy (TableHeader.Signature, Child->Asl.Value.String, 4); + strncpy (TableHeader.Signature, Child->Asl.Value.String, ACPI_NAME_SIZE); /* Revision */ @@ -573,12 +573,12 @@ CgWriteTableHeader ( /* OEMID */ Child = Child->Asl.Next; - strncpy (TableHeader.OemId, Child->Asl.Value.String, 6); + strncpy (TableHeader.OemId, Child->Asl.Value.String, ACPI_OEM_ID_SIZE); /* OEM TableID */ Child = Child->Asl.Next; - strncpy (TableHeader.OemTableId, Child->Asl.Value.String, 8); + strncpy (TableHeader.OemTableId, Child->Asl.Value.String, ACPI_OEM_TABLE_ID_SIZE); /* OEM Revision */ @@ -600,7 +600,7 @@ CgWriteTableHeader ( /* Calculate the comment lengths for this definition block parseOp */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { CvDbgPrint ("Calculating comment lengths for %s in write header\n", Op->Asl.ParseOpName); @@ -756,7 +756,8 @@ CgWriteNode ( /* Write all comments here. */ - if (Gbl_CaptureComments) + + if (AcpiGbl_CaptureComments) { CgWriteAmlComment(Op); } @@ -822,7 +823,7 @@ CgWriteNode ( case PARSEOP_DEFINITION_BLOCK: CgWriteTableHeader (Op); - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { CgWriteAmlDefBlockComment (Op); } Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Dec 14 23:21:31 2017 (r326866) @@ -469,7 +469,7 @@ CmDoCompile ( * node during compilation. We take the very last comment and save it in a * global for it to be used by the disassembler. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { AcpiGbl_LastListHead = Gbl_ParseTreeRoot->Asl.CommentList; Gbl_ParseTreeRoot->Asl.CommentList = NULL; Modified: head/sys/contrib/dev/acpica/compiler/asldebug.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldebug.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/asldebug.c Thu Dec 14 23:21:31 2017 (r326866) @@ -192,7 +192,7 @@ CvDbgPrint ( va_list Args; - if (!Gbl_CaptureComments || !AcpiGbl_DebugAslConversion) + if (!AcpiGbl_CaptureComments || !AcpiGbl_DebugAslConversion) { return; } Modified: head/sys/contrib/dev/acpica/compiler/aslfiles.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Dec 14 23:21:31 2017 (r326866) @@ -618,7 +618,7 @@ FlOpenAmlOutputFile ( if (!Filename) { /* Create the output AML filename */ - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_AML_CODE); } Modified: head/sys/contrib/dev/acpica/compiler/asloptions.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloptions.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/asloptions.c Thu Dec 14 23:21:31 2017 (r326866) @@ -323,7 +323,7 @@ AslDoOptions ( Gbl_IntegerOptimizationFlag = FALSE; Gbl_ReferenceOptimizationFlag = FALSE; Gbl_OptimizeTrivialParseNodes = FALSE; - Gbl_CaptureComments = TRUE; + AcpiGbl_CaptureComments = TRUE; AcpiGbl_DoDisassemblerOptimizations = FALSE; AcpiGbl_DebugAslConversion = TRUE; AcpiGbl_DmEmitExternalOpcodes = TRUE; @@ -391,7 +391,7 @@ AslDoOptions ( Gbl_IntegerOptimizationFlag = FALSE; Gbl_ReferenceOptimizationFlag = FALSE; Gbl_OptimizeTrivialParseNodes = FALSE; - Gbl_CaptureComments = TRUE; + AcpiGbl_CaptureComments = TRUE; AcpiGbl_DoDisassemblerOptimizations = FALSE; AcpiGbl_DmEmitExternalOpcodes = TRUE; Gbl_DoExternalsInPlace = TRUE; @@ -416,25 +416,11 @@ AslDoOptions ( { case '^': - /* Get the required argument */ - - if (AcpiGetoptArgument (argc, argv)) - { - return (-1); - } - Gbl_DoCompile = FALSE; break; case 'a': - /* Get the required argument */ - - if (AcpiGetoptArgument (argc, argv)) - { - return (-1); - } - Gbl_DoCompile = FALSE; Gbl_DisassembleAll = TRUE; break; @@ -796,8 +782,8 @@ AslDoOptions ( Gbl_IntegerOptimizationFlag = FALSE; Gbl_ReferenceOptimizationFlag = FALSE; Gbl_OptimizeTrivialParseNodes = FALSE; - Gbl_CaptureComments = TRUE; Gbl_DoExternalsInPlace = TRUE; + AcpiGbl_CaptureComments = TRUE; return (0); case 'r': /* Override revision found in table header */ Modified: head/sys/contrib/dev/acpica/compiler/aslparseop.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslparseop.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/aslparseop.c Thu Dec 14 23:21:31 2017 (r326866) @@ -269,7 +269,7 @@ TrCreateOp ( * FirstChild place it in the parent. This also means that * legitimate comments for the child gets put to the parent. */ - if (Gbl_CaptureComments && + if (AcpiGbl_CaptureComments && ((ParseOpcode == PARSEOP_CONNECTION) || (ParseOpcode == PARSEOP_EXTERNAL) || (ParseOpcode == PARSEOP_OFFSET) || @@ -308,7 +308,7 @@ TrCreateOp ( /* Get the comment from last child in the resource template call */ - if (Gbl_CaptureComments && + if (AcpiGbl_CaptureComments && (Op->Asl.ParseOpcode == PARSEOP_RESOURCETEMPLATE)) { CvDbgPrint ("Transferred current comment list to this op.\n"); @@ -794,7 +794,7 @@ TrAllocateOp ( /* The following is for capturing comments */ - if(Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { LatestOp = Gbl_CommentState.LatestParseOp; Op->Asl.InlineComment = NULL; Modified: head/sys/contrib/dev/acpica/compiler/aslstartup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstartup.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/aslstartup.c Thu Dec 14 23:21:31 2017 (r326866) @@ -233,11 +233,11 @@ AslInitializeGlobals ( Gbl_Files[i].Filename = NULL; } - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { Gbl_CommentState.SpacesBefore = 0; Gbl_CommentState.CommentType = 1; - Gbl_CommentState.LatestParseOp = NULL; + Gbl_CommentState.LatestParseOp = NULL; Gbl_CommentState.ParsingParenBraceNode = NULL; Gbl_CommentState.CaptureComments = TRUE; } Modified: head/sys/contrib/dev/acpica/compiler/aslsupport.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslsupport.l Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/aslsupport.l Thu Dec 14 23:21:31 2017 (r326866) @@ -496,7 +496,7 @@ AslInsertLineBuffer ( AslResetCurrentLineBuffer (); } - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { CvProcessCommentState (SourceChar); } @@ -525,7 +525,7 @@ static void count ( int Type) { - int i; + char *p; switch (Type) @@ -547,9 +547,9 @@ count ( break; } - for (i = 0; (yytext[i] != 0) && (yytext[i] != EOF); i++) + for (p = yytext; *p != '\0'; p++) { - AslInsertLineBuffer (yytext[i]); + AslInsertLineBuffer (*p); *Gbl_LineBufPtr = 0; } } @@ -580,7 +580,7 @@ AslDoComment ( AslInsertLineBuffer ('/'); AslInsertLineBuffer ('*'); - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = '/'; ++StringBuffer; @@ -595,7 +595,7 @@ loop: while (((c = input ()) != '*') && (c != EOF)) { AslInsertLineBuffer (c); - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = c; ++StringBuffer; @@ -623,7 +623,7 @@ loop: /* Comment is closed only if the NEXT character is a slash */ AslInsertLineBuffer (c); - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = c; ++StringBuffer; @@ -698,7 +698,7 @@ AslDoCommentType2 ( AslInsertLineBuffer ('/'); - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { AslInsertLineBuffer ('*'); *StringBuffer = '/'; @@ -714,7 +714,7 @@ AslDoCommentType2 ( while (((c = input ()) != '\n') && (c != EOF)) { AslInsertLineBuffer (c); - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = c; ++StringBuffer; Modified: head/sys/contrib/dev/acpica/compiler/asltree.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltree.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/asltree.c Thu Dec 14 23:21:31 2017 (r326866) @@ -253,7 +253,7 @@ TrSetOpIntegerValue ( /* Converter: if this is a method invocation, turn off capture comments */ - if (Gbl_CaptureComments && + if (AcpiGbl_CaptureComments && (ParseOpcode == PARSEOP_METHODCALL)) { Gbl_CommentState.CaptureComments = FALSE; @@ -509,7 +509,7 @@ TrLinkOpChildren ( /* The following is for capturing comments */ - if(Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { /* * If there are "regular comments" detected at this point, @@ -590,7 +590,7 @@ TrLinkOpChildren ( va_end(ap); DbgPrint (ASL_PARSE_OUTPUT, "\n\n"); - if(Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { Gbl_CommentState.LatestParseOp = Op; CvDbgPrint ("TrLinkOpChildren=====Set latest parse op to this op.\n"); @@ -768,7 +768,7 @@ TrLinkChildOp ( * turn on capture comments as it signifies that we are done parsing * a method call. */ - if (Gbl_CaptureComments && Op1) + if (AcpiGbl_CaptureComments && Op1) { if (Op1->Asl.ParseOpcode == PARSEOP_METHODCALL) { Modified: head/sys/contrib/dev/acpica/compiler/aslutils.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslutils.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/aslutils.c Thu Dec 14 23:21:31 2017 (r326866) @@ -422,7 +422,7 @@ UtSetParseOpName ( ACPI_PARSE_OBJECT *Op) { - strncpy (Op->Asl.ParseOpName, UtGetOpName (Op->Asl.ParseOpcode), + AcpiUtSafeStrncpy (Op->Asl.ParseOpName, UtGetOpName (Op->Asl.ParseOpcode), ACPI_MAX_PARSEOP_NAME); } Modified: head/sys/contrib/dev/acpica/compiler/cvcompiler.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/cvcompiler.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/cvcompiler.c Thu Dec 14 23:21:31 2017 (r326866) @@ -186,7 +186,7 @@ CvProcessComment ( char *FinalCommentString; - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = (char) c1; ++StringBuffer; @@ -309,7 +309,7 @@ CvProcessCommentType2 ( char *FinalCommentString; - if (Gbl_CaptureComments && CurrentState.CaptureComments) + if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { *StringBuffer = 0; /* null terminate */ CvDbgPrint ("Single-line comment\n"); @@ -395,7 +395,7 @@ CvCalculateCommentLengths( ACPI_COMMENT_NODE *Current = NULL; - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { return (0); } @@ -497,7 +497,7 @@ CgWriteAmlDefBlockComment( char *DirectoryPosition; - if (!Gbl_CaptureComments || + if (!AcpiGbl_CaptureComments || (Op->Asl.ParseOpcode != PARSEOP_DEFINITION_BLOCK)) { return; @@ -615,7 +615,7 @@ CgWriteAmlComment( if ((Op->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK) || - !Gbl_CaptureComments) + !AcpiGbl_CaptureComments) { return; } Modified: head/sys/contrib/dev/acpica/compiler/cvdisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/cvdisasm.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/cvdisasm.c Thu Dec 14 23:21:31 2017 (r326866) @@ -352,7 +352,7 @@ CvCloseBraceWriteComment( UINT32 Level) { - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { AcpiOsPrintf ("}"); return; @@ -385,7 +385,7 @@ CvCloseParenWriteComment( UINT32 Level) { - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { AcpiOsPrintf (")"); return; Modified: head/sys/contrib/dev/acpica/compiler/cvparser.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/cvparser.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/cvparser.c Thu Dec 14 23:21:31 2017 (r326866) @@ -254,7 +254,7 @@ CvInitFileTree ( char *ChildFilename = NULL; - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { return; } @@ -720,7 +720,7 @@ CvCaptureCommentsOnly ( ACPI_FILE_NODE *FileNode; - if (!Gbl_CaptureComments || + if (!AcpiGbl_CaptureComments || Opcode != AML_COMMENT_OP) { return; @@ -973,7 +973,7 @@ CvCaptureComments ( const ACPI_OPCODE_INFO *OpInfo; - if (!Gbl_CaptureComments) + if (!AcpiGbl_CaptureComments) { return; } Modified: head/sys/contrib/dev/acpica/compiler/dtcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dtcompile.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/dtcompile.c Thu Dec 14 23:21:31 2017 (r326866) @@ -559,9 +559,17 @@ DtCompileTable ( ACPI_STATUS Status = AE_OK; - if (!Field || !*Field) + if (!Field) { return (AE_BAD_PARAMETER); + } + if (!*Field) + { + /* + * The field list is empty, this means that we are out of fields to + * parse. In other words, we are at the end of the table. + */ + return (AE_END_OF_TABLE); } /* Ignore optional subtable if name does not match */ Modified: head/sys/contrib/dev/acpica/compiler/dttable1.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dttable1.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/dttable1.c Thu Dec 14 23:21:31 2017 (r326866) @@ -596,8 +596,14 @@ DtCompileDbg2 ( Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2OemData, &Subtable, TRUE); - if (ACPI_FAILURE (Status)) + if (Status == AE_END_OF_TABLE) { + /* optional field was not found and we're at the end of the file */ + + goto subtableDone; + } + else if (ACPI_FAILURE (Status)) + { return (Status); } @@ -615,7 +621,7 @@ DtCompileDbg2 ( DtInsertSubtable (ParentTable, Subtable); } - +subtableDone: SubtableCount--; DtPopSubtable (); /* Get next Device Information subtable */ } Modified: head/sys/contrib/dev/acpica/compiler/prscan.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/prscan.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/compiler/prscan.c Thu Dec 14 23:21:31 2017 (r326866) @@ -1196,7 +1196,7 @@ PrPushDirective ( Info->Next = Gbl_DirectiveStack; Info->Directive = Directive; Info->IgnoringThisCodeBlock = Gbl_IgnoringThisCodeBlock; - strncpy (Info->Argument, Argument, MAX_ARGUMENT_LENGTH); + AcpiUtSafeStrncpy (Info->Argument, Argument, MAX_ARGUMENT_LENGTH); DbgPrint (ASL_DEBUG_OUTPUT, "Pr(%.4u) - [%u %s] %*s Pushed [#%s %s]: IgnoreFlag = %s\n", Modified: head/sys/contrib/dev/acpica/components/debugger/dbfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/components/debugger/dbfileio.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/components/debugger/dbfileio.c Thu Dec 14 23:21:31 2017 (r326866) @@ -218,7 +218,7 @@ AcpiDbOpenDebugFile ( } AcpiOsPrintf ("Debug output file %s opened\n", Name); - strncpy (AcpiGbl_DbDebugFilename, Name, + AcpiUtSafeStrncpy (AcpiGbl_DbDebugFilename, Name, sizeof (AcpiGbl_DbDebugFilename)); AcpiGbl_DbOutputToFile = TRUE; } Modified: head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c Thu Dec 14 23:21:31 2017 (r326866) @@ -527,7 +527,7 @@ AcpiDmDescendingOp ( /* Determine which file this parse node is contained in. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { ASL_CV_LABEL_FILENODE (Op); @@ -1046,7 +1046,7 @@ AcpiDmAscendingOp ( /* Point the Op's filename pointer to the proper file */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { ASL_CV_LABEL_FILENODE (Op); @@ -1074,7 +1074,7 @@ AcpiDmAscendingOp ( /* Print any comments that are at the end of the file here */ - if (Gbl_CaptureComments && AcpiGbl_LastListHead) + if (AcpiGbl_CaptureComments && AcpiGbl_LastListHead) { AcpiOsPrintf ("\n"); ASL_CV_PRINT_ONE_COMMENT_LIST (AcpiGbl_LastListHead, 0); Modified: head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c Thu Dec 14 23:21:31 2017 (r326866) @@ -419,9 +419,12 @@ AcpiDsInitPackageElement ( ACPI_OPERAND_OBJECT **ElementPtr; + ACPI_FUNCTION_TRACE (DsInitPackageElement); + + if (!SourceObject) { - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* @@ -456,7 +459,7 @@ AcpiDsInitPackageElement ( SourceObject->Package.Flags |= AOPOBJ_DATA_VALID; } - return (AE_OK); + return_ACPI_STATUS (AE_OK); } @@ -481,6 +484,7 @@ AcpiDsResolvePackageElement ( ACPI_GENERIC_STATE ScopeInfo; ACPI_OPERAND_OBJECT *Element = *ElementPtr; ACPI_NAMESPACE_NODE *ResolvedNode; + ACPI_NAMESPACE_NODE *OriginalNode; char *ExternalPath = NULL; ACPI_OBJECT_TYPE Type; @@ -576,6 +580,7 @@ AcpiDsResolvePackageElement ( * will remain as named references. This behavior is not described * in the ACPI spec, but it appears to be an oversight. */ + OriginalNode = ResolvedNode; Status = AcpiExResolveNodeToValue (&ResolvedNode, NULL); if (ACPI_FAILURE (Status)) { @@ -607,26 +612,27 @@ AcpiDsResolvePackageElement ( */ case ACPI_TYPE_DEVICE: case ACPI_TYPE_THERMAL: - - /* TBD: This may not be necesssary */ - - AcpiUtAddReference (ResolvedNode->Object); + case ACPI_TYPE_METHOD: break; case ACPI_TYPE_MUTEX: - case ACPI_TYPE_METHOD: case ACPI_TYPE_POWER: case ACPI_TYPE_PROCESSOR: case ACPI_TYPE_EVENT: case ACPI_TYPE_REGION: + /* AcpiExResolveNodeToValue gave these an extra reference */ + + AcpiUtRemoveReference (OriginalNode->Object); break; default: /* * For all other types - the node was resolved to an actual - * operand object with a value, return the object + * operand object with a value, return the object. Remove + * a reference on the existing object. */ + AcpiUtRemoveReference (Element); *ElementPtr = (ACPI_OPERAND_OBJECT *) ResolvedNode; break; } Modified: head/sys/contrib/dev/acpica/components/executer/exdump.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exdump.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/components/executer/exdump.c Thu Dec 14 23:21:31 2017 (r326866) @@ -747,7 +747,7 @@ AcpiExDumpOperand ( UINT32 Index; - ACPI_FUNCTION_NAME (ExDumpOperand) + ACPI_FUNCTION_NAME (ExDumpOperand); /* Check if debug output enabled */ @@ -1042,7 +1042,7 @@ AcpiExDumpOperands ( const char *OpcodeName, UINT32 NumOperands) { - ACPI_FUNCTION_NAME (ExDumpOperands); + ACPI_FUNCTION_TRACE (ExDumpOperands); if (!OpcodeName) @@ -1070,7 +1070,7 @@ AcpiExDumpOperands ( ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "**** End operand dump for [%s]\n", OpcodeName)); - return; + return_VOID; } Modified: head/sys/contrib/dev/acpica/components/hardware/hwvalid.c ============================================================================== --- head/sys/contrib/dev/acpica/components/hardware/hwvalid.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/components/hardware/hwvalid.c Thu Dec 14 23:21:31 2017 (r326866) @@ -245,7 +245,7 @@ AcpiHwValidateIoRequest ( const ACPI_PORT_INFO *PortInfo; - ACPI_FUNCTION_NAME (HwValidateIoRequest); + ACPI_FUNCTION_TRACE (HwValidateIoRequest); /* Supported widths are 8/16/32 */ @@ -256,14 +256,15 @@ AcpiHwValidateIoRequest ( { ACPI_ERROR ((AE_INFO, "Bad BitWidth parameter: %8.8X", BitWidth)); - return (AE_BAD_PARAMETER); + return_ACPI_STATUS (AE_BAD_PARAMETER); } PortInfo = AcpiProtectedPorts; ByteWidth = ACPI_DIV_8 (BitWidth); LastAddress = Address + ByteWidth - 1; - ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X", + ACPI_DEBUG_PRINT ((ACPI_DB_IO, + "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X", ACPI_FORMAT_UINT64 (Address), ACPI_FORMAT_UINT64 (LastAddress), ByteWidth)); @@ -274,14 +275,14 @@ AcpiHwValidateIoRequest ( ACPI_ERROR ((AE_INFO, "Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X", ACPI_FORMAT_UINT64 (Address), ByteWidth)); - return (AE_LIMIT); + return_ACPI_STATUS (AE_LIMIT); } /* Exit if requested address is not within the protected port table */ if (Address > AcpiProtectedPorts[ACPI_PORT_INFO_ENTRIES - 1].End) { - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* Check request against the list of protected I/O ports */ @@ -303,8 +304,8 @@ AcpiHwValidateIoRequest ( if (AcpiGbl_OsiData >= PortInfo->OsiDependency) { - ACPI_DEBUG_PRINT ((ACPI_DB_IO, - "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)", + ACPI_DEBUG_PRINT ((ACPI_DB_VALUES, + "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n", ACPI_FORMAT_UINT64 (Address), ByteWidth, PortInfo->Name, PortInfo->Start, PortInfo->End)); @@ -320,7 +321,7 @@ AcpiHwValidateIoRequest ( } } - return (AE_OK); + return_ACPI_STATUS (AE_OK); } Modified: head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c Thu Dec 14 23:21:31 2017 (r326866) @@ -174,11 +174,11 @@ AcpiNsResolveReferences ( * * PARAMETERS: Handle - Object handle (optional) * Pathname - Object pathname (optional) - * ExternalParams - List of parameters to pass to method, + * ExternalParams - List of parameters to pass to a method, * terminated by NULL. May be NULL * if no parameters are being passed. - * ReturnBuffer - Where to put method's return value (if - * any). If NULL, no value is returned. + * ReturnBuffer - Where to put the object return value (if + * any). Required. * ReturnType - Expected type of return object * * RETURN: Status @@ -218,10 +218,16 @@ AcpiEvaluateObjectTyped ( FreeBufferOnError = TRUE; } - Status = AcpiGetHandle (Handle, Pathname, &TargetHandle); - if (ACPI_FAILURE (Status)) + /* Get a handle here, in order to build an error message if needed */ + + TargetHandle = Handle; + if (Pathname) { - return_ACPI_STATUS (Status); + Status = AcpiGetHandle (Handle, Pathname, &TargetHandle); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } } FullPathname = AcpiNsGetExternalPathname (TargetHandle); Modified: head/sys/contrib/dev/acpica/components/parser/psutils.c ============================================================================== --- head/sys/contrib/dev/acpica/components/parser/psutils.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/components/parser/psutils.c Thu Dec 14 23:21:31 2017 (r326866) @@ -213,7 +213,7 @@ AcpiPsInitOp ( Op->Common.DescriptorType = ACPI_DESC_TYPE_PARSER; Op->Common.AmlOpcode = Opcode; - ACPI_DISASM_ONLY_MEMBERS (strncpy (Op->Common.AmlOpName, + ACPI_DISASM_ONLY_MEMBERS (AcpiUtSafeStrncpy (Op->Common.AmlOpName, (AcpiPsGetOpcodeInfo (Opcode))->Name, sizeof (Op->Common.AmlOpName))); } @@ -293,7 +293,7 @@ AcpiPsAllocOp ( AcpiGbl_CurrentScope = Op; } - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { ASL_CV_TRANSFER_COMMENTS (Op); } Modified: head/sys/contrib/dev/acpica/components/utilities/utdebug.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/utdebug.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/components/utilities/utdebug.c Thu Dec 14 23:21:31 2017 (r326866) @@ -290,8 +290,10 @@ AcpiDebugPrint ( { ACPI_THREAD_ID ThreadId; va_list args; +#ifdef ACPI_APPLICATION + int FillCount; +#endif - /* Check if debug output enabled */ if (!ACPI_IS_DEBUG_ENABLED (RequestedDebugLevel, ComponentId)) @@ -334,10 +336,21 @@ AcpiDebugPrint ( AcpiOsPrintf ("[%u] ", (UINT32) ThreadId); } - AcpiOsPrintf ("[%02ld] ", AcpiGbl_NestingLevel); -#endif + FillCount = 48 - AcpiGbl_NestingLevel - + strlen (AcpiUtTrimFunctionName (FunctionName)); + if (FillCount < 0) + { + FillCount = 0; + } + AcpiOsPrintf ("[%02ld] %*s", + AcpiGbl_NestingLevel, AcpiGbl_NestingLevel + 1, " "); + AcpiOsPrintf ("%s%*s: ", + AcpiUtTrimFunctionName (FunctionName), FillCount, " "); + +#else AcpiOsPrintf ("%-22.22s: ", AcpiUtTrimFunctionName (FunctionName)); +#endif va_start (args, Format); AcpiOsVprintf (Format, args); Modified: head/sys/contrib/dev/acpica/components/utilities/utnonansi.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/utnonansi.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/components/utilities/utnonansi.c Thu Dec 14 23:21:31 2017 (r326866) @@ -344,4 +344,17 @@ AcpiUtSafeStrncat ( strncat (Dest, Source, MaxTransferLength); return (FALSE); } + +void +AcpiUtSafeStrncpy ( + char *Dest, + char *Source, + ACPI_SIZE DestSize) +{ + /* Always terminate destination string */ + + strncpy (Dest, Source, DestSize); + Dest[DestSize - 1] = 0; +} + #endif Modified: head/sys/contrib/dev/acpica/components/utilities/utosi.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/utosi.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/components/utilities/utosi.c Thu Dec 14 23:21:31 2017 (r326866) @@ -214,6 +214,8 @@ static ACPI_INTERFACE_INFO AcpiDefaultSupportedInte {"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */ {"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */ {"Windows 2015", NULL, 0, ACPI_OSI_WIN_10}, /* Windows 10 - Added 03/2015 */ + {"Windows 2016", NULL, 0, ACPI_OSI_WIN_10_RS1}, /* Windows 10 version 1607 - Added 12/2017 */ + {"Windows 2017", NULL, 0, ACPI_OSI_WIN_10_RS2}, /* Windows 10 version 1703 - Added 12/2017 */ /* Feature Group Strings */ Modified: head/sys/contrib/dev/acpica/components/utilities/uttrack.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/uttrack.c Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/components/utilities/uttrack.c Thu Dec 14 23:21:31 2017 (r326866) @@ -557,8 +557,7 @@ AcpiUtTrackAllocation ( Allocation->Component = Component; Allocation->Line = Line; - strncpy (Allocation->Module, Module, ACPI_MAX_MODULE_NAME); - Allocation->Module[ACPI_MAX_MODULE_NAME-1] = 0; + AcpiUtSafeStrncpy (Allocation->Module, (char *) Module, ACPI_MAX_MODULE_NAME); if (!Element) { Modified: head/sys/contrib/dev/acpica/include/acexcep.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acexcep.h Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/include/acexcep.h Thu Dec 14 23:21:31 2017 (r326866) @@ -241,8 +241,9 @@ typedef struct acpi_exception_info #define AE_HEX_OVERFLOW EXCEP_ENV (0x0020) #define AE_DECIMAL_OVERFLOW EXCEP_ENV (0x0021) #define AE_OCTAL_OVERFLOW EXCEP_ENV (0x0022) +#define AE_END_OF_TABLE EXCEP_ENV (0x0023) -#define AE_CODE_ENV_MAX 0x0022 +#define AE_CODE_ENV_MAX 0x0023 /* @@ -379,7 +380,8 @@ static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionN EXCEP_TXT ("AE_NUMERIC_OVERFLOW", "Overflow during string-to-integer conversion"), EXCEP_TXT ("AE_HEX_OVERFLOW", "Overflow during ASCII hex-to-binary conversion"), EXCEP_TXT ("AE_DECIMAL_OVERFLOW", "Overflow during ASCII decimal-to-binary conversion"), - EXCEP_TXT ("AE_OCTAL_OVERFLOW", "Overflow during ASCII octal-to-binary conversion") + EXCEP_TXT ("AE_OCTAL_OVERFLOW", "Overflow during ASCII octal-to-binary conversion"), + EXCEP_TXT ("AE_END_OF_TABLE", "Reached the end of table") }; static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Pgm[] = Modified: head/sys/contrib/dev/acpica/include/acglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acglobal.h Thu Dec 14 22:57:22 2017 (r326865) +++ head/sys/contrib/dev/acpica/include/acglobal.h Thu Dec 14 23:21:31 2017 (r326866) @@ -155,7 +155,7 @@ /***************************************************************************** * - * Globals related to the ACPI tables + * Globals related to the incoming ACPI tables * ****************************************************************************/ @@ -197,7 +197,7 @@ ACPI_GLOBAL (UINT8, AcpiGbl_Intege /***************************************************************************** * - * Mutual exclusion within ACPICA subsystem + * Mutual exclusion within the ACPICA subsystem * ****************************************************************************/ @@ -278,7 +278,7 @@ ACPI_GLOBAL (UINT8, AcpiGbl_NextOw ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_NamespaceInitialized, FALSE); -/* Misc */ +/* Miscellaneous */ ACPI_GLOBAL (UINT32, AcpiGbl_OriginalMode); ACPI_GLOBAL (UINT32, AcpiGbl_NsLookupCount); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 14 23:47:45 2017 Return-Path: Delivered-To: svn-src-all@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 9EA32E940B5; Thu, 14 Dec 2017 23:47:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id 40E547F1C7; Thu, 14 Dec 2017 23:47:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r326866 - in head/sys/contrib/dev/acpica: . common compiler components/debugger components/disassembler components/dispatcher components/executer components/hardware components/namespac... From: Jung-uk Kim To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201712142321.vBENLVGb044369@repo.freebsd.org> Message-ID: Date: Thu, 14 Dec 2017 18:47:44 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <201712142321.vBENLVGb044369@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 23:47:45 -0000 On 12/14/2017 18:21, Jung-uk Kim wrote: > Author: jkim > Date: Thu Dec 14 23:21:31 2017 > New Revision: 326866 > URL: https://svnweb.freebsd.org/changeset/base/326866 > > Log: > MFC: r326864 > > Merge ACPICA 20171214. I meant "MFV", of course. Sorry. Jung-uk Kim From owner-svn-src-all@freebsd.org Thu Dec 14 23:50:59 2017 Return-Path: Delivered-To: svn-src-all@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 15A0CE941A6 for ; Thu, 14 Dec 2017 23:50:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (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 C447C7F399 for ; Thu, 14 Dec 2017 23:50:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x230.google.com with SMTP id 68so15062772ite.4 for ; Thu, 14 Dec 2017 15:50:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=C3XMVDvm7IzXF1l8s6pdJyO73IzwI52ccADeirpiYHM=; b=0Ec5VmK/sO+OH1n39H2T6MNzt9JoZA5gV2G1evZ38ga4CKB/eLQ8T+8/wPgAeS7IB9 EfDrzYHGOk3Iy0rkUu0cEpIbLrgynYxGGYF1rQkCifKXOUF34OXiwpzr3ZqzQ5fB2rTl Wsktb/aD6RLaBuCz91Q5crToJhPtyM9rkR5+6Zh8ruOjmw6wLE59cVwvDI+Ku+TFg2M8 4reeUH7NlOFA8PFtE7u2mhHUmMpwvTdYD4tA794i/tsNRKkaDAkZkbq0HmaLdObIVCxn BUJVVA05AqhsArSioWgs8qqObBajPDNUnJ1w03Iq0leaiK8K3jQzrj/SN0Ci5tee/zMC k23Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=C3XMVDvm7IzXF1l8s6pdJyO73IzwI52ccADeirpiYHM=; b=cZMtTy4FHLzCfy5tdXN63WOJjy+TiKwLAqec5rg7LNIBZcey3npBxTvi05V1CxNIaD NNoxh7VXyUAjIYalzo1FdwTXNLWXeWAMqiA4fYfEvnOR2eD64RbMfZo204Isp/CXt1x2 i9TJOl8UfNiTeFoH40DkQwt7OlYWiRBa87VcEPjaqhGgjG6CwliDiUgkI9x/hPpz4O2L m46/oH16Ncfzf36psbL4wnWgVv/i1VnpFGHJ06VpnutvB6JYPBCDkDKFnfTgT3NgNjVo G9915IB0mkDzy5+qJR+J9oQf9Z0rTLL/ovfCg8ic9e6HPmZ0CQ24jTpWy57xm3IAoN4i AQfA== X-Gm-Message-State: AKGB3mJ+nBkYKeqCuGaZuyWQvSQqRKRXNSfueEXaoxk9eyQgYggCt8w6 vmRbZLjmih+krBcERyRNtOhGYwaXZLbS0jKYihPW4w== X-Google-Smtp-Source: ACJfBotld1NUiewP9y+TpP/tfhH34w8ot20YIQytTj0XVIJYgTVlHsBYNcfod5cJCOWhE4Wi+Tj1BtxD2bKB81Exdw4= X-Received: by 10.36.133.135 with SMTP id r129mr6242969itd.69.1513295457856; Thu, 14 Dec 2017 15:50:57 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Thu, 14 Dec 2017 15:50:57 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <5A32AE29.9090300@grosbein.net> References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> <20171213180801.GA28514@FreeBSD.org> <5A316E7B.8030504@grosbein.net> <20171213182452.GA51526@FreeBSD.org> <5A318150.1000601@grosbein.net> <20171214133854.GB51526@FreeBSD.org> <5A328C81.4040501@grosbein.net> <5A32AE29.9090300@grosbein.net> From: Warner Losh Date: Thu, 14 Dec 2017 23:50:57 +0000 X-Google-Sender-Auth: SDW2J7A6EaHSxv0p63hEqdX2GeM Message-ID: Subject: Re: svn commit: r326809 - head/sys/dev/cardbus To: Eugene Grosbein Cc: Alexey Dokuchaev , "Rodney W. Grimes" , Warner Losh , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 23:50:59 -0000 On Thu, Dec 14, 2017 at 5:00 PM, Eugene Grosbein wrote: > 14.12.2017 23:27, Warner Losh wrote: > > > - zfsloader(8) failing to find any ZFS pool after zfsboot(8) > successfully > > loaded and started zfsload(8) from zpool (PR pending, need to > collect more info) > > > > > > GPT or MBR? > > MBR, no GELI used. when you update, you're updating both halves of the loader, right? > > > If you disable GELI support, it will work. If you roll back to r326583 > it will work. > > > > I'm tracking down the breakage related to my efforts to get the loader > in shape for a gentle transition to lua. It's either GELI related or size > related. > > I'll check it out next day, thanks! > It should be better soon... Warner From owner-svn-src-all@freebsd.org Fri Dec 15 03:05:16 2017 Return-Path: Delivered-To: svn-src-all@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 32367E98367; Fri, 15 Dec 2017 03:05:16 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF70163C92; Fri, 15 Dec 2017 03:05:15 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBF35Fmg036918; Fri, 15 Dec 2017 03:05:15 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBF35FFP036917; Fri, 15 Dec 2017 03:05:15 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201712150305.vBF35FFP036917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Fri, 15 Dec 2017 03:05:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326867 - head/sys/i386/acpica X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/sys/i386/acpica X-SVN-Commit-Revision: 326867 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 03:05:16 -0000 Author: bde Date: Fri Dec 15 03:05:14 2017 New Revision: 326867 URL: https://svnweb.freebsd.org/changeset/base/326867 Log: Minor cleanups found while fixing a bug involving double mapping of low memory: Load the kernel eflags less magically, as in locore. The magic increased when I removed eflags from the pcb in r305899. Remove a jump to low memory that became garbage when the i386 version was mostly replaced by the amd64 version in r235622. The amd64 version is very similar. It still loads the flags magically, but is not missing comments about using the special page table. Reviewed by: kib Modified: head/sys/i386/acpica/acpi_wakecode.S Modified: head/sys/i386/acpica/acpi_wakecode.S ============================================================================== --- head/sys/i386/acpica/acpi_wakecode.S Thu Dec 14 23:21:31 2017 (r326866) +++ head/sys/i386/acpica/acpi_wakecode.S Fri Dec 15 03:05:14 2017 (r326867) @@ -50,17 +50,19 @@ .code16 wakeup_start: /* - * Set up segment registers for real mode, a small stack for - * any calls we make, and clear any flags. + * Set up segment registers for real mode and a small stack for + * any calls we make. Set up full 32-bit bootstrap kernel flags + * since resumectx() doesn't restore flags. PSL_KERNEL gives + * bootstrap kernel flags (with interrupts disabled), not normal + * kernel flags. */ cli /* make sure no interrupts */ mov %cs, %ax /* copy %cs to %ds. Remember these */ mov %ax, %ds /* are offsets rather than selectors */ mov %ax, %ss movw $PAGE_SIZE, %sp - xorw %ax, %ax - pushw %ax - popfw + pushl $PSL_KERNEL + popfl /* To debug resume hangs, beep the speaker if the user requested. */ testb $~0, resume_beep - wakeup_start @@ -156,8 +158,6 @@ wakeup_32: orl $CR0_PG, %eax mov %eax, %cr0 - jmp 1f -1: /* Jump to return address. */ jmp *%edx From owner-svn-src-all@freebsd.org Fri Dec 15 03:36:49 2017 Return-Path: Delivered-To: svn-src-all@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 44995E98EF2; Fri, 15 Dec 2017 03:36:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E39F64C23; Fri, 15 Dec 2017 03:36:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBF3am8h049416; Fri, 15 Dec 2017 03:36:48 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBF3amcS049415; Fri, 15 Dec 2017 03:36:48 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712150336.vBF3amcS049415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 15 Dec 2017 03:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326868 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 326868 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 03:36:49 -0000 Author: eadler Date: Fri Dec 15 03:36:48 2017 New Revision: 326868 URL: https://svnweb.freebsd.org/changeset/base/326868 Log: bsd-family-tree: Add NetBSD 7.0.2 Pulled directly from NetBSD Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Fri Dec 15 03:05:14 2017 (r326867) +++ head/share/misc/bsd-family-tree Fri Dec 15 03:36:48 2017 (r326868) @@ -339,28 +339,29 @@ FreeBSD 5.2 | | | | | | | | DragonFly 4.2.0 | FreeBSD | | | | | 10.2 | | | | - | | macOS NetBSD 7.0 | | - | | 10.11 | OpenBSD 5.8 | - | | | | | DragonFly 4.4.1 - | FreeBSD | | OpenBSD 5.9 | - | 10.3 | | | | - | | | NetBSD 7.0.1 | | - | `------. | | | DragonFly 4.6.0 - | | | | | | - | | | | | | - *--FreeBSD | macOS | OpenBSD 6.0 | - | 11.0 | 10.12 | | | - | | | | NetBSD 7.1 | | - | | | macOS | | DragonFly 4.8.0 - | | | 10.13 | OpenBSD 6.1 | - | FreeBSD | | | | | - | 11.1 FreeBSD | | | | - | | 10.4 | | OpenBSD 6.2 | - | v | | | DragonFly 5.0.0 - | | | | | -FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current - | | | | | - v v v v v + | | macOS NetBSD 7.0 | | + | | 10.11 | | | OpenBSD 5.8 | + | | | | | `--. | DragonFly 4.4.1 + | FreeBSD | | | | OpenBSD 5.9 | + | 10.3 | | | | | | + | | | | | NetBSD 7.0.1 | | + | `------. | | | | | DragonFly 4.6.0 + | | | | | | | | + | | | | | | | | + *--FreeBSD | macOS | | | OpenBSD 6.0 | + | 11.0 | 10.12 | | NetBSD 7.0.2 | | + | | | | | | | | + | | | | | *- NetBSD 7.1 | | + | | | macOS | | DragonFly 4.8.0 + | | | 10.13 | OpenBSD 6.1 | + | FreeBSD | | | | | + | 11.1 FreeBSD | | | | + | | 10.4 | | OpenBSD 6.2 | + | v | | | DragonFly 5.0.0 + | | | | | +FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current + | | | | | + v v v v v Time ---------------- @@ -712,6 +713,7 @@ NetBSD 7.0.1 2016-05-22 [NBD] DragonFly 4.6.0 2016-08-02 [DFB] OpenBSD 6.0 2016-09-01 [OBD] macOS 10.12 2016-09-20 [APL] +NetBSD 7.0.2 2016-10-21 [NBD] FreeBSD 11.0 2016-10-10 [FBD] NetBSD 7.1 2017-03-11 [NBD] DragonFly 4.8.0 2017-03-27 [DFB] @@ -786,3 +788,4 @@ Copyright (c) 1997-2012 Wolfram Schneider Delivered-To: svn-src-all@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 E3E19E991ED; Fri, 15 Dec 2017 03:46:53 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B117B6515A; Fri, 15 Dec 2017 03:46:53 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBF3kqa1053596; Fri, 15 Dec 2017 03:46:52 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBF3kqGo053595; Fri, 15 Dec 2017 03:46:52 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712150346.vBF3kqGo053595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 15 Dec 2017 03:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326869 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 326869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 03:46:54 -0000 Author: eadler Date: Fri Dec 15 03:46:52 2017 New Revision: 326869 URL: https://svnweb.freebsd.org/changeset/base/326869 Log: bsd-family-tree: add dfly 5.0.[12] Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Fri Dec 15 03:36:48 2017 (r326868) +++ head/share/misc/bsd-family-tree Fri Dec 15 03:46:52 2017 (r326869) @@ -354,10 +354,14 @@ FreeBSD 5.2 | | | | | | | | *- NetBSD 7.1 | | | | | macOS | | DragonFly 4.8.0 | | | 10.13 | OpenBSD 6.1 | - | FreeBSD | | | | | + | FreeBSD | | | | DragonFly 5.0.0 | 11.1 FreeBSD | | | | - | | 10.4 | | OpenBSD 6.2 | - | v | | | DragonFly 5.0.0 + | | 10.4 | | OpenBSD 6.2 DragonFly 5.0.1 + | | | | | | + | | | | | DragonFly 5.0.2 + | | | | | | + | | | | | | + | v | | | | | | | | | FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -723,6 +727,8 @@ macOS 10.13 2017-09-25 [APL] FreeBSD 10.4 2017-10-03 [FBD] OpenBSD 6.2 2017-10-09 [OBD] DragonFly 5.0.0 2017-10-16 [DFB] +DragonFly 5.0.1 2017-11-06 [DFB] +DragonFly 5.0.2 2017-12-04 [DFB] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Fri Dec 15 04:11:21 2017 Return-Path: Delivered-To: svn-src-all@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 D5F12E99A25; Fri, 15 Dec 2017 04:11:21 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE99365BB1; Fri, 15 Dec 2017 04:11:21 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBF4BKIq065171; Fri, 15 Dec 2017 04:11:20 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBF4BK7Y065169; Fri, 15 Dec 2017 04:11:20 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201712150411.vBF4BK7Y065169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 15 Dec 2017 04:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326870 - in head/sys/powerpc: include powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys/powerpc: include powerpc X-SVN-Commit-Revision: 326870 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 04:11:21 -0000 Author: jhibbits Date: Fri Dec 15 04:11:20 2017 New Revision: 326870 URL: https://svnweb.freebsd.org/changeset/base/326870 Log: Handle the Facility Unavailable exception as a SIGILL Currently Facility Unavailable is absent and once an application tries to use or access a register from a feature disabled in the CPU it causes a kernel panic. A simple test-case is: int main() { asm volatile ("tbegin.;"); } which will use TM (Hardware Transactional Memory) feature which is not supported by the kernel and so will trigger the following kernel panic: ---- fatal user trap: exception = 0xf60 (unknown) srr0 = 0x10000890 srr1 = 0x800000000000f032 lr = 0x100004e4 curthread = 0x5f93000 pid = 1021, comm = htm panic: unknown trap cpuid = 40 KDB: stack backtrace: Uptime: 3m18s Dumping 10 MB (3 chunks) chunk 0: 11MB (2648 pages) ... ok chunk 1: 1MB (24 pages) ... ok chunk 2: 1MB (2 pages)panic: IOMMU mapping error: -4 cpuid = 40 Uptime: 3m18s ---- Since Hardware Transactional Memory is not yet supported by FreeBSD, treat this as an illegal instruction. PR: 224350 Submitted by: Gustavo Romero MFC after: 2 weeks Modified: head/sys/powerpc/include/trap.h head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/include/trap.h ============================================================================== --- head/sys/powerpc/include/trap.h Fri Dec 15 03:46:52 2017 (r326869) +++ head/sys/powerpc/include/trap.h Fri Dec 15 04:11:20 2017 (r326870) @@ -80,6 +80,9 @@ #define EXC_HEA 0x0e40 /* Hypervisor Emulation Assistance */ #define EXC_VSX 0x0f40 /* VSX Unavailable */ +/* Power ISA 2.07+: */ +#define EXC_FAC 0x0f60 /* Facility Unavailable */ + /* The following are available on 4xx and 85xx */ #define EXC_CRIT 0x0100 /* Critical Input Interrupt */ #define EXC_PIT 0x1000 /* Programmable Interval Timer */ Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Fri Dec 15 03:46:52 2017 (r326869) +++ head/sys/powerpc/powerpc/trap.c Fri Dec 15 04:11:20 2017 (r326870) @@ -135,6 +135,7 @@ static struct powerpc_exception powerpc_exceptions[] = { EXC_PERF, "performance monitoring" }, { EXC_VEC, "altivec unavailable" }, { EXC_VSX, "vsx unavailable" }, + { EXC_FAC, "facility unavailable" }, { EXC_ITMISS, "instruction tlb miss" }, { EXC_DLMISS, "data load tlb miss" }, { EXC_DSMISS, "data store tlb miss" }, @@ -277,6 +278,11 @@ trap(struct trapframe *frame) save_fpu(td); td->td_pcb->pcb_flags |= PCB_VSX; enable_fpu(td); + break; + + case EXC_FAC: + sig = SIGILL; + ucode = ILL_ILLOPC; break; case EXC_VECAST_E: From owner-svn-src-all@freebsd.org Fri Dec 15 04:17:36 2017 Return-Path: Delivered-To: svn-src-all@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 29A80E99DF3; Fri, 15 Dec 2017 04:17:36 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (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 DED7F66109; Fri, 15 Dec 2017 04:17:35 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-it0-x22c.google.com with SMTP id t1so16456988ite.5; Thu, 14 Dec 2017 20:17:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=z2KipPkkOadTuXmtGsFWUnwcER1HIiulEh5AwnzZkuQ=; b=C6aHN9A+T2J0EMrl9WbG+w+M9jUZUJaT883lMVZKrRUU7A8CNx28kq1AFf/uYNWO13 Ru8VsRqXp1eBs8vmJFZkpbRyreE8k8vj1H0d12UXd9fuAbSgeUGDwvdnbxbx7d04K2ZL CgqoM5cB24c2a7mdXneJesVYT/lkAz5HIOMHgXkGzRBjBghoKHdk2GKSYs4xLnnKnGkb 3biEnT2IUY1YHod3URRKNjaYtHe/YHLX8y5RdVthoXF89Df6fN2Gi5ysMS4LJOvmXAse xf32jDWH9WoLd9E78NO8IEpBuj49g5Jov8DrZ1H2PKBPlVC7qPPjXfoUlkCVwUxpLjF/ WmrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=z2KipPkkOadTuXmtGsFWUnwcER1HIiulEh5AwnzZkuQ=; b=fCPvgsjF0AtC9extU1JXCu4W05HsJ5AIjGF4K23mnauN8QI0cSRzxQuvjpTodrq24D 5AD33oKTD8HW+PgpoL8xnAnUPqcC69SxlOiKriKblTDPs/Rp0Z4y8IQinzPKzlXBNjVb WvTg1FPavP/KyPVYKDjJzRac1T2UyZwCxMRPg2mLF52jurMGKGlVGAYlnr2Q4y3Sq75S Vh1xle0bAkMcbfOm9lLT1+6iqJpzt6jcRAnYG/fXFNBQuEyT06JktPGxHjfKscu5JyOm detcUtelMh3Bo+E3Ogt9IGzrrApBximtzUPoFqf589D8/25J+9kz/ez6DJAlQcwnkVZV iTcA== X-Gm-Message-State: AKGB3mKHGCIhREs4HJm9MG8Dx3NlYBw/kFlcV9+WU3AOqqokJ24yw06S jwC/66MiUJ4I1lYRmFUHbjm06NYguBuiNZmwMqU= X-Google-Smtp-Source: ACJfBotTde7ZcYREpiYemlHnaqm2Z0LopUA14INNUPsEI52tXD0WevWltZowHAB4Fj1LwZP3hmslLgHWc5mCl83eWVs= X-Received: by 10.36.125.129 with SMTP id b123mr6471478itc.142.1513311454910; Thu, 14 Dec 2017 20:17:34 -0800 (PST) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.79.78.207 with HTTP; Thu, 14 Dec 2017 20:17:34 -0800 (PST) In-Reply-To: <201712150411.vBF4BK7Y065169@repo.freebsd.org> References: <201712150411.vBF4BK7Y065169@repo.freebsd.org> From: Justin Hibbits Date: Thu, 14 Dec 2017 22:17:34 -0600 X-Google-Sender-Auth: 3x_29yObMW1LjTepOgbDdp9WJPc Message-ID: Subject: Re: svn commit: r326870 - in head/sys/powerpc: include powerpc To: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 04:17:36 -0000 On Thu, Dec 14, 2017 at 10:11 PM, Justin Hibbits wrote: > Author: jhibbits > Date: Fri Dec 15 04:11:20 2017 > New Revision: 326870 > URL: https://svnweb.freebsd.org/changeset/base/326870 > > Log: > Handle the Facility Unavailable exception as a SIGILL > > Currently Facility Unavailable is absent and once an application > tries to use or access a register from a feature disabled in the > CPU it causes a kernel panic. > > A simple test-case is: > > int main() { asm volatile ("tbegin.;"); } > > which will use TM (Hardware Transactional Memory) feature which > is not supported by the kernel and so will trigger the following > kernel panic: > > ---- > > fatal user trap: > > exception = 0xf60 (unknown) > srr0 = 0x10000890 > srr1 = 0x800000000000f032 > lr = 0x100004e4 > curthread = 0x5f93000 > pid = 1021, comm = htm > > panic: unknown trap > cpuid = 40 > KDB: stack backtrace: > Uptime: 3m18s > Dumping 10 MB (3 chunks) > chunk 0: 11MB (2648 pages) ... ok > chunk 1: 1MB (24 pages) ... ok > chunk 2: 1MB (2 pages)panic: IOMMU mapping error: -4 > > cpuid = 40 > Uptime: 3m18s > > ---- > > Since Hardware Transactional Memory is not yet supported by FreeBSD, treat > this as an illegal instruction. > > PR: 224350 > Submitted by: Gustavo Romero ... and of course I can't read... missed part of the email address (br.ibm.com) From owner-svn-src-all@freebsd.org Fri Dec 15 04:51:49 2017 Return-Path: Delivered-To: svn-src-all@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 9B3A0E9AA1F; Fri, 15 Dec 2017 04:51:49 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7449F67094; Fri, 15 Dec 2017 04:51:49 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBF4pmMq080269; Fri, 15 Dec 2017 04:51:48 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBF4pl8D080259; Fri, 15 Dec 2017 04:51:47 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201712150451.vBF4pl8D080259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Fri, 15 Dec 2017 04:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326871 - in head/sys/dev: bhnd bhnd/bcma bhnd/bhndb bhnd/cores/pmu bhnd/nvram bhnd/siba bwn X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: in head/sys/dev: bhnd bhnd/bcma bhnd/bhndb bhnd/cores/pmu bhnd/nvram bhnd/siba bwn X-SVN-Commit-Revision: 326871 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 04:51:49 -0000 Author: landonf Date: Fri Dec 15 04:51:47 2017 New Revision: 326871 URL: https://svnweb.freebsd.org/changeset/base/326871 Log: bhnd(4)/bwn(4): Fix a number of small issues reported by Coverity. - Fix reference of uninitialized error value in bhndb_generic_resume() if the dynamic window count is 0. - Fix incorrect bhnd_pmu(4) UPTME_MASK and PLL0_PC2_WILD_INT_MASK constants. - Variable definitions referenced by our generated SPROM layouts will never be NULL, but add explicit asserts to make that clear. - Add missing variable initialization in bhnd_nvram_sprom_ident(). - Fix leak of driver array in bhnd_erom_probe_driver_classes(). - Fix zero-length memset() in bhndb_pci_eio_init(). - Fix an off-by-one error and potential invalid OOBSEL bit shift operation in bcma_dinfo_init_intrs(). - Remove dead code in siba_suspend_hw(). - Fix duplicate call to bhnd_pmu_enable_regulator() in both the enable and disable code paths of bhnd_compat_cc_pmu_set_ldoparef(). Reported by: Coverity CIDs: 1355194, 1362020, 1362022, 1373114, 1366563, 1373115, 1381569, 1381579, 1383555, 1383566, 1383571 Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/bhnd/bcma/bcma_dmp.h head/sys/dev/bhnd/bcma/bcma_subr.c head/sys/dev/bhnd/bhnd_erom.c head/sys/dev/bhnd/bhndb/bhndb.c head/sys/dev/bhnd/bhndb/bhndb_pci.c head/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c head/sys/dev/bhnd/siba/siba.c head/sys/dev/bwn/if_bwn_siba_compat.c Modified: head/sys/dev/bhnd/bcma/bcma_dmp.h ============================================================================== --- head/sys/dev/bhnd/bcma/bcma_dmp.h Fri Dec 15 04:11:20 2017 (r326870) +++ head/sys/dev/bhnd/bcma/bcma_dmp.h Fri Dec 15 04:51:47 2017 (r326871) @@ -223,7 +223,7 @@ /* OOBSEL(IN|OUT) */ #define BCMA_DMP_OOBSEL_MASK 0xFF /**< OOB selector mask */ #define BCMA_DMP_OOBSEL_EN (1<<7) /**< OOB selector enable bit */ -#define BCMA_DMP_OOBSEL_SHIFT(_sel) ((_sel % BCMA_OOB_NUM_SEL) * 8) +#define BCMA_DMP_OOBSEL_SHIFT(_sel) ((_sel % 4) * 8) #define BCMA_DMP_OOBSEL_BUSLINE_MASK 0x7F /**< OOB selector bus line mask */ #define BCMA_DMP_OOBSEL_BUSLINE_SHIFT 0 Modified: head/sys/dev/bhnd/bcma/bcma_subr.c ============================================================================== --- head/sys/dev/bhnd/bcma/bcma_subr.c Fri Dec 15 04:11:20 2017 (r326870) +++ head/sys/dev/bhnd/bcma/bcma_subr.c Fri Dec 15 04:51:47 2017 (r326871) @@ -282,7 +282,7 @@ bcma_dinfo_init_intrs(device_t bus, device_t child, /* Fetch width of the OOB interrupt bank */ oobw = bhnd_bus_read_4(dinfo->res_agent, BCMA_DMP_OOB_OUTWIDTH(BCMA_OOB_BANK_INTR)); - if (oobw > BCMA_OOB_NUM_SEL) { + if (oobw >= BCMA_OOB_NUM_SEL) { device_printf(bus, "ignoring invalid OOBOUTWIDTH for core %u: " "%#x\n", BCMA_DINFO_COREIDX(dinfo), oobw); return (0); Modified: head/sys/dev/bhnd/bhnd_erom.c ============================================================================== --- head/sys/dev/bhnd/bhnd_erom.c Fri Dec 15 04:11:20 2017 (r326870) +++ head/sys/dev/bhnd/bhnd_erom.c Fri Dec 15 04:51:47 2017 (r326871) @@ -145,6 +145,7 @@ bhnd_erom_probe_driver_classes(devclass_t bus_devclass break; } + free(drivers, M_TEMP); return (erom_cls); } Modified: head/sys/dev/bhnd/bhndb/bhndb.c ============================================================================== --- head/sys/dev/bhnd/bhndb/bhndb.c Fri Dec 15 04:11:20 2017 (r326870) +++ head/sys/dev/bhnd/bhndb/bhndb.c Fri Dec 15 04:51:47 2017 (r326871) @@ -687,6 +687,7 @@ bhndb_generic_resume(device_t dev) /* Guarantee that all in-use dynamic register windows are mapped to * their previously configured target address. */ BHNDB_LOCK(sc); + error = 0; for (size_t i = 0; i < bus_res->dwa_count; i++) { dwa = &bus_res->dw_alloc[i]; Modified: head/sys/dev/bhnd/bhndb/bhndb_pci.c ============================================================================== --- head/sys/dev/bhnd/bhndb/bhndb_pci.c Fri Dec 15 04:11:20 2017 (r326870) +++ head/sys/dev/bhnd/bhndb/bhndb_pci.c Fri Dec 15 04:51:47 2017 (r326871) @@ -1297,7 +1297,7 @@ static int bhndb_pci_eio_init(struct bhndb_pci_eio *pio, device_t dev, device_t pci_dev, struct bhndb_host_resources *hr) { - memset(&pio->eio, sizeof(pio->eio), 0); + memset(&pio->eio, 0, sizeof(pio->eio)); pio->eio.map = bhndb_pci_eio_map; pio->eio.read = bhndb_pci_eio_read; pio->eio.fini = NULL; Modified: head/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h ============================================================================== --- head/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h Fri Dec 15 04:11:20 2017 (r326870) +++ head/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h Fri Dec 15 04:51:47 2017 (r326871) @@ -133,7 +133,7 @@ #define BHND_PMU_RES_TABLE_SEL 0x620 #define BHND_PMU_RES_DEP_MASK 0x624 #define BHND_PMU_RES_UPDN_TIMER 0x628 -#define BHND_PMU_RES_UPDN_UPTME_MASK 0xFF +#define BHND_PMU_RES_UPDN_UPTME_MASK 0xFF00 #define BHND_PMU_RES_UPDN_UPTME_SHIFT 8 #define BHND_PMU_RES_TIMER 0x62C #define BHND_PMU_CLKSTRETCH 0x630 @@ -217,7 +217,7 @@ /* Wildcard base, vco_calvar, vco_swc, vco_var_selref, vso_ical & vco_sel_avdd */ #define BHND_PMU0_PLL0_PLLCTL2 2 -#define BHND_PMU0_PLL0_PC2_WILD_INT_MASK 0xf +#define BHND_PMU0_PLL0_PC2_WILD_INT_MASK 0xf0 #define BHND_PMU0_PLL0_PC2_WILD_INT_SHIFT 4 /* pllcontrol registers */ Modified: head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c ============================================================================== --- head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c Fri Dec 15 04:11:20 2017 (r326870) +++ head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c Fri Dec 15 04:51:47 2017 (r326871) @@ -190,6 +190,7 @@ bhnd_nvram_sprom_ident(struct bhnd_nvram_io *io, bool have_magic; layout = &bhnd_sprom_layouts[i]; + crc_valid = true; have_magic = true; if ((layout->flags & SPROM_LAYOUT_MAGIC_NONE)) @@ -831,6 +832,7 @@ bhnd_nvram_sprom_next(struct bhnd_nvram_data *nv, void /* Update cookiep and fetch variable definition */ *cookiep = entry; var = SPROM_COOKIE_TO_NVRAM_VAR(*cookiep); + BHND_NV_ASSERT(var != NULL, ("invalid cookiep %p", cookiep)); /* We might need to parse the variable's value to determine * whether it should be treated as unset */ @@ -1439,6 +1441,7 @@ bhnd_nvram_sprom_filter_unsetvar(struct bhnd_nvram_dat return (ENOENT); var = bhnd_nvram_get_vardefn(entry->vid); + BHND_NV_ASSERT(var != NULL, ("missing variable definition")); /* Variable must be capable of representing a NULL/deleted value. * Modified: head/sys/dev/bhnd/siba/siba.c ============================================================================== --- head/sys/dev/bhnd/siba/siba.c Fri Dec 15 04:11:20 2017 (r326870) +++ head/sys/dev/bhnd/siba/siba.c Fri Dec 15 04:51:47 2017 (r326871) @@ -865,8 +865,6 @@ siba_suspend_hw(device_t dev, device_t child, uint16_t siba_write_target_state(child, dinfo, SIBA_CFG0_TMSTATELOW, ts_low, ts_mask); - if (error) - return (error); /* Give RESET ample time */ DELAY(10); Modified: head/sys/dev/bwn/if_bwn_siba_compat.c ============================================================================== --- head/sys/dev/bwn/if_bwn_siba_compat.c Fri Dec 15 04:11:20 2017 (r326870) +++ head/sys/dev/bwn/if_bwn_siba_compat.c Fri Dec 15 04:51:47 2017 (r326871) @@ -1984,7 +1984,7 @@ bhnd_compat_cc_pmu_set_ldoparef(device_t dev, uint8_t error = bhnd_pmu_enable_regulator(ctx->pmu_dev, BHND_REGULATOR_PAREF_LDO); } else { - error = bhnd_pmu_enable_regulator(ctx->pmu_dev, + error = bhnd_pmu_disable_regulator(ctx->pmu_dev, BHND_REGULATOR_PAREF_LDO); } From owner-svn-src-all@freebsd.org Fri Dec 15 06:02:32 2017 Return-Path: Delivered-To: svn-src-all@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 E9520E9C407; Fri, 15 Dec 2017 06:02:32 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B84C68E2C; Fri, 15 Dec 2017 06:02:31 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBF62GgM043763 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Dec 2017 07:02:17 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: imp@bsdimp.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vBF6257J032013 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 15 Dec 2017 13:02:05 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326809 - head/sys/dev/cardbus To: Warner Losh References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> <20171213180801.GA28514@FreeBSD.org> <5A316E7B.8030504@grosbein.net> <20171213182452.GA51526@FreeBSD.org> <5A318150.1000601@grosbein.net> <20171214133854.GB51526@FreeBSD.org> <5A328C81.4040501@grosbein.net> <5A32AE29.9090300@grosbein.net> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers From: Eugene Grosbein Message-ID: <5A33655A.8030502@grosbein.net> Date: Fri, 15 Dec 2017 13:02:02 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 06:02:33 -0000 15.12.2017 6:50, Warner Losh wrote: > > > On Thu, Dec 14, 2017 at 5:00 PM, Eugene Grosbein > wrote: > > 14.12.2017 23:27, Warner Losh wrote: > > > - zfsloader(8) failing to find any ZFS pool after zfsboot(8) successfully > > loaded and started zfsload(8) from zpool (PR pending, need to collect more info) > > > > > > GPT or MBR? > > MBR, no GELI used. > when you update, you're updating both halves of the loader, right? I do not get it, what are "halves of the loader"? I know zfsboot should be installed in parts but it finds boot pool just fine and I do not update it. As for zfsloader, I install it with to /boot/zfsloader with simple "make install" command. From owner-svn-src-all@freebsd.org Fri Dec 15 06:05:17 2017 Return-Path: Delivered-To: svn-src-all@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 6CCAAE9C4DD; Fri, 15 Dec 2017 06:05:17 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4687868FC4; Fri, 15 Dec 2017 06:05:17 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBF65GYW011436; Fri, 15 Dec 2017 06:05:16 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBF65GYp011435; Fri, 15 Dec 2017 06:05:16 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201712150605.vBF65GYp011435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 15 Dec 2017 06:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326872 - head/usr.sbin/pw X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.sbin/pw X-SVN-Commit-Revision: 326872 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 06:05:17 -0000 Author: eugen Date: Fri Dec 15 06:05:16 2017 New Revision: 326872 URL: https://svnweb.freebsd.org/changeset/base/326872 Log: pw(8): r326738 broke expiration arithmetic in case of `-D' flag not supplied. Fix it and rename misnamed time_t variables `expire_days, password_days' (always holding absolute time) to `expire_time, password_time'. Add a comment for a case of overloading `cmdcnf->password_days' and `cmdcnf->expire_days' with absolute time. Reported by: markj Approved by: mav (mentor) MFC after: 1 week Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Fri Dec 15 04:51:47 2017 (r326871) +++ head/usr.sbin/pw/pw_user.c Fri Dec 15 06:05:16 2017 (r326872) @@ -1385,11 +1385,12 @@ pw_user_add(int argc, char **argv, char *arg1) pwd->pw_uid = pw_uidpolicy(cmdcnf, id); pwd->pw_gid = pw_gidpolicy(cnf, grname, pwd->pw_name, (gid_t) pwd->pw_uid, dryrun); - + + /* cmdcnf->password_days and cmdcnf->expire_days hold unixtime here */ if (cmdcnf->password_days > 0) - pwd->pw_change = now + cmdcnf->password_days * 86400L; + pwd->pw_change = cmdcnf->password_days; if (cmdcnf->expire_days > 0) - pwd->pw_expire = now + cmdcnf->expire_days * 86400L; + pwd->pw_expire = cmdcnf->expire_days; pwd->pw_dir = pw_homepolicy(cmdcnf, homedir, pwd->pw_name); pwd->pw_shell = pw_shellpolicy(cmdcnf); @@ -1523,9 +1524,9 @@ pw_user_mod(int argc, char **argv, char *arg1) bool quiet, createhome, pretty, dryrun, nis, edited; bool precrypted; mode_t homemode = 0; - time_t expire_days, password_days, now; + time_t expire_time, password_time, now; - expire_days = password_days = -1; + expire_time = password_time = -1; gecos = homedir = grname = name = newname = skel = shell =NULL; passwd = NULL; class = nispasswd = NULL; @@ -1561,10 +1562,10 @@ pw_user_mod(int argc, char **argv, char *arg1) homedir = optarg; break; case 'e': - expire_days = parse_date(now, optarg); + expire_time = parse_date(now, optarg); break; case 'p': - password_days = parse_date(now, optarg); + password_time = parse_date(now, optarg); break; case 'g': group_from_name_or_id(optarg); @@ -1699,13 +1700,13 @@ pw_user_mod(int argc, char **argv, char *arg1) } - if (password_days >= 0) { - pwd->pw_change = now + password_days * 86400L; + if (password_time >= 0 && pwd->pw_change != password_time) { + pwd->pw_change = password_time; edited = true; } - if (expire_days >= 0) { - pwd->pw_expire = now + expire_days * 86400L; + if (expire_time >= 0 && pwd->pw_expire != expire_time) { + pwd->pw_expire = expire_time; edited = true; } From owner-svn-src-all@freebsd.org Fri Dec 15 06:34:13 2017 Return-Path: Delivered-To: svn-src-all@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 28F0EE9D02C; Fri, 15 Dec 2017 06:34:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0041169D1E; Fri, 15 Dec 2017 06:34:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBF6YC8n023908; Fri, 15 Dec 2017 06:34:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBF6YCIw023907; Fri, 15 Dec 2017 06:34:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712150634.vBF6YCIw023907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Dec 2017 06:34:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326873 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 326873 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 06:34:13 -0000 Author: imp Date: Fri Dec 15 06:34:11 2017 New Revision: 326873 URL: https://svnweb.freebsd.org/changeset/base/326873 Log: Script that knows how to put boot blocks onto a device. Eventually, this will be installed into /usr/sbin, but for now it's just used for the boot loader regression script. It's still a bit green, and likely will get edge cases wrong still. It's also x86 centric at the moment, but will be enhanced shortly for u-boot, CHRP PowerPC and other methods. Sponsored by: Netflix Added: head/tools/boot/install-boot.sh (contents, props changed) Added: head/tools/boot/install-boot.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/boot/install-boot.sh Fri Dec 15 06:34:11 2017 (r326873) @@ -0,0 +1,128 @@ +#!/bin/sh + +# $FreeBSD$ + +# +# Installs/updates the necessary boot blocks for the desired boot environment +# +# Lightly tested.. Intended to be installed, but until it matures, it will just +# be a boot tool for regression testing. + +# insert code here to guess what you have -- yikes! + +die() { + echo $* + exit 1 +} + +find-part() { + dev=$1 + part=$2 + + gpart show $dev | tail +2 | awk '$4 == "'$part'" { print $3; }' +} + +boot_nogeli_gpt_zfs_legacy() { + dev=$1 + dst=$2 + + idx=$(find-part $dev "freebsd-boot") + if [ -z "$idx" ] ; then + die "No freebsd-boot partition found" + fi + gpart bootcode -b ${gpt0} -p ${gpt2} -i $idx $dev + exit 0 +} + +boot_nogeli_gpt_ufs_legacy() { + dev=$1 + dst=$2 + + idx=$(find-part $dev "freebsd-boot") + if [ -z "$idx" ] ; then + die "No freebsd-boot partition found" + fi + gpart bootcode -b ${gpt0} -p ${gpt2} -i $idx $dev + exit 0 +} + +boot_nogeli_mbr_zfs_legacy() { + dev=$1 + dst=$2 + + # search to find the BSD slice + s=$(findpart $dev "freebsd-zfs") + if [ -z "$s" ] ; then + die "No freebsd-zfs slice found" + fi + # search to find the freebsd-zfs partition within the slice + # Or just assume it is 'a' because it has to be since it fails otherwise + dd if=${dst}/boot/zfsboot of=/tmp/zfsboot1 count=1 + gpart bootcode -b /tmp/zfsboo1 ${dev}s${s} # Put boot1 into the start of part + sysctl kern.geom.debugflags=0x10 + dd if=${dst}/boot/zfsboot iseek=1 seek=1024 # Put boot2 into ZFS boot slot + sysctl kern.geom.debugflags=0x0 + + exit 0 +} + +boot_nogeli_mbr_ufs_legacy() { + dev=$1 + dst=$2 + + gpart bootcode -b ${mbr0} ${dev} + s=$(findpart $dev "freebsd-ufs") + if [ -z "$s" ] ; then + die "No freebsd-zfs slice found" + fi + gpart bootcode -p ${mbr2} ${dev}s${s} + exit 0 +} + +DESTDIR=/ + +# Note: we really don't support geli boot in this script yet. +geli=nogeli + +while getopts "b:d:f:g:o:s:" opt; do + case "$opt" in + b) + bios=${OPTARG} + ;; + d) + DESTDIR=${OPTARG} + ;; + f) + fs=${OPTARG} + ;; + g) + case ${OPTARG} in + [Yy][Ee][Ss]|geli) geli=geli ;; + *) geli=nogeli ;; + esac + ;; + o) + opts=${OPTARG} + ;; + s) + scheme=${OPTARG} + ;; + esac +done + +shift $((OPTIND-1)) +dev=$1 + +# For gpt, we need to install pmbr as the primary boot loader +# it knows about +gpt0=${DESTDIR}/boot/pmbr +gpt2=${DESTDIR}/boot/gptboot +gptzfs2=${DESTDIR}/boot/gptzfsboot + +# For MBR, we have lots of choices, but select boot0 +mbr0=${DESTDIR}/boot/boot0 +mbr2=${DESTDIR}/boot/boot + +# sanity check here + +eval boot_${geli}_${scheme}_${fs}_${bios} $dev $DESTDIR $opts || echo "Unsupported boot env: ${geli}-${scheme}-${fs}-${bios}" From owner-svn-src-all@freebsd.org Fri Dec 15 06:34:30 2017 Return-Path: Delivered-To: svn-src-all@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 006CEE9D09D; Fri, 15 Dec 2017 06:34:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BF2669EFE; Fri, 15 Dec 2017 06:34:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBF6YRZs023998; Fri, 15 Dec 2017 06:34:27 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBF6YRGc023997; Fri, 15 Dec 2017 06:34:27 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712150634.vBF6YRGc023997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Dec 2017 06:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326874 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 326874 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 06:34:30 -0000 Author: imp Date: Fri Dec 15 06:34:27 2017 New Revision: 326874 URL: https://svnweb.freebsd.org/changeset/base/326874 Log: Script to generate minimal boot images for each of the 24 supported boot images for x86. This will be enhanced to generate all the other images (u-boot, powerpc CHRP, etc). At the moment, it's only generating three of them. zfs+gpt+legacy works with qemu: qemu-system-x86_64 --drive file=${file},format=raw -serial telnet::4444,server but the ufs ones still have issues I'm tracking down. These images are the boot blocks, /boot/loader, a kernel, maybe a couple of modules, /sbin/init, /bin/sh, /libexec/ld-elf.so, libc.so, libedit and libncursesw. This is just enough to get to single user. At the moment, these come from the host system, but should come from OBJTOP. At the moment, this requires root to build since the zfs tools require it (and GELI will too when we add support for that). Sponsored by: Netflix Added: head/tools/boot/rootgen.sh (contents, props changed) Added: head/tools/boot/rootgen.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/boot/rootgen.sh Fri Dec 15 06:34:27 2017 (r326874) @@ -0,0 +1,213 @@ +#!/bin/sh + +# $FreeBSD$ + +# +# Builds all the bat-shit crazy combinations we support booting from, +# at least for amd64. It assume you have a ~sane kernel in /boot/kernel +# and copies that into the ~150MB root images we create (we create the du +# size of the kernel + 20MB +# +# Sad panda sez: this runs as root, but could be userland if someone +# creates userland geli and zfs tools. +# +# This assumes an external prograam install-boot.sh which will install +# the appropriate boot files in the appropriate locations. +# +# These images assume ada0 will be the root image. We should likely +# use labels, but we don't. +# +# ASsumes you've already rebuilt... maybe bad? Also maybe bad: the env +# vars should likely be conditionally set to allow better automation. +# + +cpsys() { + src=$1 + dst=$2 + + # Copy kernel + boot loader + (cd $src ; tar cf - .) | (cd $dst; tar xf -) +} + +mk_nogeli_gpt_ufs_legacy() { + src=$1 + img=$2 + + rm -f ${img} ${img}.p2 + makefs -t ffs -B little -s 200m ${img}.p2 ${src} + mkimg -s gpt -b ${src}/boot/pmbr \ + -p freebsd-boot:=${src}/boot/gptboot \ + -p freebsd-ufs:=${img}.p2 -o ${img} +} + +mk_nogeli_gpt_ufs_uefi() { + src=$1 + img=$2 + + rm -f ${img} ${img}.p2 + makefs -t ffs -B little -s 200m ${img}.p2 ${src} + mkimg -s gpt -b ${src}/boot/pmbr \ + -p freebsd-boot:=${src}/boot/gptboot \ + -p freebsd-ufs:=${img}.p2 -o ${img} +} + +mk_nogeli_gpt_ufs_both() { + src=$1 + img=$2 + + makefs -t ffs -B little -s 200m ${img}.p3 ${src} + # p1 is boot for uefi, p2 is boot for gpt, p3 is / + mkimg -b ${src}/boot/pmbr -s gpt \ + -p efi:=${src}/boot/boot1.efifat \ + -p freebsd-boot:=${src}/boot/gptboot \ + -p freebsd-ufs:=${img}.p3 \ + -o ${img} +} + +mk_nogeli_gpt_zfs_legacy() { + src=$1 + img=$2 + mntpt=$3 + geli=$4 + scheme=$5 + fs=$6 + bios=$7 + pool=nogeli-gpt-zfs-legacy + + rm -f ${img} + dd if=/dev/zero of=${img} count=1 seek=$((200 * 1024 * 1024 / 512)) + md=$(mdconfig -f ${img}) + gpart create -s gpt ${md} + gpart add -t freebsd-boot -s 400k -a 4k ${md} # <= ~540k + gpart add -t freebsd-zfs -l root $md + # install-boot will make this bootable + zpool create -O mountpoint=none -R ${mntpt} ${pool} ${md}p2 + zpool set bootfs=${pool} ${pool} + zfs create -o mountpoint=/ ${pool}/ROOT + # NB: The online guides go nuts customizing /var and other mountpoints here, no need + cpsys ${src} ${mntpt} + df + # need to make a couple of tweaks + cat > ${mntpt}/boot/loader.conf < ${DESTDIR}/boot.config +# XXX +cp /boot/device.hints ${DESTDIR}/boot/device.hints +# Assume we're already built +make install DESTDIR=${DESTDIR} MK_MAN=no MK_INSTALL_AS_USER=yes +# Copy init, /bin/sh and minimal libraries +mkdir -p ${DESTDIR}/sbin ${DESTDIR}/bin ${DESTDIR}/lib ${DESTDIR}/libexec +for f in /sbin/init /bin/sh $(ldd /bin/sh | awk 'NF == 4 { print $3; }') /libexec/ld-elf.so.1; do + cp $f ${DESTDIR}/$f +done +mkdir ${DESTDIR}/dev + +# OK. Let the games begin + +for geli in nogeli geli; do + for scheme in gpt mbr; do + for fs in ufs zfs; do + for bios in legacy uefi both; do + # Create sparse file and mount newly created filesystem(s) on it + img=${IMGDIR}/${geli}-${scheme}-${fs}-${bios}.img + echo "vvvvvvvvvvvvvvvvvvvvvv Creating $img vvvvvvvvvvvvvvvvvvvvvvv" + eval mk_${geli}_${scheme}_${fs}_${bios} ${DESTDIR} ${img} ${MNTPT} ${geli} ${scheme} ${fs} ${bios} + echo "^^^^^^^^^^^^^^^^^^^^^^ Creating $img ^^^^^^^^^^^^^^^^^^^^^^^" + done + done + done +done + +rmdir ${MNTPT} From owner-svn-src-all@freebsd.org Fri Dec 15 06:42:55 2017 Return-Path: Delivered-To: svn-src-all@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 7FF03E9D428 for ; Fri, 15 Dec 2017 06:42:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (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 3F2DE6A3F4 for ; Fri, 15 Dec 2017 06:42:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x236.google.com with SMTP id f143so16670410itb.0 for ; Thu, 14 Dec 2017 22:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=TnLid5fBjbYQEmXBJ9ZpaX5mnyuWoDf5mzbh3XFUdJ8=; b=DOxtuSYMK2o0epvghQkN6eKstmIyYIi4N29522fsD+G8jbSJx6xnCwg0lO+aQnhf0y lb3HFCK9uioGOFwkiIYM3/zG8FOaQjORtuE/sv6l/0mBELfHEnxzhhCyQOYW1emFyb5Z EQLh8ti++/GNyTjSTS4UiwnWrbjOfF6hPN9qB46hROQoDyJFRDVbtBv0jxSqkwdnEfU9 x0Z0Ss4PG266SluRYOYYURe/aNYumj9ILracgBMupTHtuEvrAYDd87YLus/5/RDCUw9t 4my29RHv96pRrWwdwzZChH4cQ8KPoNLxnYqqnQ0lcuyOhSBMCX1oxy5J84gDMSr9G2ME 87Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=TnLid5fBjbYQEmXBJ9ZpaX5mnyuWoDf5mzbh3XFUdJ8=; b=KazLOw6JHiMZN9aOkJNgcqnMJxK4e+a0r+ZYspT1IqSWbbnt7qM48wjSRXEsCADfAu WcaPI83f1JoBk8sfKVrKoL8dq7GS1YTIolFLBdzyrlAtuGO651yBIh7U4W6un9pK5bei WMO3S0JGnQTtxafGsu3UwzClYAxqRRd7c5Jm4s4zpE8RvrbQMYaevBcaKrSEjo/oJvy3 iMtNmk83jOj7QBc4fZeC98H9nKtwA/2JgFXkYBFch/799CYvNqZCX1jnJOV7JSCIw8at DnhosGxQ4Mmkkn3Glv4DxJ7l6rF+19PvMRHx/UPqQwFG/vmIRMax1gvkdL0skDJv3yav bf+Q== X-Gm-Message-State: AKGB3mJyQsHjKDCpH7WVda65uTxIA+15kzSoevBX0JKqwz7ApVeBJ9iY BMxUlVH+/lwhXVDOM1VMCIsDIu/uAa8DC3I3WMz4hQ== X-Google-Smtp-Source: ACJfBovzE/+RZNO/NQJ4IKxEUCKcvYCz+y6gXKeIpQAJwjsPEgUzWUL6V6GwxfARh2JUToegBvEkQDMZ7gt3163/N60= X-Received: by 10.107.83.8 with SMTP id h8mr10251129iob.63.1513320174508; Thu, 14 Dec 2017 22:42:54 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Thu, 14 Dec 2017 22:42:53 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <5A33655A.8030502@grosbein.net> References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> <20171213180801.GA28514@FreeBSD.org> <5A316E7B.8030504@grosbein.net> <20171213182452.GA51526@FreeBSD.org> <5A318150.1000601@grosbein.net> <20171214133854.GB51526@FreeBSD.org> <5A328C81.4040501@grosbein.net> <5A32AE29.9090300@grosbein.net> <5A33655A.8030502@grosbein.net> From: Warner Losh Date: Thu, 14 Dec 2017 23:42:53 -0700 X-Google-Sender-Auth: XnRKbADyhdHQTBL-bmJtdSUCG0M Message-ID: Subject: Re: svn commit: r326809 - head/sys/dev/cardbus To: Eugene Grosbein Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 06:42:55 -0000 On Thu, Dec 14, 2017 at 11:02 PM, Eugene Grosbein wrote: > 15.12.2017 6:50, Warner Losh wrote: > > > > > > On Thu, Dec 14, 2017 at 5:00 PM, Eugene Grosbein > wrote: > > > > 14.12.2017 23:27, Warner Losh wrote: > > > > > - zfsloader(8) failing to find any ZFS pool after zfsboot(8) > successfully > > > loaded and started zfsload(8) from zpool (PR pending, need to > collect more info) > > > > > > > > > GPT or MBR? > > > > MBR, no GELI used. > > when you update, you're updating both halves of the loader, right? > > I do not get it, what are "halves of the loader"? > I know zfsboot should be installed in parts but it finds boot pool just > fine > and I do not update it. As for zfsloader, I install it with to > /boot/zfsloader > with simple "make install" command. So you are using the old zfsboot then? And if you didn't do something like: dd if=${dst}/boot/zfsboot of=/tmp/zfsboot1 count=1 gpart bootcode -b /tmp/zfsboo1 ${dev}s${s} sysctl kern.geom.debugflags=0x10 dd if=${dst}/boot/zfsboot iseek=1 seek=1024 of=/dev/${dev}s${s} sysctl kern.geom.debugflags=0x0 then you're using the new zfsloader with old zfsboot blocks. Which should work just fine, but is apparently failing. Warner From owner-svn-src-all@freebsd.org Fri Dec 15 06:44:12 2017 Return-Path: Delivered-To: svn-src-all@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 D8923E9D4B4; Fri, 15 Dec 2017 06:44:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A34846A5A0; Fri, 15 Dec 2017 06:44:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBF6iBPD027993; Fri, 15 Dec 2017 06:44:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBF6iB9v027992; Fri, 15 Dec 2017 06:44:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712150644.vBF6iB9v027992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Dec 2017 06:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326875 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 326875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 06:44:12 -0000 Author: imp Date: Fri Dec 15 06:44:11 2017 New Revision: 326875 URL: https://svnweb.freebsd.org/changeset/base/326875 Log: Add missing of=/dev/${dev}s${s} when installing zfsboot. Modified: head/tools/boot/install-boot.sh Modified: head/tools/boot/install-boot.sh ============================================================================== --- head/tools/boot/install-boot.sh Fri Dec 15 06:34:27 2017 (r326874) +++ head/tools/boot/install-boot.sh Fri Dec 15 06:44:11 2017 (r326875) @@ -59,8 +59,8 @@ boot_nogeli_mbr_zfs_legacy() { # Or just assume it is 'a' because it has to be since it fails otherwise dd if=${dst}/boot/zfsboot of=/tmp/zfsboot1 count=1 gpart bootcode -b /tmp/zfsboo1 ${dev}s${s} # Put boot1 into the start of part - sysctl kern.geom.debugflags=0x10 - dd if=${dst}/boot/zfsboot iseek=1 seek=1024 # Put boot2 into ZFS boot slot + sysctl kern.geom.debugflags=0x10 # Put boot2 into ZFS boot slot + dd if=${dst}/boot/zfsboot of=/dev/${dev}s${s} iseek=1 seek=1024 sysctl kern.geom.debugflags=0x0 exit 0 From owner-svn-src-all@freebsd.org Fri Dec 15 12:30:37 2017 Return-Path: Delivered-To: svn-src-all@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 2206BE80166; Fri, 15 Dec 2017 12:30:37 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BE6C574139; Fri, 15 Dec 2017 12:30:35 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBFCUMut046917 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Dec 2017 13:30:23 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: imp@bsdimp.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBFCUBMB005282; Fri, 15 Dec 2017 19:30:11 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326809 - head/sys/dev/cardbus To: Warner Losh References: <201712131338.vBDDcHCM091865@pdx.rh.CN85.dnsmgr.net> <5A3167E1.2000201@grosbein.net> <20171213180801.GA28514@FreeBSD.org> <5A316E7B.8030504@grosbein.net> <20171213182452.GA51526@FreeBSD.org> <5A318150.1000601@grosbein.net> <20171214133854.GB51526@FreeBSD.org> <5A328C81.4040501@grosbein.net> <5A32AE29.9090300@grosbein.net> <5A33655A.8030502@grosbein.net> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <5A33C053.6000409@grosbein.net> Date: Fri, 15 Dec 2017 19:30:11 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_Q_PLUS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_Q_PLUS Date: is over 4 months after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 12:30:37 -0000 On 15.12.2017 13:42, Warner Losh wrote: > > > On Thu, Dec 14, 2017 at 11:02 PM, Eugene Grosbein > wrote: > > 15.12.2017 6:50, Warner Losh wrote: > > > > > > On Thu, Dec 14, 2017 at 5:00 PM, Eugene Grosbein >> wrote: > > > > 14.12.2017 23:27, Warner Losh wrote: > > > > > - zfsloader(8) failing to find any ZFS pool after zfsboot(8) successfully > > > loaded and started zfsload(8) from zpool (PR pending, need to collect more info) > > > > > > > > > GPT or MBR? > > > > MBR, no GELI used. > > when you update, you're updating both halves of the loader, right? > > I do not get it, what are "halves of the loader"? > I know zfsboot should be installed in parts but it finds boot pool just fine > and I do not update it. As for zfsloader, I install it with to /boot/zfsloader > with simple "make install" command. > > > So you are using the old zfsboot then? > > And if you didn't do something like: > > dd if=${dst}/boot/zfsboot of=/tmp/zfsboot1 count=1 > gpart bootcode -b /tmp/zfsboo1 ${dev}s${s} > sysctl kern.geom.debugflags=0x10 > dd if=${dst}/boot/zfsboot iseek=1 seek=1024 of=/dev/${dev}s${s} > sysctl kern.geom.debugflags=0x0 > > then you're using the new zfsloader with old zfsboot blocks. Which should work just fine, but is apparently failing. In fact, I'v just started using ZFS recently and I've not updates my working tree since then, so zfsboot and zfsloader were built using same sources, amd64 stable/11 r322531. My previous debugging (using added printf's) shows that's zio_checksum_verify() from src/sys/cddl/boot/zfs/zfssubr.c always fails when zfsloader reads ZFS. Meantime, zpool scrub finds no errors on this pool when I boot using USB flash/UFS. I've just added LOADER_NO_GELI_SUPPORT= to my /etc/src.conf, reverted all local (debugging) changes to /usr/src/sys/boot, did "make clean all install" there and tried to boot using rebuilt zfsloader again (it it 44KB less now than zfsloader.old). No changes, still fails same way. And I do not have r326583. From owner-svn-src-all@freebsd.org Fri Dec 15 12:37:33 2017 Return-Path: Delivered-To: svn-src-all@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 E521FE80476; Fri, 15 Dec 2017 12:37:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF7A574641; Fri, 15 Dec 2017 12:37:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFCbWcZ073255; Fri, 15 Dec 2017 12:37:32 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFCbWnl073250; Fri, 15 Dec 2017 12:37:32 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201712151237.vBFCbWnl073250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 15 Dec 2017 12:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326876 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 326876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 12:37:34 -0000 Author: ae Date: Fri Dec 15 12:37:32 2017 New Revision: 326876 URL: https://svnweb.freebsd.org/changeset/base/326876 Log: Follow the RFC6980 and silently ignore following IPv6 NDP messages that had the IPv6 fragmentation header: o Neighbor Solicitation o Neighbor Advertisement o Router Solicitation o Router Advertisement o Redirect Introduce M_FRAGMENTED mbuf flag, and set it after IPv6 fragment reassembly is completed. Then check the presence of this flag in correspondig ND6 handling routines. PR: 224247 MFC after: 2 weeks Modified: head/sys/netinet6/frag6.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6.h head/sys/netinet6/nd6_nbr.c head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/frag6.c ============================================================================== --- head/sys/netinet6/frag6.c Fri Dec 15 06:44:11 2017 (r326875) +++ head/sys/netinet6/frag6.c Fri Dec 15 12:37:32 2017 (r326876) @@ -227,6 +227,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) IP6STAT_INC(ip6s_reassembled); in6_ifstat_inc(dstifp, ifs6_reass_ok); *offp = offset; + m->m_flags |= M_FRAGMENTED; return (ip6f->ip6f_nxt); } @@ -827,5 +828,6 @@ ip6_deletefraghdr(struct mbuf *m, int offset, int wait m_cat(m, t); } + m->m_flags |= M_FRAGMENTED; return (0); } Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Fri Dec 15 06:44:11 2017 (r326875) +++ head/sys/netinet6/icmp6.c Fri Dec 15 12:37:32 2017 (r326876) @@ -2252,6 +2252,10 @@ icmp6_redirect_input(struct mbuf *m, int off) if (!V_icmp6_rediraccept) goto freeit; + /* RFC 6980: Nodes MUST silently ignore fragments */ + if(m->m_flags & M_FRAGMENTED) + goto freeit; + #ifndef PULLDOWN_TEST IP6_EXTHDR_CHECK(m, off, icmp6len,); nd_rd = (struct nd_redirect *)((caddr_t)ip6 + off); Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Fri Dec 15 06:44:11 2017 (r326875) +++ head/sys/netinet6/in6.h Fri Dec 15 12:37:32 2017 (r326876) @@ -658,6 +658,7 @@ struct ip6_mtuinfo { #define M_LOOP M_PROTO6 #define M_AUTHIPDGM M_PROTO7 #define M_RTALERT_MLD M_PROTO8 +#define M_FRAGMENTED M_PROTO9 /* contained fragment header */ #ifdef _KERNEL struct cmsghdr; Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Fri Dec 15 06:44:11 2017 (r326875) +++ head/sys/netinet6/nd6_nbr.c Fri Dec 15 12:37:32 2017 (r326876) @@ -137,6 +137,10 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) struct sockaddr_dl proxydl; char ip6bufs[INET6_ADDRSTRLEN], ip6bufd[INET6_ADDRSTRLEN]; + /* RFC 6980: Nodes MUST silently ignore fragments */ + if(m->m_flags & M_FRAGMENTED) + goto freeit; + rflag = (V_ip6_forwarding) ? ND_NA_FLAG_ROUTER : 0; if (ND_IFINFO(ifp)->flags & ND6_IFF_ACCEPT_RTADV && V_ip6_norbit_raif) rflag = 0; @@ -630,6 +634,10 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) size_t linkhdrsize; int lladdr_off; char ip6bufs[INET6_ADDRSTRLEN], ip6bufd[INET6_ADDRSTRLEN]; + + /* RFC 6980: Nodes MUST silently ignore fragments */ + if(m->m_flags & M_FRAGMENTED) + goto freeit; if (ip6->ip6_hlim != 255) { nd6log((LOG_ERR, Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Fri Dec 15 06:44:11 2017 (r326875) +++ head/sys/netinet6/nd6_rtr.c Fri Dec 15 12:37:32 2017 (r326876) @@ -139,6 +139,10 @@ nd6_rs_input(struct mbuf *m, int off, int icmp6len) if (!V_ip6_forwarding || ND_IFINFO(ifp)->flags & ND6_IFF_ACCEPT_RTADV) goto freeit; + /* RFC 6980: Nodes MUST silently ignore fragments */ + if(m->m_flags & M_FRAGMENTED) + goto freeit; + /* Sanity checks */ if (ip6->ip6_hlim != 255) { nd6log((LOG_ERR, @@ -227,6 +231,10 @@ nd6_ra_input(struct mbuf *m, int off, int icmp6len) * ND6_IFF_ACCEPT_RTADV is on the receiving interface. */ if (!(ndi->flags & ND6_IFF_ACCEPT_RTADV)) + goto freeit; + + /* RFC 6980: Nodes MUST silently ignore fragments */ + if(m->m_flags & M_FRAGMENTED) goto freeit; if (ip6->ip6_hlim != 255) { From owner-svn-src-all@freebsd.org Fri Dec 15 17:10:52 2017 Return-Path: Delivered-To: svn-src-all@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 7366CE86AA0; Fri, 15 Dec 2017 17:10:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 402DC7D62D; Fri, 15 Dec 2017 17:10:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFHApt6086156; Fri, 15 Dec 2017 17:10:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFHApAi086155; Fri, 15 Dec 2017 17:10:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712151710.vBFHApAi086155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Dec 2017 17:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326877 - head/tests/sys/geom/class/nop X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/tests/sys/geom/class/nop X-SVN-Commit-Revision: 326877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 17:10:52 -0000 Author: markj Date: Fri Dec 15 17:10:51 2017 New Revision: 326877 URL: https://svnweb.freebsd.org/changeset/base/326877 Log: Skip gnop tests if the corresponding kernel module isn't available. Reviewed by: asomers MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13500 Modified: head/tests/sys/geom/class/nop/nop_test.sh Modified: head/tests/sys/geom/class/nop/nop_test.sh ============================================================================== --- head/tests/sys/geom/class/nop/nop_test.sh Fri Dec 15 12:37:32 2017 (r326876) +++ head/tests/sys/geom/class/nop/nop_test.sh Fri Dec 15 17:10:51 2017 (r326877) @@ -36,6 +36,7 @@ diskinfo_head() } diskinfo_body() { + load_gnop us=$(alloc_md) atf_check gnop create /dev/${us} md_secsize=$(diskinfo ${us} | cut -wf 2) @@ -62,6 +63,7 @@ io_head() } io_body() { + load_gnop us=$(alloc_md) atf_check gnop create /dev/${us} @@ -87,6 +89,7 @@ size_head() } size_body() { + load_gnop us=$(alloc_md) for mediasize in 65536 524288 1048576; do atf_check gnop create -s ${mediasize} /dev/${us} @@ -111,6 +114,7 @@ stripesize_head() } stripesize_body() { + load_gnop us=$(alloc_md) for ss in 512 1024 2048 4096 8192; do for sofs in `seq 0 512 ${ss}`; do @@ -163,4 +167,11 @@ common_cleanup() rm ${PLAINFILES} fi true +} + +load_gnop() +{ + if ! kldstat -q -m g_nop; then + geom nop load || atf_skip "could not load module for geom nop" + fi } From owner-svn-src-all@freebsd.org Fri Dec 15 18:07:28 2017 Return-Path: Delivered-To: svn-src-all@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 6B48FE87F9C; Fri, 15 Dec 2017 18:07:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f41.google.com (mail-it0-f41.google.com [209.85.214.41]) (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 BFD9A7F710; Fri, 15 Dec 2017 18:07:27 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f41.google.com with SMTP id x28so21584226ita.0; Fri, 15 Dec 2017 10:07:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=jcy9THFsVv5A7Z2svJIvoBmvvnY3m4Z//1rBatQaT5Y=; b=gvkuAdqg/u5dJod8/HxiIbdxgaykFPc9Y8RZAd3/J5SL8nVDy7zcS0C59gDD+1LNXk 7dd9YEezpOly+utQJZLL8Vo/tvryeboFyb3Lxm6EMiLSw9RlwPqYR1QRWA78jFuZO3zk SFwCeA0s2M31GwBZyxNnmWCXVS03pIMHCrMXXeGfw1Z47CtuahAT7Vmx+51fm2Rc0wN9 XsUAVJmA0L8N58yiEPStqCOSvvY8KA//3pqt2nTBnNMt3qI/8yeqKXL0YVoXVUEpAwAJ WzhFtXYMEU632p9VKZdnq6hz1Qor8AuB7GfDko5itZdWhZ5TFjYdC3b/04cM3n7zuo3w maQw== X-Gm-Message-State: AKGB3mJlLXomlZG2FCuoGEKpNAJRccDK8S59SYyOvIrFbh3r4b9SlGpG qqfRode+FyKE+zojthQJR7O+ME8A X-Google-Smtp-Source: ACJfBosa3W5Wz6YpW36Iohinwkm01kdHK74OqIRFFubpJZ0BFwCG+VQ3bLTfQYD1qXvOYQYCjW1GmA== X-Received: by 10.36.15.9 with SMTP id 9mr8898832ito.90.1513359518980; Fri, 15 Dec 2017 09:38:38 -0800 (PST) Received: from mail-it0-f47.google.com (mail-it0-f47.google.com. [209.85.214.47]) by smtp.gmail.com with ESMTPSA id i82sm3808872iod.6.2017.12.15.09.38.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 09:38:38 -0800 (PST) Received: by mail-it0-f47.google.com with SMTP id b5so21330378itc.3; Fri, 15 Dec 2017 09:38:38 -0800 (PST) X-Received: by 10.107.156.149 with SMTP id f143mr6741796ioe.226.1513359518444; Fri, 15 Dec 2017 09:38:38 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Fri, 15 Dec 2017 09:38:37 -0800 (PST) In-Reply-To: <201712091445.vB9EjTg6072366@pdx.rh.CN85.dnsmgr.net> References: <201712090821.vB98LTx4009866@repo.freebsd.org> <201712091445.vB9EjTg6072366@pdx.rh.CN85.dnsmgr.net> From: Conrad Meyer Date: Fri, 15 Dec 2017 09:38:37 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326729 - head To: Eitan Adler Cc: "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 18:07:28 -0000 Ping. This still hasn't happened despite repeated request. Someone else can do it if you want (or put another way, someone else may get sick of waiting and do it if you don't). Conrad On Sat, Dec 9, 2017 at 6:45 AM, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> Author: eadler >> Date: Sat Dec 9 08:21:29 2017 >> New Revision: 326729 >> URL: https://svnweb.freebsd.org/changeset/base/326729 >> >> Log: >> arc lint: Explain linting explain >> >> shell scripts in scripts don't need >> to be chmod +x to work. In fact most are not. >> Of the tests I found from a simple search: >> 65 are chmod +x >> 84 are chmod -x >> >> simply disable the check for test shell scripts. >> >> Modified: >> head/.arclint >> >> Modified: head/.arclint >> ============================================================================== >> --- head/.arclint Sat Dec 9 07:44:00 2017 (r326728) >> +++ head/.arclint Sat Dec 9 08:21:29 2017 (r326729) >> @@ -24,3 +24,4 @@ >> } >> } >> } >> + > > This is not how you revert and commit a correct log fix, the log yet again > does not match the commit. Please, revert this and revert the other and > apply the log with the diff so that things match correctly. > > > -- > Rod Grimes rgrimes@freebsd.org > From owner-svn-src-all@freebsd.org Fri Dec 15 18:09:25 2017 Return-Path: Delivered-To: svn-src-all@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 09B4CE88040; Fri, 15 Dec 2017 18:09:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C761E7F8B9; Fri, 15 Dec 2017 18:09:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFI9NpM011528; Fri, 15 Dec 2017 18:09:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFI9Np8011527; Fri, 15 Dec 2017 18:09:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712151809.vBFI9Np8011527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Dec 2017 18:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326878 - head/cddl/usr.sbin/dtrace/tests/tools X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/cddl/usr.sbin/dtrace/tests/tools X-SVN-Commit-Revision: 326878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 18:09:25 -0000 Author: markj Date: Fri Dec 15 18:09:23 2017 New Revision: 326878 URL: https://svnweb.freebsd.org/changeset/base/326878 Log: Mark uctf/err.user64mode.ksh as EXFAIL for now. MFC after: 1 week Modified: head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Modified: head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Fri Dec 15 17:10:51 2017 (r326877) +++ head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Fri Dec 15 18:09:23 2017 (r326878) @@ -166,6 +166,9 @@ exclude EXFAIL common/vars/tst.ucaller.ksh exclude EXFAIL common/scripting/tst.projid.ksh exclude EXFAIL common/scripting/tst.taskid.ksh +# Depends on tst.chasestrings.exe being ELF32. See r326181 and r326285. +exclude EXFAIL common/uctf/err.user64mode.ksh + # This test expects its test program to be installed without CTF data, but # the rest of the programs for this feature need CTF data. Not yet sure how # to build that. From owner-svn-src-all@freebsd.org Fri Dec 15 18:56:14 2017 Return-Path: Delivered-To: svn-src-all@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 48F46E89566; Fri, 15 Dec 2017 18:56:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C79313AF; Fri, 15 Dec 2017 18:56:13 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFIuDtQ032328; Fri, 15 Dec 2017 18:56:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFIuDNY032327; Fri, 15 Dec 2017 18:56:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712151856.vBFIuDNY032327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 15 Dec 2017 18:56:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326879 - head/contrib/llvm/tools/lld/ELF X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/llvm/tools/lld/ELF X-SVN-Commit-Revision: 326879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 18:56:14 -0000 Author: emaste Date: Fri Dec 15 18:56:12 2017 New Revision: 326879 URL: https://svnweb.freebsd.org/changeset/base/326879 Log: lld: Simplify a boolean expression by De Morgan's laws. Cherry-pick lld r315653 by Rui Ueyama: I don't really understand what exactly this expression means, but at least I can mechanically transform it. Obtained from: LLVM r315653 MFC after: 1 week Modified: head/contrib/llvm/tools/lld/ELF/Relocations.cpp Modified: head/contrib/llvm/tools/lld/ELF/Relocations.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/Relocations.cpp Fri Dec 15 18:09:23 2017 (r326878) +++ head/contrib/llvm/tools/lld/ELF/Relocations.cpp Fri Dec 15 18:56:12 2017 (r326879) @@ -790,7 +790,7 @@ static void addGotEntry(SymbolBody &Sym, bool Preempti DynType = Target->GotRel; } - bool Constant = !Preemptible && !(Config->Pic && !isAbsolute(Sym)); + bool Constant = !Preemptible && (!Config->Pic || isAbsolute(Sym)); if (!Constant) In::RelaDyn->addReloc( {DynType, InX::Got, Off, !Preemptible, &Sym, 0}); From owner-svn-src-all@freebsd.org Fri Dec 15 18:58:22 2017 Return-Path: Delivered-To: svn-src-all@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 9A984E89629; Fri, 15 Dec 2017 18:58:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 720B915EC; Fri, 15 Dec 2017 18:58:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFIwLZ1032480; Fri, 15 Dec 2017 18:58:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFIwLJ9032479; Fri, 15 Dec 2017 18:58:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712151858.vBFIwLJ9032479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 15 Dec 2017 18:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326880 - head/contrib/llvm/tools/clang/lib/Sema X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm/tools/clang/lib/Sema X-SVN-Commit-Revision: 326880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 18:58:22 -0000 Author: dim Date: Fri Dec 15 18:58:21 2017 New Revision: 326880 URL: https://svnweb.freebsd.org/changeset/base/326880 Log: Pull in r320755 from upstream clang trunk (by me): Don't trigger -Wuser-defined-literals for system headers Summary: In D41064, I proposed adding `#pragma clang diagnostic ignored "-Wuser-defined-literals"` to some of libc++'s headers, since these warnings are now triggered by clang's new `-std=gnu++14` default: $ cat test.cpp #include $ clang -std=c++14 -Wsystem-headers -Wall -Wextra -c test.cpp In file included from test.cpp:1: In file included from /usr/include/c++/v1/string:470: /usr/include/c++/v1/string_view:763:29: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string_view operator "" sv(const char *__str, size_t __len) ^ /usr/include/c++/v1/string_view:769:32: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string_view operator "" sv(const wchar_t *__str, size_t __len) ^ /usr/include/c++/v1/string_view:775:33: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string_view operator "" sv(const char16_t *__str, size_t __len) ^ /usr/include/c++/v1/string_view:781:33: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string_view operator "" sv(const char32_t *__str, size_t __len) ^ In file included from test.cpp:1: /usr/include/c++/v1/string:4012:24: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string operator "" s( const char *__str, size_t __len ) ^ /usr/include/c++/v1/string:4018:27: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string operator "" s( const wchar_t *__str, size_t __len ) ^ /usr/include/c++/v1/string:4024:28: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string operator "" s( const char16_t *__str, size_t __len ) ^ /usr/include/c++/v1/string:4030:28: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string operator "" s( const char32_t *__str, size_t __len ) ^ 8 warnings generated. Both @aaron.ballman and @mclow.lists felt that adding this workaround to the libc++ headers was the wrong way, and it should be fixed in clang instead. Here is a proposal to do just that. I verified that this suppresses the warning, even when -Wsystem-headers is used, and that the warning is still emitted for a declaration outside of system headers. Reviewers: aaron.ballman, mclow.lists, rsmith Reviewed By: aaron.ballman Subscribers: mclow.lists, aaron.ballman, andrew, emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D41080 This will allow to compile some of the libc++ headers in C++14 mode (which is the default for gcc 6 and higher, and will be the default for clang 6.0.0 and higher), with -Wsystem-headers and -Werror enabled. Reported by: andrew MFC after: 3 days Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp Fri Dec 15 18:56:12 2017 (r326879) +++ head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp Fri Dec 15 18:58:21 2017 (r326880) @@ -12997,7 +12997,8 @@ bool Sema::CheckLiteralOperatorDeclaration(FunctionDec StringRef LiteralName = FnDecl->getDeclName().getCXXLiteralIdentifier()->getName(); - if (LiteralName[0] != '_') { + if (LiteralName[0] != '_' && + !getSourceManager().isInSystemHeader(FnDecl->getLocation())) { // C++11 [usrlit.suffix]p1: // Literal suffix identifiers that do not start with an underscore // are reserved for future standardization. From owner-svn-src-all@freebsd.org Fri Dec 15 19:03:04 2017 Return-Path: Delivered-To: svn-src-all@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 B58E4E898C2; Fri, 15 Dec 2017 19:03:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 800C01B7F; Fri, 15 Dec 2017 19:03:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFJ33aR036359; Fri, 15 Dec 2017 19:03:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFJ33JS036358; Fri, 15 Dec 2017 19:03:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712151903.vBFJ33JS036358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Dec 2017 19:03:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326881 - head/sys/geom/mirror X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/geom/mirror X-SVN-Commit-Revision: 326881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 19:03:04 -0000 Author: markj Date: Fri Dec 15 19:03:03 2017 New Revision: 326881 URL: https://svnweb.freebsd.org/changeset/base/326881 Log: Typo. MFC after: 1 week Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Dec 15 18:58:21 2017 (r326880) +++ head/sys/geom/mirror/g_mirror.c Fri Dec 15 19:03:03 2017 (r326881) @@ -74,7 +74,7 @@ SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, sync_requests static u_int g_mirror_sync_period = 5; SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, sync_update_period, CTLFLAG_RWTUN, &g_mirror_sync_period, 0, - "Metadata update period during synchroniztion, in seconds"); + "Metadata update period during synchronization, in seconds"); #define MSLEEP(ident, mtx, priority, wmesg, timeout) do { \ G_MIRROR_DEBUG(4, "%s: Sleeping %p.", __func__, (ident)); \ From owner-svn-src-all@freebsd.org Fri Dec 15 19:14:22 2017 Return-Path: Delivered-To: svn-src-all@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 63029E89B3B; Fri, 15 Dec 2017 19:14:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D9EA2101; Fri, 15 Dec 2017 19:14:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFJELaU040501; Fri, 15 Dec 2017 19:14:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFJELDM040500; Fri, 15 Dec 2017 19:14:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712151914.vBFJELDM040500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Dec 2017 19:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326882 - head/sys/geom/mirror X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/geom/mirror X-SVN-Commit-Revision: 326882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 19:14:22 -0000 Author: markj Date: Fri Dec 15 19:14:21 2017 New Revision: 326882 URL: https://svnweb.freebsd.org/changeset/base/326882 Log: Give a couple of predication functions a bool return type. No functional change intended. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Dec 15 19:03:03 2017 (r326881) +++ head/sys/geom/mirror/g_mirror.c Fri Dec 15 19:14:21 2017 (r326882) @@ -1204,7 +1204,7 @@ g_mirror_start(struct bio *bp) * Return TRUE if the given request is colliding with a in-progress * synchronization request. */ -static int +static bool g_mirror_sync_collision(struct g_mirror_softc *sc, struct bio *bp) { struct g_mirror_disk *disk; @@ -1213,7 +1213,7 @@ g_mirror_sync_collision(struct g_mirror_softc *sc, str u_int i; if (sc->sc_sync.ds_ndisks == 0) - return (0); + return (false); rstart = bp->bio_offset; rend = bp->bio_offset + bp->bio_length; LIST_FOREACH(disk, &sc->sc_disks, d_next) { @@ -1226,33 +1226,33 @@ g_mirror_sync_collision(struct g_mirror_softc *sc, str sstart = sbp->bio_offset; send = sbp->bio_offset + sbp->bio_length; if (rend > sstart && rstart < send) - return (1); + return (true); } } - return (0); + return (false); } /* * Return TRUE if the given sync request is colliding with a in-progress regular * request. */ -static int +static bool g_mirror_regular_collision(struct g_mirror_softc *sc, struct bio *sbp) { off_t rstart, rend, sstart, send; struct bio *bp; if (sc->sc_sync.ds_ndisks == 0) - return (0); + return (false); sstart = sbp->bio_offset; send = sbp->bio_offset + sbp->bio_length; TAILQ_FOREACH(bp, &sc->sc_inflight.queue, bio_queue) { rstart = bp->bio_offset; rend = bp->bio_offset + bp->bio_length; if (rend > sstart && rstart < send) - return (1); + return (true); } - return (0); + return (false); } /* From owner-svn-src-all@freebsd.org Fri Dec 15 19:15:56 2017 Return-Path: Delivered-To: svn-src-all@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 7DDE2E89BB5; Fri, 15 Dec 2017 19:15:56 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk0-x22a.google.com (mail-qk0-x22a.google.com [IPv6:2607:f8b0:400d:c09::22a]) (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 35B48226D; Fri, 15 Dec 2017 19:15:56 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk0-x22a.google.com with SMTP id b184so11629999qkc.13; Fri, 15 Dec 2017 11:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BLjPySQ9F4KLCW7qxgvRxKEskNcVOFbQVB3jvIJ8+eA=; b=lzdnaiEXXeO5H+T/E4NMO8aaOiMLFazXGzO1oCj2nR4ey4rrp99nL+eTrOSjxxsAhE 1VSqnZtrda3PcmlCblmdpDPSEmhiWD0SMcgZgOx0yiCwI/6aj9HtjaE6G5T55dMGfVuk O4uhq1OY2O0wW/AIgOcbVgODahZnFQXZlzI5dztomi4Zi0fePI4+q4GMh6ZOcbW0m1YN f8WxmOvmuiWISzGzeKAvuzfNfda2M/SGA+hq8fJblU8biEbxH7TJCRb1Bt4pFt/c7Yck hTGys4MMgaBKMkZKoKIulje0uOOOoV4xD06czy0GAdSwLDKxHiTmqufe87Gdxi/dtDQg XtYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=BLjPySQ9F4KLCW7qxgvRxKEskNcVOFbQVB3jvIJ8+eA=; b=Xt5sq4sjnNZskiseTJX8FZWyvUGDuQz30TWqIaAFXmkdL35P3HNhnJDryK2L3LmnFD JEINO+hVcWYe+A2KQ2iy3UQyJlYCIXq5pp7XjaWeLOp1JJ7KgE6aV6IxnBn1SaGDJ1JE UN3NR0nNlyJxmymcFN9OHFbrsIkiZQ111QDBM4BUdROqRuuVPIUUwcwmEgJggWJ0+0E9 harraJdGR11WNNMhOKaFz785PjRqI91O78Hh8abfwoVt520Z48Q8HyZgUO9SaD/M0wzu 8wa+7HlICmqrdWEO6M8OY9vQ8tSSTrlfRhwd4ie6QBARACsRv95ENGdK574Be/JmQvIJ cHlw== X-Gm-Message-State: AKGB3mLrWVFQ7RPewYSzGziV5qZ4hQCjQJWWlEXufI9N8wAmBSufAgwq Y2Xs/h/3lY0mt0PAkEEhu6aKmw== X-Google-Smtp-Source: ACJfBosWNTm2i2fiwdrHJDgPdR1UucPuIPmWj4LrEC3S5ztlWe8yyffH2/QZ0JQ1jDHUMerXgnwGiw== X-Received: by 10.55.26.195 with SMTP id l64mr813945qkh.40.1513365354909; Fri, 15 Dec 2017 11:15:54 -0800 (PST) Received: from raichu (toroon0560w-lp140-01-69-159-38-22.dsl.bell.ca. [69.159.38.22]) by smtp.gmail.com with ESMTPSA id k1sm4581152qtf.11.2017.12.15.11.15.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 11:15:54 -0800 (PST) Sender: Mark Johnston Date: Fri, 15 Dec 2017 14:15:51 -0500 From: Mark Johnston To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326882 - head/sys/geom/mirror Message-ID: <20171215191551.GB28697@raichu> References: <201712151914.vBFJELDM040500@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201712151914.vBFJELDM040500@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 19:15:56 -0000 On Fri, Dec 15, 2017 at 07:14:21PM +0000, Mark Johnston wrote: > Author: markj > Date: Fri Dec 15 19:14:21 2017 > New Revision: 326882 > URL: https://svnweb.freebsd.org/changeset/base/326882 > > Log: > Give a couple of predication functions a bool return type. (I meant to write "predicate.") From owner-svn-src-all@freebsd.org Fri Dec 15 23:16:28 2017 Return-Path: Delivered-To: svn-src-all@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 75122E8EEE1; Fri, 15 Dec 2017 23:16:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2933C68E6F; Fri, 15 Dec 2017 23:16:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFNGReD041101; Fri, 15 Dec 2017 23:16:27 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFNGRZ4041100; Fri, 15 Dec 2017 23:16:27 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712152316.vBFNGRZ4041100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Dec 2017 23:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326883 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 326883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 23:16:28 -0000 Author: imp Date: Fri Dec 15 23:16:27 2017 New Revision: 326883 URL: https://svnweb.freebsd.org/changeset/base/326883 Log: For now, make the gpart commands verbose so we know exactly what's being installed. Fix problem with gpt + zfs installing the wrong loader... Sponsored by: Netflix Modified: head/tools/boot/install-boot.sh Modified: head/tools/boot/install-boot.sh ============================================================================== --- head/tools/boot/install-boot.sh Fri Dec 15 19:14:21 2017 (r326882) +++ head/tools/boot/install-boot.sh Fri Dec 15 23:16:27 2017 (r326883) @@ -15,6 +15,11 @@ die() { exit 1 } +doit() { + echo $* + eval $* +} + find-part() { dev=$1 part=$2 @@ -30,7 +35,7 @@ boot_nogeli_gpt_zfs_legacy() { if [ -z "$idx" ] ; then die "No freebsd-boot partition found" fi - gpart bootcode -b ${gpt0} -p ${gpt2} -i $idx $dev + doit gpart bootcode -b ${gpt0} -p ${gptzfs2} -i $idx $dev exit 0 } @@ -42,7 +47,7 @@ boot_nogeli_gpt_ufs_legacy() { if [ -z "$idx" ] ; then die "No freebsd-boot partition found" fi - gpart bootcode -b ${gpt0} -p ${gpt2} -i $idx $dev + doit gpart bootcode -b ${gpt0} -p ${gpt2} -i $idx $dev exit 0 } @@ -58,9 +63,9 @@ boot_nogeli_mbr_zfs_legacy() { # search to find the freebsd-zfs partition within the slice # Or just assume it is 'a' because it has to be since it fails otherwise dd if=${dst}/boot/zfsboot of=/tmp/zfsboot1 count=1 - gpart bootcode -b /tmp/zfsboo1 ${dev}s${s} # Put boot1 into the start of part + doit gpart bootcode -b /tmp/zfsboo1 ${dev}s${s} # Put boot1 into the start of part sysctl kern.geom.debugflags=0x10 # Put boot2 into ZFS boot slot - dd if=${dst}/boot/zfsboot of=/dev/${dev}s${s} iseek=1 seek=1024 + doit dd if=${dst}/boot/zfsboot of=/dev/${dev}s${s} iseek=1 seek=1024 sysctl kern.geom.debugflags=0x0 exit 0 @@ -70,12 +75,12 @@ boot_nogeli_mbr_ufs_legacy() { dev=$1 dst=$2 - gpart bootcode -b ${mbr0} ${dev} + doit gpart bootcode -b ${mbr0} ${dev} s=$(findpart $dev "freebsd-ufs") if [ -z "$s" ] ; then die "No freebsd-zfs slice found" fi - gpart bootcode -p ${mbr2} ${dev}s${s} + doit gpart bootcode -p ${mbr2} ${dev}s${s} exit 0 } From owner-svn-src-all@freebsd.org Fri Dec 15 23:16:40 2017 Return-Path: Delivered-To: svn-src-all@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 77AA8E8EF0B; Fri, 15 Dec 2017 23:16:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF3D568F6A; Fri, 15 Dec 2017 23:16:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFNGbMa041156; Fri, 15 Dec 2017 23:16:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFNGbAZ041155; Fri, 15 Dec 2017 23:16:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712152316.vBFNGbAZ041155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Dec 2017 23:16:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326884 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 326884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 23:16:40 -0000 Author: imp Date: Fri Dec 15 23:16:37 2017 New Revision: 326884 URL: https://svnweb.freebsd.org/changeset/base/326884 Log: Be a little verbose and list the loader files we're putting on the drive when making zfs roots as a sanity check for what's on there. Modified: head/tools/boot/rootgen.sh Modified: head/tools/boot/rootgen.sh ============================================================================== --- head/tools/boot/rootgen.sh Fri Dec 15 23:16:27 2017 (r326883) +++ head/tools/boot/rootgen.sh Fri Dec 15 23:16:37 2017 (r326884) @@ -94,6 +94,7 @@ opensolaris_load=YES EOF cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko + ls -las ${mntpt}/boot # end tweaks zfs umount -f ${pool}/ROOT zfs set mountpoint=none ${pool}/ROOT From owner-svn-src-all@freebsd.org Fri Dec 15 23:16:43 2017 Return-Path: Delivered-To: svn-src-all@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 D2EBEE8EF32; Fri, 15 Dec 2017 23:16:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D98168FB9; Fri, 15 Dec 2017 23:16:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFNGgoo041209; Fri, 15 Dec 2017 23:16:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFNGgSO041208; Fri, 15 Dec 2017 23:16:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712152316.vBFNGgSO041208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Dec 2017 23:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326885 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 326885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 23:16:43 -0000 Author: imp Date: Fri Dec 15 23:16:42 2017 New Revision: 326885 URL: https://svnweb.freebsd.org/changeset/base/326885 Log: Use -h -D in preference to -D so that the serial port gets the interactive console rather than the video port. qemu has issues with X on my mac at the moment and this is the easiest path forward. Sponsored by: Netflix Modified: head/tools/boot/rootgen.sh Modified: head/tools/boot/rootgen.sh ============================================================================== --- head/tools/boot/rootgen.sh Fri Dec 15 23:16:37 2017 (r326884) +++ head/tools/boot/rootgen.sh Fri Dec 15 23:16:42 2017 (r326885) @@ -183,7 +183,7 @@ rm -rf ${DESTDIR} mkdir -p ${DESTDIR}/boot/defaults mkdir -p ${DESTDIR}/boot/kernel cp /boot/kernel/kernel ${DESTDIR}/boot/kernel -echo -D -S115200 > ${DESTDIR}/boot.config +echo -h -D -S115200 > ${DESTDIR}/boot.config # XXX cp /boot/device.hints ${DESTDIR}/boot/device.hints # Assume we're already built From owner-svn-src-all@freebsd.org Fri Dec 15 23:16:49 2017 Return-Path: Delivered-To: svn-src-all@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 43816E8EF74; Fri, 15 Dec 2017 23:16:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E155C6903D; Fri, 15 Dec 2017 23:16:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFNGlWu041263; Fri, 15 Dec 2017 23:16:47 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFNGlwu041262; Fri, 15 Dec 2017 23:16:47 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712152316.vBFNGlwu041262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Dec 2017 23:16:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326886 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 326886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 23:16:50 -0000 Author: imp Date: Fri Dec 15 23:16:47 2017 New Revision: 326886 URL: https://svnweb.freebsd.org/changeset/base/326886 Log: Panic in sbrk if setheap hasn't been called yet. This is preferable to a mysterious crash. Sponsored by: Netflix Modified: head/stand/libsa/sbrk.c Modified: head/stand/libsa/sbrk.c ============================================================================== --- head/stand/libsa/sbrk.c Fri Dec 15 23:16:42 2017 (r326885) +++ head/stand/libsa/sbrk.c Fri Dec 15 23:16:47 2017 (r326886) @@ -52,6 +52,9 @@ sbrk(int incr) { char *ret; + if (heapbase == 0) + panic("No heap setup\n"); + if ((heapsize + incr) <= maxheap) { ret = (char *)heapbase + heapsize; bzero(ret, incr); From owner-svn-src-all@freebsd.org Fri Dec 15 23:16:58 2017 Return-Path: Delivered-To: svn-src-all@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 8683AE8EFD2; Fri, 15 Dec 2017 23:16:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5A286916B; Fri, 15 Dec 2017 23:16:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFNGsP1041323; Fri, 15 Dec 2017 23:16:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFNGr9P041314; Fri, 15 Dec 2017 23:16:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712152316.vBFNGr9P041314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Dec 2017 23:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326887 - in head/stand: i386/common i386/gptboot i386/zfsboot libsa mips/beri/common X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: i386/common i386/gptboot i386/zfsboot libsa mips/beri/common X-SVN-Commit-Revision: 326887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 23:16:58 -0000 Author: imp Date: Fri Dec 15 23:16:53 2017 New Revision: 326887 URL: https://svnweb.freebsd.org/changeset/base/326887 Log: Remove the 'mini libstand in libstand' that util.[ch] provided. These weren't needed, and their existance interfered with things in subtle ways. One of these subtle ways was that malloc could be different based on what files were included when (even within the same .c file, it turns out). Move to a single malloc implementation as well by adding the calls to setheap() to gptboot.c and zfsboot.c. Once upon a time, these boot loaders strove to not use libstand. However, with the proliferation of features, that striving is too hard for too little gain and lead to stupid mistakes. This fixes the GELI-enabled (but not even using) boot environment. The geli routines were calling libstand malloc but zfsboot.c and gptboot.c were using the mini libstand malloc, so this failed when we tried to probe for GELI partitions. Subtle changes in build order when moving to self-contained stand build in r326593 toggled what it used from one type to another due to odd nesting of the zfs implementation code that differed subtly between zfsloader and zfsboot. Sponsored by: Netflix Deleted: head/stand/libsa/util.c head/stand/libsa/util.h Modified: head/stand/i386/common/cons.c head/stand/i386/common/drv.c head/stand/i386/gptboot/gptboot.c head/stand/i386/zfsboot/zfsboot.c head/stand/libsa/gpt.c head/stand/libsa/stand.h head/stand/mips/beri/common/altera_jtag_uart.c head/stand/mips/beri/common/cfi.c Modified: head/stand/i386/common/cons.c ============================================================================== --- head/stand/i386/common/cons.c Fri Dec 15 23:16:47 2017 (r326886) +++ head/stand/i386/common/cons.c Fri Dec 15 23:16:53 2017 (r326887) @@ -22,9 +22,10 @@ __FBSDID("$FreeBSD$"); #include +#include "stand.h" + #include "lib.h" #include "rbx.h" -#include "util.h" #include "cons.h" #define SECOND 18 /* Circa that many ticks in a second. */ Modified: head/stand/i386/common/drv.c ============================================================================== --- head/stand/i386/common/drv.c Fri Dec 15 23:16:47 2017 (r326886) +++ head/stand/i386/common/drv.c Fri Dec 15 23:16:53 2017 (r326887) @@ -21,8 +21,8 @@ __FBSDID("$FreeBSD$"); #include +#include "stand.h" #include "rbx.h" -#include "util.h" #include "drv.h" #include "edd.h" @@ -69,7 +69,7 @@ drvread(struct dsk *dskp, void *buf, daddr_t lba, unsi v86.esi = VTOPOFF(&packet); v86int(); if (V86_CY(v86.efl)) { - printf("%s: error %u lba %u\n", + printf("%s: error %u lba %llu\n", BOOTPROG, v86.eax >> 8 & 0xff, lba); return (-1); } @@ -94,7 +94,7 @@ drvwrite(struct dsk *dskp, void *buf, daddr_t lba, uns v86.esi = VTOPOFF(&packet); v86int(); if (V86_CY(v86.efl)) { - printf("error %u lba %u\n", v86.eax >> 8 & 0xff, lba); + printf("error %u lba %llu\n", v86.eax >> 8 & 0xff, lba); return (-1); } return (0); Modified: head/stand/i386/gptboot/gptboot.c ============================================================================== --- head/stand/i386/gptboot/gptboot.c Fri Dec 15 23:16:47 2017 (r326886) +++ head/stand/i386/gptboot/gptboot.c Fri Dec 15 23:16:53 2017 (r326887) @@ -32,15 +32,12 @@ __FBSDID("$FreeBSD$"); #include -/* Forward declared to avoid warnings -- these shouldn't be needed */ -int strcasecmp(const char *s1, const char *s2); -void explicit_bzero(void *b, size_t len); +#include "stand.h" #include "bootargs.h" #include "lib.h" #include "rbx.h" #include "drv.h" -#include "util.h" #include "cons.h" #include "gpt.h" #include "paths.h" @@ -109,35 +106,11 @@ void exit(int); static void load(void); static int parse_cmds(char *, int *); static int dskread(void *, daddr_t, unsigned); -void *malloc(size_t n); -void free(void *ptr); #ifdef LOADER_GELI_SUPPORT static int vdev_read(void *vdev __unused, void *priv, off_t off, void *buf, size_t bytes); #endif -void * -malloc(size_t n) -{ - char *p = heap_next; - if (p + n > heap_end) { - printf("malloc failure\n"); - for (;;) - ; - /* NOTREACHED */ - return (0); - } - heap_next += n; - return (p); -} - -void -free(void *ptr) -{ - - return; -} - #include "ufsread.c" #include "gpt.c" #ifdef LOADER_GELI_SUPPORT @@ -291,6 +264,7 @@ main(void) heap_next = (char *)dmadat + sizeof(*dmadat); heap_end = (char *)PTOV(bios_basemem); } + setheap(heap_next, heap_end); v86.ctl = V86_FLAGS; v86.efl = PSL_RESERVED_DEFAULT | PSL_I; Modified: head/stand/i386/zfsboot/zfsboot.c ============================================================================== --- head/stand/i386/zfsboot/zfsboot.c Fri Dec 15 23:16:47 2017 (r326886) +++ head/stand/i386/zfsboot/zfsboot.c Fri Dec 15 23:16:53 2017 (r326887) @@ -16,6 +16,8 @@ #include __FBSDID("$FreeBSD$"); +#include "stand.h" + #include #include #include @@ -36,15 +38,10 @@ __FBSDID("$FreeBSD$"); #include -/* Forward declared to avoid warnings -- these shouldn't be needed */ -int strcasecmp(const char *s1, const char *s2); -void explicit_bzero(void *b, size_t len); - #include "lib.h" #include "rbx.h" #include "drv.h" #include "edd.h" -#include "util.h" #include "cons.h" #include "bootargs.h" #include "paths.h" @@ -127,40 +124,8 @@ void reboot(void); static void load(void); static int parse_cmd(void); static void bios_getmem(void); -void *malloc(size_t n); -void free(void *ptr); int main(void); -void * -malloc(size_t n) -{ - char *p = heap_next; - if (p + n > heap_end) { - printf("malloc failure\n"); - for (;;) - ; - /* NOTREACHED */ - return (0); - } - heap_next += n; - return (p); -} - -void -free(void *ptr) -{ - - return; -} - -static char * -strdup(const char *s) -{ - char *p = malloc(strlen(s) + 1); - strcpy(p, s); - return (p); -} - #ifdef LOADER_GELI_SUPPORT #include "geliboot.c" static char gelipw[GELI_PW_MAXLEN]; @@ -503,7 +468,6 @@ drvsize_ext(struct dsk *dskp) if (V86_CY(v86.efl) || /* carry set */ (v86.edx & 0xff) <= (unsigned)(dskp->drive & 0x7f)) /* unit # bad */ return (0); - cyl = ((v86.ecx & 0xc0) << 2) + ((v86.ecx & 0xff00) >> 8) + 1; /* Convert max head # -> # of heads */ hds = ((v86.edx & 0xff00) >> 8) + 1; @@ -721,6 +685,7 @@ main(void) heap_next = (char *)dmadat + sizeof(*dmadat); heap_end = (char *)PTOV(bios_basemem); } + setheap(heap_next, heap_end); dsk = malloc(sizeof(struct dsk)); dsk->drive = *(uint8_t *)PTOV(ARGS); Modified: head/stand/libsa/gpt.c ============================================================================== --- head/stand/libsa/gpt.c Fri Dec 15 23:16:47 2017 (r326886) +++ head/stand/libsa/gpt.c Fri Dec 15 23:16:53 2017 (r326887) @@ -34,9 +34,9 @@ __FBSDID("$FreeBSD$"); #error gpt.c works only for little endian architectures #endif +#include "stand.h" #include "crc32.h" #include "drv.h" -#include "util.h" #include "gpt.h" static struct gpt_hdr hdr_primary, hdr_backup, *gpthdr; Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Fri Dec 15 23:16:47 2017 (r326886) +++ head/stand/libsa/stand.h Fri Dec 15 23:16:53 2017 (r326887) @@ -265,12 +265,6 @@ static __inline int tolower(int c) extern void setheap(void *base, void *top); extern char *sbrk(int incr); -/* Matt Dillon's zalloc/zmalloc */ -extern void *malloc(size_t bytes); -extern void free(void *ptr); -/*#define free(p) {CHK("free %p", p); free(p);} */ /* use for catching guard violations */ -extern void *calloc(size_t n1, size_t n2); -extern void *realloc(void *ptr, size_t size); extern void *reallocf(void *ptr, size_t size); extern void mallocstats(void); @@ -427,7 +421,7 @@ void *Calloc(size_t, size_t, const char *, int); void *Realloc(void *, size_t, const char *, int); void Free(void *, const char *, int); -#if 1 +#ifdef DEBUG_MALLOC #define malloc(x) Malloc(x, __FILE__, __LINE__) #define calloc(x, y) Calloc(x, y, __FILE__, __LINE__) #define free(x) Free(x, __FILE__, __LINE__) Modified: head/stand/mips/beri/common/altera_jtag_uart.c ============================================================================== --- head/stand/mips/beri/common/altera_jtag_uart.c Fri Dec 15 23:16:47 2017 (r326886) +++ head/stand/mips/beri/common/altera_jtag_uart.c Fri Dec 15 23:16:53 2017 (r326887) @@ -30,7 +30,7 @@ * $FreeBSD$ */ -#include "util.h" +#include "stand.h" #include "mips.h" /*- Modified: head/stand/mips/beri/common/cfi.c ============================================================================== --- head/stand/mips/beri/common/cfi.c Fri Dec 15 23:16:47 2017 (r326886) +++ head/stand/mips/beri/common/cfi.c Fri Dec 15 23:16:53 2017 (r326887) @@ -30,7 +30,7 @@ * $FreeBSD$ */ -#include "util.h" +#include "stand.h" #include "mips.h" #include "cfi.h" From owner-svn-src-all@freebsd.org Fri Dec 15 23:19:50 2017 Return-Path: Delivered-To: svn-src-all@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 D71FFE8F13A; Fri, 15 Dec 2017 23:19:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4A846953F; Fri, 15 Dec 2017 23:19:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFNJnOS041457; Fri, 15 Dec 2017 23:19:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFNJnJ0041455; Fri, 15 Dec 2017 23:19:49 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712152319.vBFNJnJ0041455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Dec 2017 23:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326888 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 326888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 23:19:50 -0000 Author: imp Date: Fri Dec 15 23:19:49 2017 New Revision: 326888 URL: https://svnweb.freebsd.org/changeset/base/326888 Log: Note GELI-enabled zfsboot issues have been solved. Flip the switch back to enabling GELI in boot and loader builds. Sponsored by: Netflix Modified: head/UPDATING head/share/mk/src.opts.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Dec 15 23:16:53 2017 (r326887) +++ head/UPDATING Fri Dec 15 23:19:49 2017 (r326888) @@ -51,6 +51,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20171215: + r326887 fixes the issue described in the 20171214 UPDATING entry. + r326888 flips the switch back to building GELI support always. + 20171214: r362593 broke ZFS + GELI support for reasons unknown. However, it also broke ZFS support generally, so GELI has been turned off Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Dec 15 23:16:53 2017 (r326887) +++ head/share/mk/src.opts.mk Fri Dec 15 23:19:49 2017 (r326888) @@ -124,6 +124,7 @@ __DEFAULT_YES_OPTIONS = \ LPR \ LS_COLORS \ LZMA_SUPPORT \ + LOADER_GELI \ MAIL \ MAILWRAPPER \ MAKE \ @@ -182,7 +183,6 @@ __DEFAULT_NO_OPTIONS = \ LIBSOFT \ LOADER_FIREWIRE \ LOADER_FORCE_LE \ - LOADER_GELI \ NAND \ OFED \ OPENLDAP \ From owner-svn-src-all@freebsd.org Sat Dec 16 00:44:12 2017 Return-Path: Delivered-To: svn-src-all@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 9FBDAE91467; Sat, 16 Dec 2017 00:44:12 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C1806D6C5; Sat, 16 Dec 2017 00:44:12 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBG0iB2Y082413; Sat, 16 Dec 2017 00:44:11 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBG0iBMI082412; Sat, 16 Dec 2017 00:44:11 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712160044.vBG0iBMI082412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 16 Dec 2017 00:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326891 - stable/11/sys/fs/nfs X-SVN-Group: stable-11 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/11/sys/fs/nfs X-SVN-Commit-Revision: 326891 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 00:44:12 -0000 Author: cperciva Date: Sat Dec 16 00:44:11 2017 New Revision: 326891 URL: https://svnweb.freebsd.org/changeset/base/326891 Log: Add vfs.nfs.suppress_32bits_warning sysctl which reduces the frequency of 'fileid > 32bits' warnings from at most once per minute to at most once per day. Direct commit to stable/11 since the relevant code was removed from HEAD following the switch to 64-bit inodes. Requested by: Rafal Lukawiecki Approved by: rmacklem Modified: stable/11/sys/fs/nfs/nfs_commonsubs.c Modified: stable/11/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/11/sys/fs/nfs/nfs_commonsubs.c Fri Dec 15 23:50:26 2017 (r326890) +++ stable/11/sys/fs/nfs/nfs_commonsubs.c Sat Dec 16 00:44:11 2017 (r326891) @@ -69,6 +69,7 @@ int nfsrv_lease = NFSRV_LEASE; int ncl_mbuf_mlen = MLEN; int nfsd_enable_stringtouid = 0; static int nfs_enable_uidtostring = 0; +static int nfs_suppress_32bits_warning = 0; NFSNAMEIDMUTEX; NFSSOCKMUTEX; extern int nfsrv_lughashsize; @@ -76,6 +77,8 @@ extern int nfsrv_lughashsize; SYSCTL_DECL(_vfs_nfs); SYSCTL_INT(_vfs_nfs, OID_AUTO, enable_uidtostring, CTLFLAG_RW, &nfs_enable_uidtostring, 0, "Make nfs always send numeric owner_names"); +SYSCTL_INT(_vfs_nfs, OID_AUTO, suppress_32bits_warning, CTLFLAG_RW, + &nfs_suppress_32bits_warning, 0, "Suppress \"> 32 bits\" warnings"); /* * This array of structures indicates, for V4: @@ -836,7 +839,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, static size_t count64fileid; static struct timeval last64mountfileid; static size_t count64mountfileid; - static struct timeval warninterval = { 60, 0 }; + struct timeval warninterval = + { nfs_suppress_32bits_warning ? 86400 : 60, 0 }; if (compare) { retnotsup = 0; From owner-svn-src-all@freebsd.org Sat Dec 16 00:47:46 2017 Return-Path: Delivered-To: svn-src-all@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 725F7E9161B; Sat, 16 Dec 2017 00:47:46 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B45B6D8EC; Sat, 16 Dec 2017 00:47:46 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBG0ljqn082586; Sat, 16 Dec 2017 00:47:45 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBG0ljHu082585; Sat, 16 Dec 2017 00:47:45 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712160047.vBG0ljHu082585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 16 Dec 2017 00:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326892 - stable/11/release/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/11/release/tools X-SVN-Commit-Revision: 326892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 00:47:46 -0000 Author: cperciva Date: Sat Dec 16 00:47:45 2017 New Revision: 326892 URL: https://svnweb.freebsd.org/changeset/base/326892 Log: MFC r326565: Make EC2 instances use Amazon's NTP service for time synchronization. Relnotes: EC2 instances now keep their clocks synchronized using the Amazon Time Sync Service (aka. NTP). Modified: stable/11/release/tools/ec2.conf Directory Properties: stable/11/ (props changed) Modified: stable/11/release/tools/ec2.conf ============================================================================== --- stable/11/release/tools/ec2.conf Sat Dec 16 00:44:11 2017 (r326891) +++ stable/11/release/tools/ec2.conf Sat Dec 16 00:47:45 2017 (r326892) @@ -9,7 +9,7 @@ export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient" # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs" +export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd" # Build with a 2 GB UFS partition; the growfs rc.d script will expand # the partition to fill the root disk after the EC2 instance is launched. @@ -80,6 +80,11 @@ vm_extra_pre_umount() { # Load the kernel module for the Amazon "Elastic Network Adapter" echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf + + # Use the NTP service provided by Amazon + sed -i '' -e 's/^pool/#pool/' \ + -e 's/^#server.*/server 169.254.169.123 iburst/' \ + ${DESTDIR}/etc/ntp.conf # The first time the AMI boots, the installed "first boot" scripts # should be allowed to run: From owner-svn-src-all@freebsd.org Sat Dec 16 01:40:21 2017 Return-Path: Delivered-To: svn-src-all@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 176C6E9366B; Sat, 16 Dec 2017 01:40:21 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 94AD76F4E0; Sat, 16 Dec 2017 01:40:20 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with ESMTPA id Q1SaepEumb3YIQ1ScefLm0; Fri, 15 Dec 2017 18:40:19 -0700 X-Authority-Analysis: v=2.2 cv=J/va1EvS c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=8nJEP1OIZ-IA:10 a=ocR9PWop10UA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=2Boy1rlXIhuo8Nt7YJ4A:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 7643D1A4; Fri, 15 Dec 2017 17:40:16 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vBG1eFM6037305; Fri, 15 Dec 2017 17:40:15 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id vBG1eF98037302; Fri, 15 Dec 2017 17:40:15 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201712160140.vBG1eF98037302@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Baptiste Daroussin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326617 - head/usr.sbin/newsyslog In-Reply-To: Message from Baptiste Daroussin of "Wed, 06 Dec 2017 09:44:35 +0000." <201712060944.vB69iZQe027554@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Fri, 15 Dec 2017 17:40:15 -0800 X-CMAE-Envelope: MS4wfL5hBV1lzXTBn8PMK4mXs24/Apm1K6RV95gbJjYFyPORD/ZoAYedhjuS/6wdKSEW/3rnwkO8fyP6MD4D+jxWX6eVbq0lw+kZiFK35+/evlL2XT33q9r7 kxVWaOB0pRVSbZkqaBuRFKNw+4Y5iZqWpA26J1UsPgvaoAfsiCIsY24x1ZiLpsLnDcBiBwBhGw2FqPyEeERDz31VaObhgVDY41bCxzv/QR/g22AxbsM5XlZY Ts1Zc/ZZeUi437TePoFRBGtrsi5FmACsON61q97Ab7Imsnl6B833XOxPyIt92/HH X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 01:40:21 -0000 In message <201712060944.vB69iZQe027554@repo.freebsd.org>, Baptiste Daroussin w rites: > Author: bapt > Date: Wed Dec 6 09:44:35 2017 > New Revision: 326617 > URL: https://svnweb.freebsd.org/changeset/base/326617 > > Log: > Allow newsyslog to execute compression commands which > have a semantic different than the traditional gzip(1) > > This is done to allow to use zstd(1) as a compression tool without > having to patch it to change its default behavior. > > Modified: > head/usr.sbin/newsyslog/newsyslog.c > > Modified: head/usr.sbin/newsyslog/newsyslog.c > ============================================================================= > = > --- head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 06:49:53 2017 > (r326616) > +++ head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 09:44:35 2017 > (r326617) > @@ -151,14 +151,23 @@ struct compress_types { > const char *flag; /* Flag in configuration file */ > const char *suffix; /* Compression suffix */ > const char *path; /* Path to compression program */ > + char **args; /* Comrpession arguments */ > }; > > +static char f_arg[] = "-f"; > +static char q_arg[] = "-q"; > +static char rm_arg[] = "--rm"; > +static char *gz_args[] ={ NULL, f_arg, NULL, NULL }; > +#define bzip2_args gz_args > +#define xz_args gz_args > +static char *zstd_args[] = { NULL, q_arg, rm_arg, NULL, NULL }; > + > static const struct compress_types compress_type[COMPRESS_TYPES] = { > - { "", "", "" }, /* no compression */ > - { "Z", COMPRESS_SUFFIX_GZ, _PATH_GZIP }, /* gzip compression */ > - { "J", COMPRESS_SUFFIX_BZ2, _PATH_BZIP2 }, /* bzip2 compression */ > - { "X", COMPRESS_SUFFIX_XZ, _PATH_XZ }, /* xz compression */ > - { "Y", COMPRESS_SUFFIX_ZST, _PATH_ZSTD } /* zst compression */ > + { "", "", "", NULL}, /* none */ > + { "Z", COMPRESS_SUFFIX_GZ, _PATH_GZIP, gz_args}, /* gzip */ > + { "J", COMPRESS_SUFFIX_BZ2, _PATH_BZIP2, bzip2_args}, /* bzip2 */ > + { "X", COMPRESS_SUFFIX_XZ, _PATH_XZ, xz_args }, /* xz */ > + { "Y", COMPRESS_SUFFIX_ZST, _PATH_ZSTD, zstd_args } /* zst */ > }; > > struct conf_entry { > @@ -2001,6 +2010,8 @@ do_zipwork(struct zipwork_entry *zwork) > int errsav, fcount, zstatus; > pid_t pidzip, wpid; > char zresult[MAXPATHLEN]; > + char command[BUFSIZ]; > + char **args; > int c; > > assert(zwork != NULL); > @@ -2013,6 +2024,7 @@ do_zipwork(struct zipwork_entry *zwork) > pgm_path = compress_type[c].path; > (void) strlcat(zresult, > compress_type[c].suffix, sizeof(zresult)); > + args = compress_type[c].args; > break; > } > } > @@ -2026,6 +2038,13 @@ do_zipwork(struct zipwork_entry *zwork) > else > pgm_name++; > > + args[0] = strdup(pgm_name); > + if (args[0] == NULL) > + err(1, "strdup()"); > + for (c = 0; args[c] != NULL; c++) > + ; > + args[c] = zwork->zw_fname; > + > if (zwork->zw_swork != NULL && zwork->zw_swork->sw_runcmd == 0 && > zwork->zw_swork->sw_pidok <= 0) { > warnx( > @@ -2035,6 +2054,11 @@ do_zipwork(struct zipwork_entry *zwork) > return; > } > > + strlcpy(command, pgm_path, sizeof(command)); > + for (c = 1; args[c] != NULL; c++) { > + strlcat(command, " ", sizeof(command)); > + strlcat(command, args[c], sizeof(command)); > + } > if (noaction) { > printf("\t%s %s\n", pgm_name, zwork->zw_fname); > change_attrs(zresult, zwork->zw_conf); > @@ -2058,8 +2082,8 @@ do_zipwork(struct zipwork_entry *zwork) > } > if (!pidzip) { > /* The child process executes the compression command */ > - execl(pgm_path, pgm_path, "-f", zwork->zw_fname, (char *)0); > - err(1, "execl(`%s -f %s')", pgm_path, zwork->zw_fname); > + execv(pgm_path, (char *const*) args); > + err(1, "execv(`%s')", command); > } > > wpid = waitpid(pidzip, &zstatus, 0); > @@ -2069,13 +2093,12 @@ do_zipwork(struct zipwork_entry *zwork) > return; > } > if (!WIFEXITED(zstatus)) { > - warnx("`%s -f %s' did not terminate normally", pgm_name, > - zwork->zw_fname); > + warnx("`%s' did not terminate normally", command); > return; > } > if (WEXITSTATUS(zstatus)) { > - warnx("`%s -f %s' terminated with a non-zero status (%d)", > - pgm_name, zwork->zw_fname, WEXITSTATUS(zstatus)); > + warnx("`%s' terminated with a non-zero status (%d)", command, > + WEXITSTATUS(zstatus)); > return; > } > > Ever since this revision I'm seeing the following errors: bzip2: Can't open input file ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ: No such file or directory. newsyslog: `/usr/bin/bzip2 -f ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ /var/log/debug.log.0' terminated with a non-zero status (1) bzip2: Bad flag `--rm' bzip2, a block-sorting file compressor. Version 1.0.6, 6-Sept-2010. usage: bzip2 [flags and input files in any order] -h --help print this message -d --decompress force decompression -z --compress force compression -k --keep keep (don't delete) input files -f --force overwrite existing output files -t --test test compressed file integrity -c --stdout output to standard out -q --quiet suppress noncritical error messages -v --verbose be verbose (a 2nd -v gives more) -L --license display software version & license -V --version display software version & license -s --small use less memory (at most 2500k) -1 .. -9 set block size to 100k .. 900k --fast alias for -1 --best alias for -9 If invoked as `bzip2', default action is to compress. as `bunzip2', default action is to decompress. as `bzcat', default action is to decompress to stdout. If no file names are given, bzip2 compresses or decompresses from standard input to standard output. You can combine short flags, so `-v -4' means the same as -v4 or -4v, &c. newsyslog: `/usr/bin/bzip2 -f ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ /var/log/messages.0 -q --rm' terminated with a non-zero status (1) And this: bzip2: file name `ZZZZZZZZZZZZZZZZZZZZ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZà‘f' is suspiciously (more than 1024 chars) long. Try using a reasonable file name instead. Sorry! :-) newsyslog: `/usr/bin/bzip2 -f ZZZZZZZZZZZZZZZZZZZZ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥ Â¥! ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥' terminated with a non-zero status (1) -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sat Dec 16 03:54:20 2017 Return-Path: Delivered-To: svn-src-all@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 005C2E9AD0A for ; Sat, 16 Dec 2017 03:54:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (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 B6BB1751E7 for ; Sat, 16 Dec 2017 03:54:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22f.google.com with SMTP id 68so22223636ite.4 for ; Fri, 15 Dec 2017 19:54:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=r2uhZ6Of0iA9HAedVy2zDfy3f49WhijJslFkU7LD558=; b=1gloXoY3e6Z4Zh8x0KYm7jMu3Isn0Ywwh3OPPugWZRK5dV8iGv0zosKW4fRpxU8EFO cjuOrqcpqGwOzvPYr2SiwiM9wK/+WZA2QUGAhB2k76k7WRA0NK2nD+1j2ezeFEd1KEnk RkJlZ9FvQXL3PGXUHAchKINwP6jcnLKw5feCOQa+N7zkRwiEoNRRFpGPWB7aSezeqAiW oXcsO1GgKoRB5uvqehQ6XZGsUG/LgrFeRICc62n0Y27P8MYa9vKRtzLaReSYZnH+kfSe fnNSEXpfXy//qGtyZqd4VKPlnp3aEvKwLldQI3wkrs9utjmuVb/kwA8p5hVirPWE1uz2 ETew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=r2uhZ6Of0iA9HAedVy2zDfy3f49WhijJslFkU7LD558=; b=i+pvKUgBFGg7FQbhbQ1NBeODZPNsAcGGnMsHy+0R3xmiOgmA6C0QPjYOa48I8Ufh5b ql5dUodpFEJ1gtd4xGYQt7a15Hpl/7SQqPGkJu3QrCP4t7LJfbUWhXQNuprpvNawCBWS wTvNCBeQDPi12hVya31ZpqK60jI+qMvD6Pt1rX3G7rAYNxxV0oj9gjw8UbzpWQcg4JSx G35te4hBCmzTybsqSr/63ihuoE2PNAtmHjpbiohS95djBJy35da+Ba4kuVc0vjhtXBtj 7fq5HYwPVZIMuj6V7UPCdqPc2Yjb/afAAqPwST6EXFnJAmLkqUi77C0lT+9/7Lj/kEOz ik/w== X-Gm-Message-State: AKGB3mJqpM1njOLEUDcsrZwVjBxjwqZaYVgt933GoecrWiso5t5NP3/U I+t+cp2njMoruScAUCfncB5UltRG5+IK2OyCuzzCyA== X-Google-Smtp-Source: ACJfBouBs/Thi6Yp5ibdVJ7VqGdEfC2UQ8Ob13zgcyHvjoOImH5ND3RdzFJS2CYpRS3Ct4E5StzW+4jla9bROcdc2fU= X-Received: by 10.36.77.143 with SMTP id l137mr11650194itb.50.1513396458853; Fri, 15 Dec 2017 19:54:18 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Fri, 15 Dec 2017 19:54:18 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <201712160339.vBG3djMr005140@pdx.rh.CN85.dnsmgr.net> References: <201712152316.vBFNGRZ4041100@repo.freebsd.org> <201712160339.vBG3djMr005140@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Fri, 15 Dec 2017 20:54:18 -0700 X-Google-Sender-Auth: 171KuEfSK4SVUirjruYn-kmCyqA Message-ID: Subject: Re: svn commit: r326883 - head/tools/boot To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 03:54:20 -0000 On Fri, Dec 15, 2017 at 8:39 PM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > Author: imp > > Date: Fri Dec 15 23:16:27 2017 > > New Revision: 326883 > > URL: https://svnweb.freebsd.org/changeset/base/326883 > > > > Log: > > For now, make the gpart commands verbose so we know exactly what's > > being installed. > > > > Fix problem with gpt + zfs installing the wrong loader... > ... > > Would it make since to get the svn version in at least the > major parts of this code so that one can tell what is installed > easier? Ie, the parts of zfsboot you dd into the reserved space, > boot1, loader.efi, etc. > I've often desired this. There's some practical issues around doing something specific, however. We don't want to create a new binary that differs only by the build date from the old one. For reproducible builds, we try to make binaries that don't have any marking like this. > I know that for the MBR it probably makes little since, but for > boot1 and later we shouldnt be so tight on room we can not put > in a short character string? > I like this idea. boot0/boot1/boot2 for MBR and the boot1 part of zfsboot are quite limited in space. The others have acres of space, and are likely to have that space for the foreseeable future. We do this today for /boot/*loader* already, though we don't have a simple way to retrieve things. There's also a version number that's printed, but that's ill maintained. We may be able to leverage the built-time stuff here somehow. I'd also like to add the compile-time boot options that's printed on boot and maybe easily retrievable. Might be easier to pass this stuff in via kenv vars and/or meta data somehow, but that only works on a booted system, not on an arbitrary device. Warner From owner-svn-src-all@freebsd.org Sat Dec 16 03:39:47 2017 Return-Path: Delivered-To: svn-src-all@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 9D961E9A13E; Sat, 16 Dec 2017 03:39:47 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DE55747A5; Sat, 16 Dec 2017 03:39:46 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBG3djV2005141; Fri, 15 Dec 2017 19:39:45 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBG3djMr005140; Fri, 15 Dec 2017 19:39:45 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712160339.vBG3djMr005140@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326883 - head/tools/boot In-Reply-To: <201712152316.vBFNGRZ4041100@repo.freebsd.org> To: Warner Losh Date: Fri, 15 Dec 2017 19:39:45 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 03:39:47 -0000 > Author: imp > Date: Fri Dec 15 23:16:27 2017 > New Revision: 326883 > URL: https://svnweb.freebsd.org/changeset/base/326883 > > Log: > For now, make the gpart commands verbose so we know exactly what's > being installed. > > Fix problem with gpt + zfs installing the wrong loader... ... Would it make since to get the svn version in at least the major parts of this code so that one can tell what is installed easier? Ie, the parts of zfsboot you dd into the reserved space, boot1, loader.efi, etc. I know that for the MBR it probably makes little since, but for boot1 and later we shouldnt be so tight on room we can not put in a short character string? Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sat Dec 16 04:35:38 2017 Return-Path: Delivered-To: svn-src-all@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 89822E9CC46; Sat, 16 Dec 2017 04:35:38 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B58B76BE8; Sat, 16 Dec 2017 04:35:38 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBG4Zbce078601; Sat, 16 Dec 2017 04:35:37 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBG4ZbDB078599; Sat, 16 Dec 2017 04:35:37 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201712160435.vBG4ZbDB078599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Sat, 16 Dec 2017 04:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326893 - head/sys/dev/bhnd/bhndb X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: head/sys/dev/bhnd/bhndb X-SVN-Commit-Revision: 326893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 04:35:38 -0000 Author: landonf Date: Sat Dec 16 04:35:37 2017 New Revision: 326893 URL: https://svnweb.freebsd.org/changeset/base/326893 Log: bhndb(4): Enable addrext support on DMA64 devices, and fix an incorrect DMA DMA boundary constraint applied in bhndb_dma_tag_create(). Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/bhnd/bhndb/bhndb_pci_hwdata.c head/sys/dev/bhnd/bhndb/bhndb_subr.c Modified: head/sys/dev/bhnd/bhndb/bhndb_pci_hwdata.c ============================================================================== --- head/sys/dev/bhnd/bhndb/bhndb_pci_hwdata.c Sat Dec 16 00:47:45 2017 (r326892) +++ head/sys/dev/bhnd/bhndb/bhndb_pci_hwdata.c Sat Dec 16 04:35:37 2017 (r326893) @@ -511,7 +511,7 @@ static const struct bhndb_hwcfg bhndb_pci_hwcfg_v1_pci { .base_addr = BHND_PCIE_DMA64_TRANSLATION, .addr_mask = ~BHND_PCIE_DMA64_MASK, - .addrext_mask = 0 + .addrext_mask = BHND_PCIE_DMA64_MASK }, BHND_DMA_TRANSLATION_TABLE_END } @@ -594,7 +594,7 @@ static const struct bhndb_hwcfg bhndb_pci_hwcfg_v2 = { { .base_addr = BHND_PCIE_DMA64_TRANSLATION, .addr_mask = ~BHND_PCIE_DMA64_MASK, - .addrext_mask = 0 + .addrext_mask = BHND_PCIE_DMA64_MASK }, BHND_DMA_TRANSLATION_TABLE_END } @@ -672,7 +672,7 @@ static const struct bhndb_hwcfg bhndb_pci_hwcfg_v3 = { { .base_addr = BHND_PCIE2_DMA64_TRANSLATION, .addr_mask = ~BHND_PCIE2_DMA64_MASK, - .addrext_mask = 0 + .addrext_mask = BHND_PCIE_DMA64_MASK }, BHND_DMA_TRANSLATION_TABLE_END } Modified: head/sys/dev/bhnd/bhndb/bhndb_subr.c ============================================================================== --- head/sys/dev/bhnd/bhndb/bhndb_subr.c Sat Dec 16 00:47:45 2017 (r326892) +++ head/sys/dev/bhnd/bhndb/bhndb_subr.c Sat Dec 16 04:35:37 2017 (r326893) @@ -521,12 +521,12 @@ bhndb_dma_tag_create(device_t dev, bus_dma_tag_t paren { bus_dma_tag_t translation_tag; bhnd_addr_t dt_mask; - bus_addr_t boundary; bus_addr_t lowaddr, highaddr; + bus_size_t maxsegsz; int error; highaddr = BUS_SPACE_MAXADDR; - boundary = 0; + maxsegsz = BUS_SPACE_MAXSIZE; /* Determine full addressable mask */ dt_mask = (translation->addr_mask | translation->addrext_mask); @@ -536,19 +536,17 @@ bhndb_dma_tag_create(device_t dev, bus_dma_tag_t paren /* (addr_mask|addrext_mask) is our maximum supported address */ lowaddr = MIN(dt_mask, BUS_SPACE_MAXADDR); - /* Do we need to to avoid crossing a DMA translation window boundary? */ - if (translation->addr_mask < BUS_SPACE_MAXADDR) { - /* round down to nearest power of two */ - boundary = translation->addr_mask & (~1ULL); - } + /* Constrain to translation window size */ + if (translation->addr_mask < maxsegsz) + maxsegsz = translation->addr_mask; /* Create our DMA tag */ error = bus_dma_tag_create(parent_dmat, - 1, /* alignment */ - boundary, lowaddr, highaddr, + 1, 0, /* alignment, boundary */ + lowaddr, highaddr, NULL, NULL, /* filter, filterarg */ BUS_SPACE_MAXSIZE, 0, /* maxsize, nsegments */ - BUS_SPACE_MAXSIZE, 0, /* maxsegsize, flags */ + maxsegsz, 0, /* maxsegsize, flags */ NULL, NULL, /* lockfunc, lockarg */ &translation_tag); if (error) { From owner-svn-src-all@freebsd.org Sat Dec 16 05:22:17 2017 Return-Path: Delivered-To: svn-src-all@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 D9DA6E9DBA4; Sat, 16 Dec 2017 05:22:17 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D3837809B; Sat, 16 Dec 2017 05:22:17 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBG5MGAr098864; Sat, 16 Dec 2017 05:22:16 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBG5MGqO098863; Sat, 16 Dec 2017 05:22:16 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201712160522.vBG5MGqO098863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Sat, 16 Dec 2017 05:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326894 - head/sys/dev/bhnd/nvram X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: head/sys/dev/bhnd/nvram X-SVN-Commit-Revision: 326894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 05:22:18 -0000 Author: landonf Date: Sat Dec 16 05:22:16 2017 New Revision: 326894 URL: https://svnweb.freebsd.org/changeset/base/326894 Log: bhnd(4): Fix the pa0itssit/pa1itssit NVRAM variable type definitions required by bwn(4); idle TSSI target values are expressed as signed integers. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/bhnd/nvram/nvram_map Modified: head/sys/dev/bhnd/nvram/nvram_map ============================================================================== --- head/sys/dev/bhnd/nvram/nvram_map Sat Dec 16 04:35:37 2017 (r326893) +++ head/sys/dev/bhnd/nvram/nvram_map Sat Dec 16 05:22:16 2017 (r326894) @@ -785,7 +785,7 @@ i16 pa0b2 { #desc #help } -u8 pa0itssit { +i8 pa0itssit { fmt decimal #desc #help @@ -830,7 +830,7 @@ u8 pa1himaxpwr { #desc #help } -u8 pa1itssit { +i8 pa1itssit { fmt decimal #desc #help @@ -1880,8 +1880,8 @@ srom 1 { 0x06A: i16 pa1b0 0x06C: i16 pa1b1 0x06E: i16 pa1b2 - 0x070: u8 pa0itssit - 0x071: u8 pa1itssit + 0x070: i8 pa0itssit + 0x071: i8 pa1itssit 0x072: u16 boardflags 0x074: u8 ag0 0x075: u8 ag1 @@ -1945,8 +1945,8 @@ srom 2-3 { 0x06A: i16 pa1b0 0x06C: i16 pa1b1 0x06E: i16 pa1b2 - 0x070: u8 pa0itssit - 0x071: u8 pa1itssit + 0x070: i8 pa0itssit + 0x071: i8 pa1itssit srom 2 { 0x072: u32 boardflags { +0x0: u16 | @@ -2392,7 +2392,7 @@ srom 8 { } 0x0C0: u8 pa0maxpwr 0x0C0: u8 maxp2ga0 - 0x0C1: u8 pa0itssit + 0x0C1: i8 pa0itssit 0x0C1: u8 itt2ga0 0x0C2: i16 pa0b0 0x0C2: u16 pa2gw0a0 @@ -2403,7 +2403,7 @@ srom 8 { 0x0C8: u8 pa1maxpwr 0x0C8: u8 maxp5ga0[1] 0x0C9: u8 itt5ga0 - 0x0C9: u8 pa1itssit + 0x0C9: i8 pa1itssit 0x0CA: u8 maxp5gha0 0x0CA: u8 pa1himaxpwr 0x0CB: u8 maxp5gla0 @@ -2657,7 +2657,7 @@ srom 9-10 { 0x0C0: u8 pa0maxpwr 0x0C0: u8 maxp2ga0 0x0C1: u8 itt2ga0 - 0x0C1: u8 pa0itssit + 0x0C1: i8 pa0itssit 0x0C2: u16 pa2gw0a0 0x0C2: i16 pa0b0 0x0C4: i16 pa0b1 @@ -2667,7 +2667,7 @@ srom 9-10 { 0x0C8: u8 pa1maxpwr 0x0C8: u8 maxp5ga0[1] 0x0C9: u8 itt5ga0 - 0x0C9: u8 pa1itssit + 0x0C9: i8 pa1itssit 0x0CA: u8 pa1himaxpwr 0x0CA: u8 maxp5gha0 0x0CB: u8 maxp5gla0 From owner-svn-src-all@freebsd.org Sat Dec 16 07:04:27 2017 Return-Path: Delivered-To: svn-src-all@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 98BAAE9F805; Sat, 16 Dec 2017 07:04:27 +0000 (UTC) (envelope-from herbert@mailbox.org) Received: from mx1.mailbox.org (mx1.mailbox.org [80.241.60.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.mailbox.org", Issuer "SwissSign Server Silver CA 2014 - G22" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 561237A684; Sat, 16 Dec 2017 07:04:26 +0000 (UTC) (envelope-from herbert@mailbox.org) Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 80C0847191; Sat, 16 Dec 2017 07:57:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h= content-type:content-type:mime-version:references:in-reply-to :subject:subject:from:from:message-id:date:date:received; s= mail20150812; t=1513407452; bh=7DO3lUs+4Q/yvP39K0cFHkeN6F/D6kq5O Jw4MZXKVLg=; b=KxNnvoyxHuYb1bq7+M/Xa/Ud/aV09kthgoDWBazNc4jPgbZ0v Vdr5mKjgZvuEpQh8DHAE142SXjP4w/8J7SJTB8E9Sd1kOaWryeHFKOPuWDsgf27J U8YgZCvPTO6mxxbRLkKpMC6N3YPhTpyT6MLYZtrvKc+2h4uz0UCZXmccd+kfwgEA lee3ttI8pBP14DqlCnNmO7WVCDAgV+/MtJFKFDB62Jnysa3CNX0rEK6GwpC4PNXt tU08z/xUxMsyR4u36DGDtAkeD+ReD0AmIU8scMPRwXlnDRxJEAddeMyfMrYMNxow sXPI+KTKooVaGEExsqcS0yYPLC1ikrCgwW23g== X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id oT7YXqGbAsvu; Sat, 16 Dec 2017 07:57:32 +0100 (CET) Date: Sat, 16 Dec 2017 07:57:30 +0100 Message-ID: <871sjvgnxh.wl-herbert@mailbox.org> From: "Herbert J. Skuhra" To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r323304 - stable/11/share/man/man5 In-Reply-To: <201709080451.v884pGhH036463@repo.freebsd.org> References: <201709080451.v884pGhH036463@repo.freebsd.org> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 07:04:27 -0000 On Fri, 08 Sep 2017 06:51:16 +0200, Ngie Cooper wrote: > > Author: ngie > Date: Fri Sep 8 04:51:16 2017 > New Revision: 323304 > URL: https://svnweb.freebsd.org/changeset/base/323304 > > Log: > Regenerate src.conf(5) based on recent changes to src.opts.mk, etc. > > Modified: > stable/11/share/man/man5/src.conf.5 > > Modified: stable/11/share/man/man5/src.conf.5 > ============================================================================== > --- stable/11/share/man/man5/src.conf.5 Fri Sep 8 04:48:25 2017 (r323303) > +++ stable/11/share/man/man5/src.conf.5 Fri Sep 8 04:51:16 2017 (r323304) > @@ -1,6 +1,6 @@ > .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. > .\" $FreeBSD$ > -.Dd August 16, 2017 > +.Dd September 7, 2017 > .Dt SRC.CONF 5 > .Os > .Sh NAME > @@ -1150,6 +1150,12 @@ and remove > entries. > .It Va WITHOUT_NLS > Set to not build NLS catalogs. > +When set, it enforces these options: > +.Pp > +.Bl -item -compact > +.It > +.Va WITHOUT_NLS_CATALOGS > +.El > .It Va WITHOUT_NLS_CATALOGS > Set to not build NLS catalog support for > .Xr csh 1 . > @@ -1237,6 +1243,42 @@ and related files. > Set to not build > .Xr ppp 8 > and related programs. > +.It Va WITHOUT_PROFILE > +Set to not build profiled libraries for use with > +.Xr gprof 8 . > +.Pp > +This is a default setting on > +mips/mips64el and mips/mips64. > +.It Va WITH_PROFILE > +Set to build profiled libraries for use with > +.Xr gprof 8 . > +.Pp > +This is a default setting on > +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. > +.It Va WITHOUT_PROFILE > +Set to not build profiled libraries for use with > +.Xr gprof 8 . > +.Pp > +This is a default setting on > +mips/mips64el. > +.It Va WITH_PROFILE > +Set to build profiled libraries for use with > +.Xr gprof 8 . > +.Pp > +This is a default setting on > +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. > +.It Va WITHOUT_PROFILE > +Set to not build profiled libraries for use with > +.Xr gprof 8 . > +.Pp > +This is a default setting on > +mips/mips64. > +.It Va WITH_PROFILE > +Set to build profiled libraries for use with > +.Xr gprof 8 . > +.Pp > +This is a default setting on > +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. > .It Va WITHOUT_PROFILE > Set to not build profiled libraries for use with > .Xr gprof 8 . Here something went wrong: multiple (WITH|WITHOUT)_PROFILE entries. -- Herbert From owner-svn-src-all@freebsd.org Sat Dec 16 11:49:32 2017 Return-Path: Delivered-To: svn-src-all@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 38E8CEA4C19; Sat, 16 Dec 2017 11:49:32 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0578C1B55; Sat, 16 Dec 2017 11:49:31 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGBnVsL057225; Sat, 16 Dec 2017 11:49:31 GMT (envelope-from schweikh@FreeBSD.org) Received: (from schweikh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGBnV2d057224; Sat, 16 Dec 2017 11:49:31 GMT (envelope-from schweikh@FreeBSD.org) Message-Id: <201712161149.vBGBnV2d057224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: schweikh set sender to schweikh@FreeBSD.org using -f From: Jens Schweikhardt Date: Sat, 16 Dec 2017 11:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326895 - head X-SVN-Group: head X-SVN-Commit-Author: schweikh X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 326895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 11:49:32 -0000 Author: schweikh Date: Sat Dec 16 11:49:30 2017 New Revision: 326895 URL: https://svnweb.freebsd.org/changeset/base/326895 Log: Correct a typo; remove white space at EOL. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Dec 16 05:22:16 2017 (r326894) +++ head/UPDATING Sat Dec 16 11:49:30 2017 (r326895) @@ -58,7 +58,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: 20171214: r362593 broke ZFS + GELI support for reasons unknown. However, it also broke ZFS support generally, so GELI has been turned off - by default as the lessor evil in r326857. If you boot off ZFS and/or + by default as the lesser evil in r326857. If you boot off ZFS and/or GELI, it might not be a good time to update. 20171125: @@ -280,7 +280,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: full procedure documented below under the heading "To rebuild everything and install it on the current system." Specifically, a reboot is required after installing the new kernel before - installing world. + installing world. 20170424: The NATM framework including the en(4), fatm(4), hatm(4), and From owner-svn-src-all@freebsd.org Sat Dec 16 12:24:00 2017 Return-Path: Delivered-To: svn-src-all@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 8B145E811FA; Sat, 16 Dec 2017 12:24:00 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 582742FF6; Sat, 16 Dec 2017 12:24:00 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGCNxAA073620; Sat, 16 Dec 2017 12:23:59 GMT (envelope-from schweikh@FreeBSD.org) Received: (from schweikh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGCNxaO073619; Sat, 16 Dec 2017 12:23:59 GMT (envelope-from schweikh@FreeBSD.org) Message-Id: <201712161223.vBGCNxaO073619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: schweikh set sender to schweikh@FreeBSD.org using -f From: Jens Schweikhardt Date: Sat, 16 Dec 2017 12:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326896 - head/share/examples/etc X-SVN-Group: head X-SVN-Commit-Author: schweikh X-SVN-Commit-Paths: head/share/examples/etc X-SVN-Commit-Revision: 326896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 12:24:00 -0000 Author: schweikh Date: Sat Dec 16 12:23:59 2017 New Revision: 326896 URL: https://svnweb.freebsd.org/changeset/base/326896 Log: Remove white space at EOL. Modified: head/share/examples/etc/make.conf Modified: head/share/examples/etc/make.conf ============================================================================== --- head/share/examples/etc/make.conf Sat Dec 16 11:49:30 2017 (r326895) +++ head/share/examples/etc/make.conf Sat Dec 16 12:23:59 2017 (r326896) @@ -59,11 +59,11 @@ # nonstandard optimization settings # before submitting bug reports without patches to the developers. # -# CFLAGS.arch provides a mechanism for applying CFLAGS only when building -# the given architecture. This is useful primarily on a system used for -# cross-building, when you have a set of flags to apply to the TARGET_ARCH -# being cross-built but don't want those settings applied to building the -# cross-tools or other components that run on the build host machine. +# CFLAGS.arch provides a mechanism for applying CFLAGS only when building +# the given architecture. This is useful primarily on a system used for +# cross-building, when you have a set of flags to apply to the TARGET_ARCH +# being cross-built but don't want those settings applied to building the +# cross-tools or other components that run on the build host machine. # # CXXFLAGS controls the compiler settings used when compiling C++ code. # Note that CXXFLAGS is initially set to the value of CFLAGS. If you wish From owner-svn-src-all@freebsd.org Sat Dec 16 14:26:12 2017 Return-Path: Delivered-To: svn-src-all@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 66E72E83CE3; Sat, 16 Dec 2017 14:26:12 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EFD365AC8; Sat, 16 Dec 2017 14:26:12 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGEQBYA023872; Sat, 16 Dec 2017 14:26:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGEQBBt023871; Sat, 16 Dec 2017 14:26:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712161426.vBGEQBBt023871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 16 Dec 2017 14:26:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326897 - head/contrib/llvm/tools/lld/ELF X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/llvm/tools/lld/ELF X-SVN-Commit-Revision: 326897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:26:12 -0000 Author: emaste Date: Sat Dec 16 14:26:11 2017 New Revision: 326897 URL: https://svnweb.freebsd.org/changeset/base/326897 Log: lld: Slightly simplify code and add comment. Cherry-pick lld r315658 by Rui Ueyama: This is not a mechanical transformation. Even though I believe this patch is correct, I'm not 100% sure if lld with this patch behaves exactly the same way as before on all edge cases. At least all tests still pass. I'm submitting this patch because it took almost a day to understand this function, and I don't want to lose it. This fixes jemalloc assertion failures observed at startup with i386 binaries and an lld-linked libc.so. Reviewed by: dim Obtained from: LLVM r315658 MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13503 Modified: head/contrib/llvm/tools/lld/ELF/Relocations.cpp Modified: head/contrib/llvm/tools/lld/ELF/Relocations.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/Relocations.cpp Sat Dec 16 12:23:59 2017 (r326896) +++ head/contrib/llvm/tools/lld/ELF/Relocations.cpp Sat Dec 16 14:26:11 2017 (r326897) @@ -790,13 +790,31 @@ static void addGotEntry(SymbolBody &Sym, bool Preempti DynType = Target->GotRel; } - bool Constant = !Preemptible && (!Config->Pic || isAbsolute(Sym)); - if (!Constant) + // If a GOT slot value can be calculated at link-time, which is now, + // we can just fill that out. + // + // (We don't actually write a value to a GOT slot right now, but we + // add a static relocation to a Relocations vector so that + // InputSection::relocate will do the work for us. We may be able + // to just write a value now, but it is a TODO.) + bool IsLinkTimeConstant = !Preemptible && (!Config->Pic || isAbsolute(Sym)); + if (IsLinkTimeConstant) { + InX::Got->Relocations.push_back({Expr, DynType, Off, 0, &Sym}); + } else { + // Otherwise, we emit a dynamic relocation to .rel[a].dyn so that + // the GOT slot will be fixed at load-time. In::RelaDyn->addReloc( {DynType, InX::Got, Off, !Preemptible, &Sym, 0}); - if (Constant || (!Config->IsRela && !Preemptible)) - InX::Got->Relocations.push_back({Expr, DynType, Off, 0, &Sym}); + // REL type relocations don't have addend fields unlike RELAs, and + // their addends are stored to the section to which they are applied. + // So, store addends if we need to. + // + // This is ugly -- the difference between REL and RELA should be + // handled in a better way. It's a TODO. + if (!Config->IsRela) + InX::Got->Relocations.push_back({R_ABS, Target->GotRel, Off, 0, &Sym}); + } } // The reason we have to do this early scan is as follows From owner-svn-src-all@freebsd.org Sat Dec 16 14:36:22 2017 Return-Path: Delivered-To: svn-src-all@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 8D139E840C8; Sat, 16 Dec 2017 14:36:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D3446605D; Sat, 16 Dec 2017 14:36:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGEaLuS028088; Sat, 16 Dec 2017 14:36:21 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGEaLUg028087; Sat, 16 Dec 2017 14:36:21 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201712161436.vBGEaLUg028087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 16 Dec 2017 14:36:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326898 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 326898 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:36:22 -0000 Author: ae Date: Sat Dec 16 14:36:21 2017 New Revision: 326898 URL: https://svnweb.freebsd.org/changeset/base/326898 Log: Fix possible memory leak. vxlan_ftable entries are sorted in ascending order, due to wrong arguments order it is possible to stop search before existing element will be found. Then new element will be allocated in vxlan_ftable_update_locked() and can be inserted in the list second time or trigger MPASS() assertion with enabled INVARIANTS. PR: 224371 MFC after: 1 week Modified: head/sys/net/if_vxlan.c Modified: head/sys/net/if_vxlan.c ============================================================================== --- head/sys/net/if_vxlan.c Sat Dec 16 14:26:11 2017 (r326897) +++ head/sys/net/if_vxlan.c Sat Dec 16 14:36:21 2017 (r326898) @@ -782,7 +782,7 @@ vxlan_ftable_entry_lookup(struct vxlan_softc *sc, cons hash = VXLAN_SC_FTABLE_HASH(sc, mac); LIST_FOREACH(fe, &sc->vxl_ftable[hash], vxlfe_hash) { - dir = vxlan_ftable_addr_cmp(fe->vxlfe_mac, mac); + dir = vxlan_ftable_addr_cmp(mac, fe->vxlfe_mac); if (dir == 0) return (fe); if (dir > 0) From owner-svn-src-all@freebsd.org Sat Dec 16 14:44:37 2017 Return-Path: Delivered-To: svn-src-all@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 7F37CE8471B; Sat, 16 Dec 2017 14:44:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50CF5666A3; Sat, 16 Dec 2017 14:44:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGEiasi032326; Sat, 16 Dec 2017 14:44:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGEiZXM032321; Sat, 16 Dec 2017 14:44:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712161444.vBGEiZXM032321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Dec 2017 14:44:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326899 - in vendor/llvm/dist: lib/Target/BPF lib/Transforms/Scalar test/CodeGen/BPF test/Transforms/NewGVN X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm/dist: lib/Target/BPF lib/Transforms/Scalar test/CodeGen/BPF test/Transforms/NewGVN X-SVN-Commit-Revision: 326899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:44:37 -0000 Author: dim Date: Sat Dec 16 14:44:35 2017 New Revision: 326899 URL: https://svnweb.freebsd.org/changeset/base/326899 Log: Vendor import of llvm 5.0.1 release r320880: https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_501/final@320880 Added: vendor/llvm/dist/test/Transforms/NewGVN/pr34452.ll Modified: vendor/llvm/dist/lib/Target/BPF/BPFISelLowering.cpp vendor/llvm/dist/lib/Target/BPF/BPFInstrInfo.td vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/test/CodeGen/BPF/select_ri.ll Modified: vendor/llvm/dist/lib/Target/BPF/BPFISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/BPF/BPFISelLowering.cpp Sat Dec 16 14:36:21 2017 (r326898) +++ vendor/llvm/dist/lib/Target/BPF/BPFISelLowering.cpp Sat Dec 16 14:44:35 2017 (r326899) @@ -578,11 +578,15 @@ BPFTargetLowering::EmitInstrWithCustomInserter(Machine .addReg(LHS) .addReg(MI.getOperand(2).getReg()) .addMBB(Copy1MBB); - else + else { + int64_t imm32 = MI.getOperand(2).getImm(); + // sanity check before we build J*_ri instruction. + assert (isInt<32>(imm32)); BuildMI(BB, DL, TII.get(NewCC)) .addReg(LHS) - .addImm(MI.getOperand(2).getImm()) + .addImm(imm32) .addMBB(Copy1MBB); + } // Copy0MBB: // %FalseValue = ... Modified: vendor/llvm/dist/lib/Target/BPF/BPFInstrInfo.td ============================================================================== --- vendor/llvm/dist/lib/Target/BPF/BPFInstrInfo.td Sat Dec 16 14:36:21 2017 (r326898) +++ vendor/llvm/dist/lib/Target/BPF/BPFInstrInfo.td Sat Dec 16 14:44:35 2017 (r326899) @@ -464,7 +464,7 @@ let usesCustomInserter = 1 in { (ins GPR:$lhs, i64imm:$rhs, i64imm:$imm, GPR:$src, GPR:$src2), "# Select PSEUDO $dst = $lhs $imm $rhs ? $src : $src2", [(set i64:$dst, - (BPFselectcc i64:$lhs, (i64 imm:$rhs), (i64 imm:$imm), i64:$src, i64:$src2))]>; + (BPFselectcc i64:$lhs, (i64 i64immSExt32:$rhs), (i64 imm:$imm), i64:$src, i64:$src2))]>; } // load 64-bit global addr into register Modified: vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp Sat Dec 16 14:36:21 2017 (r326898) +++ vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp Sat Dec 16 14:44:35 2017 (r326899) @@ -586,8 +586,8 @@ class NewGVN { (public) private: // Expression handling. const Expression *createExpression(Instruction *) const; - const Expression *createBinaryExpression(unsigned, Type *, Value *, - Value *) const; + const Expression *createBinaryExpression(unsigned, Type *, Value *, Value *, + Instruction *) const; PHIExpression *createPHIExpression(Instruction *, bool &HasBackEdge, bool &OriginalOpsConstant) const; const DeadExpression *createDeadExpression() const; @@ -902,8 +902,8 @@ bool NewGVN::setBasicExpressionInfo(Instruction *I, Ba } const Expression *NewGVN::createBinaryExpression(unsigned Opcode, Type *T, - Value *Arg1, - Value *Arg2) const { + Value *Arg1, Value *Arg2, + Instruction *I) const { auto *E = new (ExpressionAllocator) BasicExpression(2); E->setType(T); @@ -921,7 +921,7 @@ const Expression *NewGVN::createBinaryExpression(unsig E->op_push_back(lookupOperandLeader(Arg2)); Value *V = SimplifyBinOp(Opcode, E->getOperand(0), E->getOperand(1), SQ); - if (const Expression *SimplifiedE = checkSimplificationResults(E, nullptr, V)) + if (const Expression *SimplifiedE = checkSimplificationResults(E, I, V)) return SimplifiedE; return E; } @@ -1699,8 +1699,9 @@ NewGVN::performSymbolicAggrValueEvaluation(Instruction // expression. assert(II->getNumArgOperands() == 2 && "Expect two args for recognised intrinsics."); - return createBinaryExpression( - Opcode, EI->getType(), II->getArgOperand(0), II->getArgOperand(1)); + return createBinaryExpression(Opcode, EI->getType(), + II->getArgOperand(0), + II->getArgOperand(1), I); } } } @@ -1933,6 +1934,7 @@ void NewGVN::touchAndErase(Map &M, const KeyType &Key) } void NewGVN::addAdditionalUsers(Value *To, Value *User) const { + assert(User && To != User); if (isa(To)) AdditionalUsers[To].insert(User); } Modified: vendor/llvm/dist/test/CodeGen/BPF/select_ri.ll ============================================================================== --- vendor/llvm/dist/test/CodeGen/BPF/select_ri.ll Sat Dec 16 14:36:21 2017 (r326898) +++ vendor/llvm/dist/test/CodeGen/BPF/select_ri.ll Sat Dec 16 14:44:35 2017 (r326899) @@ -25,3 +25,38 @@ entry: } attributes #0 = { norecurse nounwind readonly } + +; test immediate out of 32-bit range +; Source file: + +; unsigned long long +; load_word(void *buf, unsigned long long off) +; asm("llvm.bpf.load.word"); +; +; int +; foo(void *buf) +; { +; unsigned long long sum = 0; +; +; sum += load_word(buf, 100); +; sum += load_word(buf, 104); +; +; if (sum != 0x1ffffffffULL) +; return ~0U; +; +; return 0; +;} + +; Function Attrs: nounwind readonly +define i32 @foo(i8*) local_unnamed_addr #0 { + %2 = tail call i64 @llvm.bpf.load.word(i8* %0, i64 100) + %3 = tail call i64 @llvm.bpf.load.word(i8* %0, i64 104) + %4 = add i64 %3, %2 + %5 = icmp ne i64 %4, 8589934591 +; CHECK: r{{[0-9]+}} = 8589934591ll + %6 = sext i1 %5 to i32 + ret i32 %6 +} + +; Function Attrs: nounwind readonly +declare i64 @llvm.bpf.load.word(i8*, i64) #1 Added: vendor/llvm/dist/test/Transforms/NewGVN/pr34452.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/Transforms/NewGVN/pr34452.ll Sat Dec 16 14:44:35 2017 (r326899) @@ -0,0 +1,49 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt -newgvn -S < %s | FileCheck %s +;; Ensure we don't crash when simplifying aggregate value expressions +source_filename = "bugpoint-output-09f7a24.bc" + +@WHOLELINE = external local_unnamed_addr global i32, align 4 + +; Function Attrs: nounwind uwtable +define void @sgrep() local_unnamed_addr #0 { +; CHECK-LABEL: @sgrep( +; CHECK-NEXT: entry: +; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* @WHOLELINE, align 4, !tbaa !1 +; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[TMP0]], 0 +; CHECK-NEXT: [[DOT:%.*]] = select i1 [[TOBOOL]], i32 2048, i32 2047 +; CHECK-NEXT: br label [[WHILE_BODY_US:%.*]] +; CHECK: while.body.us: +; CHECK-NEXT: [[START_1230_US:%.*]] = phi i32 [ [[DOT]], [[ENTRY:%.*]] ], [ 0, [[WHILE_BODY_US]] ] +; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[START_1230_US]] to i64 +; CHECK-NEXT: [[TMP2:%.*]] = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 0, i64 [[TMP1]]) +; CHECK-NEXT: br label [[WHILE_BODY_US]] +; +entry: + %0 = load i32, i32* @WHOLELINE, align 4, !tbaa !1 + %tobool = icmp eq i32 %0, 0 + %. = select i1 %tobool, i32 2048, i32 2047 + br label %while.body.us + +while.body.us: ; preds = %while.body.us, %entry + %start.1230.us = phi i32 [ %., %entry ], [ 0, %while.body.us ] + %1 = sext i32 %start.1230.us to i64 + %2 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 0, i64 %1) + %.res302 = extractvalue { i64, i1 } %2, 0 + %3 = icmp sge i64 undef, %.res302 + br label %while.body.us +} + +; Function Attrs: nounwind readnone speculatable +declare { i64, i1 } @llvm.sadd.with.overflow.i64(i64, i64) #1 + +attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "polly-optimized" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #1 = { nounwind readnone speculatable } + +!llvm.ident = !{!0} + +!0 = !{!"clang version 6.0.0 (trunk 311664) (llvm/trunk 311666)"} +!1 = !{!2, !2, i64 0} +!2 = !{!"int", !3, i64 0} +!3 = !{!"omnipotent char", !4, i64 0} +!4 = !{!"Simple C/C++ TBAA"} From owner-svn-src-all@freebsd.org Sat Dec 16 14:44:40 2017 Return-Path: Delivered-To: svn-src-all@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 6D1A9E84734; Sat, 16 Dec 2017 14:44:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 375A2666A6; Sat, 16 Dec 2017 14:44:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGEidGD032372; Sat, 16 Dec 2017 14:44:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGEid5D032371; Sat, 16 Dec 2017 14:44:39 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712161444.vBGEid5D032371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Dec 2017 14:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326900 - vendor/llvm/llvm-release_501-r320880 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-release_501-r320880 X-SVN-Commit-Revision: 326900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:44:40 -0000 Author: dim Date: Sat Dec 16 14:44:39 2017 New Revision: 326900 URL: https://svnweb.freebsd.org/changeset/base/326900 Log: Tag llvm 5.0.1 release r320880. Added: vendor/llvm/llvm-release_501-r320880/ - copied from r326899, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Sat Dec 16 14:45:39 2017 Return-Path: Delivered-To: svn-src-all@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 12406E84817; Sat, 16 Dec 2017 14:45:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE5E266900; Sat, 16 Dec 2017 14:45:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGEjbp0032460; Sat, 16 Dec 2017 14:45:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGEjbhg032455; Sat, 16 Dec 2017 14:45:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712161445.vBGEjbhg032455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Dec 2017 14:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326901 - in vendor/clang/dist: lib/Basic lib/Sema test/SemaCXX X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/clang/dist: lib/Basic lib/Sema test/SemaCXX X-SVN-Commit-Revision: 326901 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:45:39 -0000 Author: dim Date: Sat Dec 16 14:45:37 2017 New Revision: 326901 URL: https://svnweb.freebsd.org/changeset/base/326901 Log: Vendor import of clang 5.0.1 release r320880: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_501/final@320880 Modified: vendor/clang/dist/lib/Basic/Version.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/test/SemaCXX/unused.cpp Modified: vendor/clang/dist/lib/Basic/Version.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Version.cpp Sat Dec 16 14:44:39 2017 (r326900) +++ vendor/clang/dist/lib/Basic/Version.cpp Sat Dec 16 14:45:37 2017 (r326901) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_50/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_501/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Dec 16 14:44:39 2017 (r326900) +++ vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Dec 16 14:45:37 2017 (r326901) @@ -1603,7 +1603,24 @@ static bool ShouldDiagnoseUnusedDecl(const NamedDecl * if (D->isInvalidDecl()) return false; - if (D->isReferenced() || D->isUsed() || D->hasAttr() || + bool Referenced = false; + if (auto *DD = dyn_cast(D)) { + // For a decomposition declaration, warn if none of the bindings are + // referenced, instead of if the variable itself is referenced (which + // it is, by the bindings' expressions). + for (auto *BD : DD->bindings()) { + if (BD->isReferenced()) { + Referenced = true; + break; + } + } + } else if (!D->getDeclName()) { + return false; + } else if (D->isReferenced() || D->isUsed()) { + Referenced = true; + } + + if (Referenced || D->hasAttr() || D->hasAttr()) return false; @@ -1726,7 +1743,7 @@ void Sema::DiagnoseUnusedDecl(const NamedDecl *D) { else DiagID = diag::warn_unused_variable; - Diag(D->getLocation(), DiagID) << D->getDeclName() << Hint; + Diag(D->getLocation(), DiagID) << D << Hint; } static void CheckPoppedLabel(LabelDecl *L, Sema &S) { @@ -1756,8 +1773,6 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) assert(isa(TmpD) && "Decl isn't NamedDecl?"); NamedDecl *D = cast(TmpD); - if (!D->getDeclName()) continue; - // Diagnose unused variables in this scope. if (!S->hasUnrecoverableErrorOccurred()) { DiagnoseUnusedDecl(D); @@ -1765,6 +1780,8 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) DiagnoseUnusedNestedTypedefs(RD); } + if (!D->getDeclName()) continue; + // If this was a forward reference to a label, verify it was defined. if (LabelDecl *LD = dyn_cast(D)) CheckPoppedLabel(LD, *this); @@ -6155,7 +6172,6 @@ NamedDecl *Sema::ActOnVariableDeclarator( IdentifierInfo *II = Name.getAsIdentifierInfo(); if (D.isDecompositionDeclarator()) { - AddToScope = false; // Take the name of the first declarator as our name for diagnostic // purposes. auto &Decomp = D.getDecompositionDeclarator(); Modified: vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp Sat Dec 16 14:44:39 2017 (r326900) +++ vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp Sat Dec 16 14:45:37 2017 (r326901) @@ -826,7 +826,10 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarato NamedDecl *New = ActOnVariableDeclarator(S, D, DC, TInfo, Previous, MultiTemplateParamsArg(), AddToScope, Bindings); - CurContext->addHiddenDecl(New); + if (AddToScope) { + S->AddDecl(New); + CurContext->addHiddenDecl(New); + } if (isInOpenMPDeclareTargetContext()) checkDeclIsAllowedInOpenMPTarget(nullptr, New); Modified: vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp Sat Dec 16 14:44:39 2017 (r326900) +++ vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp Sat Dec 16 14:45:37 2017 (r326901) @@ -677,6 +677,7 @@ TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(T Decl *TemplateDeclInstantiator::VisitBindingDecl(BindingDecl *D) { auto *NewBD = BindingDecl::Create(SemaRef.Context, Owner, D->getLocation(), D->getIdentifier()); + NewBD->setReferenced(D->isReferenced()); SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, NewBD); return NewBD; } Modified: vendor/clang/dist/test/SemaCXX/unused.cpp ============================================================================== --- vendor/clang/dist/test/SemaCXX/unused.cpp Sat Dec 16 14:44:39 2017 (r326900) +++ vendor/clang/dist/test/SemaCXX/unused.cpp Sat Dec 16 14:45:37 2017 (r326901) @@ -1,6 +1,7 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wunused %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 -Wunused %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wunused %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 -Wunused %s // PR4103 : Make sure we don't get a bogus unused expression warning namespace PR4103 { @@ -8,7 +9,7 @@ namespace PR4103 { char foo; }; class APSInt : public APInt { - char bar; + char bar; // expected-warning {{private field 'bar' is not used}} public: APSInt &operator=(const APSInt &RHS); }; @@ -69,3 +70,44 @@ namespace UnresolvedLookup { } }; } + +#if __cplusplus >= 201703L +namespace PR33839 { + void a() { + struct X { int a, b; } x; + auto [a, b] = x; // expected-warning {{unused variable '[a, b]'}} + auto [c, d] = x; + (void)d; + } + + template void f() { + struct A { int n; } a[1]; + for (auto [x] : a) { + (void)x; + } + auto [y] = a[0]; // expected-warning {{unused}} + } + template void g() { + struct A { int n; } a[1]; + for (auto [x] : a) { + if constexpr (b) + (void)x; + } + + auto [y] = a[0]; + if constexpr (b) + (void)y; // ok, even when b == false + } + template void h() { + struct A { int n; } a[1]; + for (auto [x] : a) { // expected-warning {{unused variable '[x]'}} + } + } + void use() { + f(); // expected-note {{instantiation of}} + g(); + g(); + h(); // expected-note {{instantiation of}} + } +} +#endif From owner-svn-src-all@freebsd.org Sat Dec 16 14:45:42 2017 Return-Path: Delivered-To: svn-src-all@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 93A0DE84837; Sat, 16 Dec 2017 14:45:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E16C66909; Sat, 16 Dec 2017 14:45:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGEjfXR032506; Sat, 16 Dec 2017 14:45:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGEjfHc032505; Sat, 16 Dec 2017 14:45:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712161445.vBGEjfHc032505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Dec 2017 14:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326902 - vendor/clang/clang-release_501-r320880 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-release_501-r320880 X-SVN-Commit-Revision: 326902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:45:42 -0000 Author: dim Date: Sat Dec 16 14:45:41 2017 New Revision: 326902 URL: https://svnweb.freebsd.org/changeset/base/326902 Log: Tag clang 5.0.1 release r320880. Added: vendor/clang/clang-release_501-r320880/ - copied from r326901, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Sat Dec 16 14:46:00 2017 Return-Path: Delivered-To: svn-src-all@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 935DCE84899; Sat, 16 Dec 2017 14:46:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D30366B38; Sat, 16 Dec 2017 14:46:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGEjxmi032561; Sat, 16 Dec 2017 14:45:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGEjxX8032560; Sat, 16 Dec 2017 14:45:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712161445.vBGEjxX8032560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Dec 2017 14:45:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326903 - vendor/compiler-rt/compiler-rt-release_501-r320880 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-release_501-r320880 X-SVN-Commit-Revision: 326903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:46:00 -0000 Author: dim Date: Sat Dec 16 14:45:59 2017 New Revision: 326903 URL: https://svnweb.freebsd.org/changeset/base/326903 Log: Tag compiler-rt 5.0.1 release r320880. Added: vendor/compiler-rt/compiler-rt-release_501-r320880/ - copied from r326902, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Sat Dec 16 14:46:25 2017 Return-Path: Delivered-To: svn-src-all@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 D2C70E84907; Sat, 16 Dec 2017 14:46:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D33E66C6F; Sat, 16 Dec 2017 14:46:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGEkOOJ032622; Sat, 16 Dec 2017 14:46:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGEkOlm032621; Sat, 16 Dec 2017 14:46:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712161446.vBGEkOlm032621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Dec 2017 14:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326904 - vendor/libc++/libc++-release_501-r320880 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-release_501-r320880 X-SVN-Commit-Revision: 326904 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:46:25 -0000 Author: dim Date: Sat Dec 16 14:46:24 2017 New Revision: 326904 URL: https://svnweb.freebsd.org/changeset/base/326904 Log: Tag libc++ 5.0.1 release r320880. Added: vendor/libc++/libc++-release_501-r320880/ - copied from r326903, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Sat Dec 16 14:46:40 2017 Return-Path: Delivered-To: svn-src-all@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 9B8CEE8494A; Sat, 16 Dec 2017 14:46:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AC6C66D8C; Sat, 16 Dec 2017 14:46:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGEkd9w032680; Sat, 16 Dec 2017 14:46:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGEkc5t032673; Sat, 16 Dec 2017 14:46:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712161446.vBGEkc5t032673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Dec 2017 14:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326905 - in vendor/lld/dist: lib/ReaderWriter/MachO test/mach-o X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lld/dist: lib/ReaderWriter/MachO test/mach-o X-SVN-Commit-Revision: 326905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:46:40 -0000 Author: dim Date: Sat Dec 16 14:46:38 2017 New Revision: 326905 URL: https://svnweb.freebsd.org/changeset/base/326905 Log: Vendor import of lld 5.0.1 release r320880: https://llvm.org/svn/llvm-project/lld/tags/RELEASE_501/final@320880 Modified: vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler.h vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm.cpp vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86.cpp vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp vendor/lld/dist/test/mach-o/lazy-bind-x86_64.yaml Modified: vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler.h ============================================================================== --- vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler.h Sat Dec 16 14:46:24 2017 (r326904) +++ vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler.h Sat Dec 16 14:46:38 2017 (r326905) @@ -112,6 +112,10 @@ class ArchHandler { (public) /// info in final executables. virtual bool isLazyPointer(const Reference &); + /// Reference from an __stub_helper entry to the required offset of the + /// lazy bind commands. + virtual Reference::KindValue lazyImmediateLocationKind() = 0; + /// Returns true if the specified relocation is paired to the next relocation. virtual bool isPairedReloc(const normalized::Relocation &) = 0; Modified: vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm.cpp ============================================================================== --- vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm.cpp Sat Dec 16 14:46:24 2017 (r326904) +++ vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm.cpp Sat Dec 16 14:46:38 2017 (r326905) @@ -67,6 +67,10 @@ class ArchHandler_arm : public ArchHandler { (public) return invalid; } + Reference::KindValue lazyImmediateLocationKind() override { + return lazyImmediateLocation; + } + Reference::KindValue pointerKind() override { return invalid; } Modified: vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp ============================================================================== --- vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp Sat Dec 16 14:46:24 2017 (r326904) +++ vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp Sat Dec 16 14:46:38 2017 (r326905) @@ -127,6 +127,10 @@ class ArchHandler_arm64 : public ArchHandler { (public return pointer64; } + Reference::KindValue lazyImmediateLocationKind() override { + return lazyImmediateLocation; + } + uint32_t dwarfCompactUnwindType() override { return 0x03000000; } Modified: vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86.cpp ============================================================================== --- vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86.cpp Sat Dec 16 14:46:24 2017 (r326904) +++ vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86.cpp Sat Dec 16 14:46:38 2017 (r326905) @@ -70,6 +70,10 @@ class ArchHandler_x86 : public ArchHandler { (public) return delta32; } + Reference::KindValue lazyImmediateLocationKind() override { + return lazyImmediateLocation; + } + Reference::KindValue unwindRefToEhFrameKind() override { return invalid; } Modified: vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp ============================================================================== --- vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp Sat Dec 16 14:46:24 2017 (r326904) +++ vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp Sat Dec 16 14:46:38 2017 (r326905) @@ -116,6 +116,10 @@ class ArchHandler_x86_64 : public ArchHandler { (publi return unwindFDEToFunction; } + Reference::KindValue lazyImmediateLocationKind() override { + return lazyImmediateLocation; + } + Reference::KindValue unwindRefToEhFrameKind() override { return unwindInfoToEhFrame; } Modified: vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp ============================================================================== --- vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp Sat Dec 16 14:46:24 2017 (r326904) +++ vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp Sat Dec 16 14:46:38 2017 (r326905) @@ -172,6 +172,8 @@ class Util { (private) SymbolScope &symbolScope); void appendSection(SectionInfo *si, NormalizedFile &file); uint32_t sectionIndexForAtom(const Atom *atom); + void fixLazyReferenceImm(const DefinedAtom *atom, uint32_t offset, + NormalizedFile &file); typedef llvm::DenseMap AtomToIndex; struct AtomAndIndex { const Atom *atom; uint32_t index; SymbolScope scope; }; @@ -1423,6 +1425,8 @@ void Util::addRebaseAndBindingInfo(const lld::File &at uint8_t segmentIndex; uint64_t segmentStartAddr; + uint32_t offsetInBindInfo = 0; + for (SectionInfo *sect : _sectionInfos) { segIndexForSection(sect, segmentIndex, segmentStartAddr); for (const AtomInfo &info : sect->atomsAndOffsets) { @@ -1467,6 +1471,59 @@ void Util::addRebaseAndBindingInfo(const lld::File &at bind.symbolName = targ->name(); bind.addend = ref->addend(); nFile.lazyBindingInfo.push_back(bind); + + // Now that we know the segmentOffset and the ordinal attribute, + // we can fix the helper's code + + fixLazyReferenceImm(atom, offsetInBindInfo, nFile); + + // 5 bytes for opcodes + variable sizes (target name + \0 and offset + // encode's size) + offsetInBindInfo += + 6 + targ->name().size() + llvm::getULEB128Size(bind.segOffset); + if (bind.ordinal > BIND_IMMEDIATE_MASK) + offsetInBindInfo += llvm::getULEB128Size(bind.ordinal); + } + } + } + } +} + +void Util::fixLazyReferenceImm(const DefinedAtom *atom, uint32_t offset, + NormalizedFile &file) { + for (const auto &ref : *atom) { + const DefinedAtom *da = dyn_cast(ref->target()); + if (da == nullptr) + return; + + const Reference *helperRef = nullptr; + for (const Reference *hr : *da) { + if (hr->kindValue() == _archHandler.lazyImmediateLocationKind()) { + helperRef = hr; + break; + } + } + if (helperRef == nullptr) + continue; + + // TODO: maybe get the fixed atom content from _archHandler ? + for (SectionInfo *sectInfo : _sectionInfos) { + for (const AtomInfo &atomInfo : sectInfo->atomsAndOffsets) { + if (atomInfo.atom == helperRef->target()) { + auto sectionContent = + file.sections[sectInfo->normalizedSectionIndex].content; + uint8_t *rawb = + file.ownedAllocations.Allocate(sectionContent.size()); + llvm::MutableArrayRef newContent{rawb, + sectionContent.size()}; + std::copy(sectionContent.begin(), sectionContent.end(), + newContent.begin()); + llvm::support::ulittle32_t *loc = + reinterpret_cast( + &newContent[atomInfo.offsetInSection + + helperRef->offsetInAtom()]); + *loc = offset; + file.sections[sectInfo->normalizedSectionIndex].content = newContent; } } } Modified: vendor/lld/dist/test/mach-o/lazy-bind-x86_64.yaml ============================================================================== --- vendor/lld/dist/test/mach-o/lazy-bind-x86_64.yaml Sat Dec 16 14:46:24 2017 (r326904) +++ vendor/lld/dist/test/mach-o/lazy-bind-x86_64.yaml Sat Dec 16 14:46:38 2017 (r326905) @@ -80,8 +80,8 @@ undefined-symbols: # CHECK-HELPERS:Disassembly of section __TEXT,__stub_helper: # CHECK-HELPERS: 68 00 00 00 00 pushq $0 -# CHECK-HELPERS: 68 10 00 00 00 pushq $16 -# CHECK-HELPERS: 68 20 00 00 00 pushq $32 +# CHECK-HELPERS: 68 0b 00 00 00 pushq $11 +# CHECK-HELPERS: 68 16 00 00 00 pushq $22 # Make sure the stub helper is correctly aligned # CHECK-DYLIBS: sectname __stub_helper From owner-svn-src-all@freebsd.org Sat Dec 16 14:46:43 2017 Return-Path: Delivered-To: svn-src-all@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 6E106E84971; Sat, 16 Dec 2017 14:46:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3579266D93; Sat, 16 Dec 2017 14:46:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGEkgSE032727; Sat, 16 Dec 2017 14:46:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGEkgVc032726; Sat, 16 Dec 2017 14:46:42 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712161446.vBGEkgVc032726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Dec 2017 14:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326906 - vendor/lld/lld-release_501-r320880 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-release_501-r320880 X-SVN-Commit-Revision: 326906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:46:43 -0000 Author: dim Date: Sat Dec 16 14:46:42 2017 New Revision: 326906 URL: https://svnweb.freebsd.org/changeset/base/326906 Log: Tag lld 5.0.1 release r320880. Added: vendor/lld/lld-release_501-r320880/ - copied from r326905, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Sat Dec 16 14:47:13 2017 Return-Path: Delivered-To: svn-src-all@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 B681CE84A63; Sat, 16 Dec 2017 14:47:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8099767044; Sat, 16 Dec 2017 14:47:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGElCYU032791; Sat, 16 Dec 2017 14:47:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGElCm3032790; Sat, 16 Dec 2017 14:47:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712161447.vBGElCm3032790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Dec 2017 14:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r326907 - vendor/lldb/lldb-release_501-r320880 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-release_501-r320880 X-SVN-Commit-Revision: 326907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:47:13 -0000 Author: dim Date: Sat Dec 16 14:47:12 2017 New Revision: 326907 URL: https://svnweb.freebsd.org/changeset/base/326907 Log: Tag lldb 5.0.1 release r320880. Added: vendor/lldb/lldb-release_501-r320880/ - copied from r326906, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Sat Dec 16 15:17:55 2017 Return-Path: Delivered-To: svn-src-all@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 AB19AE85660; Sat, 16 Dec 2017 15:17:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7571667E8B; Sat, 16 Dec 2017 15:17:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGFHsun045305; Sat, 16 Dec 2017 15:17:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGFHsjD045304; Sat, 16 Dec 2017 15:17:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712161517.vBGFHsjD045304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 16 Dec 2017 15:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326908 - head/lib/libc/i386 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc/i386 X-SVN-Commit-Revision: 326908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 15:17:55 -0000 Author: emaste Date: Sat Dec 16 15:17:54 2017 New Revision: 326908 URL: https://svnweb.freebsd.org/changeset/base/326908 Log: revert r322589: force use of ld.bfd for linking i386 libc As of r326897 ld.lld can link a working i386 libc.so, so we no longer need to force use of ld.bfd. Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/i386/Makefile.inc Modified: head/lib/libc/i386/Makefile.inc ============================================================================== --- head/lib/libc/i386/Makefile.inc Sat Dec 16 14:47:12 2017 (r326907) +++ head/lib/libc/i386/Makefile.inc Sat Dec 16 15:17:54 2017 (r326908) @@ -4,13 +4,3 @@ GDTOASRCS+=strtorx.c SRCS+=machdep_ldisx.c SYM_MAPS+=${LIBC_SRCTOP}/i386/Symbol.map - -# XXX force use of ld.bfd for linking i386 libc -# -# lld can successfully link most of a working i386 userland and kernel, -# but produces a broken libc. For now if we're otherwise using lld, and -# ld.bfd is available, explicitly use it for libc. -.include -.if ${LINKER_TYPE} == "lld" && ${MK_BINUTILS_BOOTSTRAP} != "no" -LDFLAGS+=-fuse-ld=bfd -.endif From owner-svn-src-all@freebsd.org Sat Dec 16 15:45:19 2017 Return-Path: Delivered-To: svn-src-all@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 DF9EBE8642A; Sat, 16 Dec 2017 15:45:19 +0000 (UTC) (envelope-from olgeni@olgeni.com) Received: from olgeni.olgeni.com (olgeni.olgeni.com [31.171.246.156]) by mx1.freebsd.org (Postfix) with ESMTP id 3858068C83; Sat, 16 Dec 2017 15:45:19 +0000 (UTC) (envelope-from olgeni@olgeni.com) Received: from olgeni (unknown [82.84.97.113]) by olgeni.olgeni.com (Postfix) with ESMTPSA id CE014D791D; Sat, 16 Dec 2017 16:45:11 +0100 (CET) Date: Sat, 16 Dec 2017 16:45:11 +0100 (CET) From: Jimmy Olgeni X-X-Sender: olgeni@olgeni.olgeni To: Baptiste Daroussin cc: Peter Jeremy , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r326619 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs In-Reply-To: <20171213185214.GA12026@server.rulingia.com> Message-ID: References: <201712061001.vB6A12Ot032201@repo.freebsd.org> <20171213185214.GA12026@server.rulingia.com> User-Agent: Alpine 2.21 (BSF 202 2017-01-01) X-OpenPGP-KeyID: 0x90B7A98E6450AE47 X-OpenPGP-Fingerprint: 7133 AB4D DFC8 0A0D F891 B0D2 90B7 A98E 6450 AE47 X-OpenPGP-URL: http://olgeni.olgeni.com/~olgeni/pgp/olgeni@olgeni.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 15:45:20 -0000 Hi, On Thu, 14 Dec 2017, Peter Jeremy wrote: > On 2017-Dec-06 10:01:02 +0000, Baptiste Daroussin wrote: > >Author: bapt > >Date: Wed Dec 6 10:01:02 2017 > >New Revision: 326619 > >URL: https://svnweb.freebsd.org/changeset/base/326619 > > > >Log: > > MFC r325851: > > > > remove the poor emulation of the IllumOS needfree global variable to prevent > > the ARC reclaim thread running longer than needed. > > > > This change appears to break the backpressure mechanism that forces > ARC to release wired memory. Running FreeBSD/amd64 r326743, I found > that my system was thrashing badly with almost all memory (~31GB out > of 32GB) wired (including 19GB ARC, 7GB VBox guests). Running a tool > that just allocates and dirties a large amount of memory had no effect > on the ARC size. Reverting this change only restores normal behaviour > where ARC will shrink under pressure. Are there any updates on this? -- jimmy From owner-svn-src-all@freebsd.org Sat Dec 16 18:05:39 2017 Return-Path: Delivered-To: svn-src-all@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 373D5E89AE8; Sat, 16 Dec 2017 18:05:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E8A46CA75; Sat, 16 Dec 2017 18:05:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (unknown [IPv6:2601:648:8500:5fb:c0f6:8a1e:4df4:26c]) by mail.baldwin.cx (Postfix) with ESMTPSA id 99D5310A7DB; Sat, 16 Dec 2017 13:05:30 -0500 (EST) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: Eugene Grosbein , Konstantin Belousov , Conrad Meyer References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> <5A3261BD.5050404@grosbein.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: John Baldwin Message-ID: <1705b795-46ca-bb27-6ba7-fab4eeed0aba@FreeBSD.org> Date: Sat, 16 Dec 2017 10:05:33 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <5A3261BD.5050404@grosbein.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Sat, 16 Dec 2017 13:05:31 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 18:05:39 -0000 On 12/14/17 3:34 AM, Eugene Grosbein wrote: > On 13.12.2017 04:55, John Baldwin wrote: >> On 12/12/17 3:09 PM, Eugene Grosbein wrote: >>> On 13.12.2017 02:32, John Baldwin wrote: >>> >>>> Certainly for MIPS I have found that compiling with clang >>>> instead of gcc for mips64 gives a kernel that panics for stack overflow for any >>>> use of NFS. It might be that this is due to something MIPS-specific, but it >>>> might be worthwhile retesting with kstack_pages=2 and building the kernel >>>> with CROSS_TOOLCHAIN=i386-gcc after installing the appropriate package. >>> >>> You may want to check NFS code that uses stack heavily. >>> Here are numbers for i386 (bytes-on-stack, module, what function): >>> >>> 1344 nfs_nfsdport.o : >>> 1152 nfs_nfsdserv.o : >>> 1128 nfs_nfsdserv.o : >>> 952 nfs_nfsdserv.o : >>> 664 nfs_nfsdserv.o : >>> 640 nfs_nfsdserv.o : >>> 624 nfs_nfsdserv.o : >>> 608 nfs_nfsdserv.o : >>> 600 nfs_clvfsops.o : >> >> My point is that you should compare gcc with clang as 10.x switched to >> clang and that may be a factor in the stack overflows beginning with 10.x. > > I think thats's NFS code who is guilty. You can see example of amd64 (sic!) kstack exhaustion > due to 40+ frames deep call chain here: > > https://lists.freebsd.org/pipermail/freebsd-stable/2017-July/087429.html In case it is not clear, it is not _just_ NFS that is broken. clang is _known_ to be broken. When I build a FreeBSD/mips64 kernel with clang, _any_ simple NFS op triggers a kernel stack overflow. Kernels compiled with GCC do not. I would really appreciate investigating the clang vs gcc on i386 to determine if this issue is platform-specific or not. If clang is stack hungry on all architectures then we need to be aware of that problem. (clang 5 on MIPS also has the lovely property that it doesn't save $RA when it calls a dead2 function, so the stack trace for the kernel stack overflow from ddb is useless and ends when the trap handler calls panic, it never makes it back into the original stack which overflowed.) -- John Baldwin From owner-svn-src-all@freebsd.org Sat Dec 16 18:06:33 2017 Return-Path: Delivered-To: svn-src-all@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 2C018E89B89; Sat, 16 Dec 2017 18:06:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4A0B6CC24; Sat, 16 Dec 2017 18:06:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGI6WiJ016297; Sat, 16 Dec 2017 18:06:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGI6UX2016281; Sat, 16 Dec 2017 18:06:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712161806.vBGI6UX2016281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Dec 2017 18:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326909 - in head: contrib/llvm/lib/Target/BPF contrib/llvm/lib/Transforms/Scalar contrib/llvm/tools/clang/lib/Basic contrib/llvm/tools/clang/lib/Sema contrib/llvm/tools/lld/lib/ReaderW... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm/lib/Target/BPF contrib/llvm/lib/Transforms/Scalar contrib/llvm/tools/clang/lib/Basic contrib/llvm/tools/clang/lib/Sema contrib/llvm/tools/lld/lib/ReaderWriter/MachO lib/clang/inc... X-SVN-Commit-Revision: 326909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 18:06:33 -0000 Author: dim Date: Sat Dec 16 18:06:30 2017 New Revision: 326909 URL: https://svnweb.freebsd.org/changeset/base/326909 Log: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 5.0.1 release (upstream r320880). Relnotes: yes MFC after: 2 weeks Modified: head/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp head/contrib/llvm/lib/Target/BPF/BPFInstrInfo.td head/contrib/llvm/lib/Transforms/Scalar/NewGVN.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler.h head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86.cpp head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/lld/Config/Version.inc head/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: head/contrib/compiler-rt/ (props changed) head/contrib/libc++/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) Modified: head/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp Sat Dec 16 18:06:30 2017 (r326909) @@ -578,11 +578,15 @@ BPFTargetLowering::EmitInstrWithCustomInserter(Machine .addReg(LHS) .addReg(MI.getOperand(2).getReg()) .addMBB(Copy1MBB); - else + else { + int64_t imm32 = MI.getOperand(2).getImm(); + // sanity check before we build J*_ri instruction. + assert (isInt<32>(imm32)); BuildMI(BB, DL, TII.get(NewCC)) .addReg(LHS) - .addImm(MI.getOperand(2).getImm()) + .addImm(imm32) .addMBB(Copy1MBB); + } // Copy0MBB: // %FalseValue = ... Modified: head/contrib/llvm/lib/Target/BPF/BPFInstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/BPF/BPFInstrInfo.td Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/lib/Target/BPF/BPFInstrInfo.td Sat Dec 16 18:06:30 2017 (r326909) @@ -464,7 +464,7 @@ let usesCustomInserter = 1 in { (ins GPR:$lhs, i64imm:$rhs, i64imm:$imm, GPR:$src, GPR:$src2), "# Select PSEUDO $dst = $lhs $imm $rhs ? $src : $src2", [(set i64:$dst, - (BPFselectcc i64:$lhs, (i64 imm:$rhs), (i64 imm:$imm), i64:$src, i64:$src2))]>; + (BPFselectcc i64:$lhs, (i64 i64immSExt32:$rhs), (i64 imm:$imm), i64:$src, i64:$src2))]>; } // load 64-bit global addr into register Modified: head/contrib/llvm/lib/Transforms/Scalar/NewGVN.cpp ============================================================================== --- head/contrib/llvm/lib/Transforms/Scalar/NewGVN.cpp Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/lib/Transforms/Scalar/NewGVN.cpp Sat Dec 16 18:06:30 2017 (r326909) @@ -586,8 +586,8 @@ class NewGVN { (public) private: // Expression handling. const Expression *createExpression(Instruction *) const; - const Expression *createBinaryExpression(unsigned, Type *, Value *, - Value *) const; + const Expression *createBinaryExpression(unsigned, Type *, Value *, Value *, + Instruction *) const; PHIExpression *createPHIExpression(Instruction *, bool &HasBackEdge, bool &OriginalOpsConstant) const; const DeadExpression *createDeadExpression() const; @@ -902,8 +902,8 @@ bool NewGVN::setBasicExpressionInfo(Instruction *I, Ba } const Expression *NewGVN::createBinaryExpression(unsigned Opcode, Type *T, - Value *Arg1, - Value *Arg2) const { + Value *Arg1, Value *Arg2, + Instruction *I) const { auto *E = new (ExpressionAllocator) BasicExpression(2); E->setType(T); @@ -921,7 +921,7 @@ const Expression *NewGVN::createBinaryExpression(unsig E->op_push_back(lookupOperandLeader(Arg2)); Value *V = SimplifyBinOp(Opcode, E->getOperand(0), E->getOperand(1), SQ); - if (const Expression *SimplifiedE = checkSimplificationResults(E, nullptr, V)) + if (const Expression *SimplifiedE = checkSimplificationResults(E, I, V)) return SimplifiedE; return E; } @@ -1699,8 +1699,9 @@ NewGVN::performSymbolicAggrValueEvaluation(Instruction // expression. assert(II->getNumArgOperands() == 2 && "Expect two args for recognised intrinsics."); - return createBinaryExpression( - Opcode, EI->getType(), II->getArgOperand(0), II->getArgOperand(1)); + return createBinaryExpression(Opcode, EI->getType(), + II->getArgOperand(0), + II->getArgOperand(1), I); } } } @@ -1933,6 +1934,7 @@ void NewGVN::touchAndErase(Map &M, const KeyType &Key) } void NewGVN::addAdditionalUsers(Value *To, Value *User) const { + assert(User && To != User); if (isa(To)) AdditionalUsers[To].insert(User); } Modified: head/contrib/llvm/tools/clang/lib/Basic/Version.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Basic/Version.cpp Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/tools/clang/lib/Basic/Version.cpp Sat Dec 16 18:06:30 2017 (r326909) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_50/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_501/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Sat Dec 16 18:06:30 2017 (r326909) @@ -1603,7 +1603,24 @@ static bool ShouldDiagnoseUnusedDecl(const NamedDecl * if (D->isInvalidDecl()) return false; - if (D->isReferenced() || D->isUsed() || D->hasAttr() || + bool Referenced = false; + if (auto *DD = dyn_cast(D)) { + // For a decomposition declaration, warn if none of the bindings are + // referenced, instead of if the variable itself is referenced (which + // it is, by the bindings' expressions). + for (auto *BD : DD->bindings()) { + if (BD->isReferenced()) { + Referenced = true; + break; + } + } + } else if (!D->getDeclName()) { + return false; + } else if (D->isReferenced() || D->isUsed()) { + Referenced = true; + } + + if (Referenced || D->hasAttr() || D->hasAttr()) return false; @@ -1726,7 +1743,7 @@ void Sema::DiagnoseUnusedDecl(const NamedDecl *D) { else DiagID = diag::warn_unused_variable; - Diag(D->getLocation(), DiagID) << D->getDeclName() << Hint; + Diag(D->getLocation(), DiagID) << D << Hint; } static void CheckPoppedLabel(LabelDecl *L, Sema &S) { @@ -1756,8 +1773,6 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) assert(isa(TmpD) && "Decl isn't NamedDecl?"); NamedDecl *D = cast(TmpD); - if (!D->getDeclName()) continue; - // Diagnose unused variables in this scope. if (!S->hasUnrecoverableErrorOccurred()) { DiagnoseUnusedDecl(D); @@ -1765,6 +1780,8 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) DiagnoseUnusedNestedTypedefs(RD); } + if (!D->getDeclName()) continue; + // If this was a forward reference to a label, verify it was defined. if (LabelDecl *LD = dyn_cast(D)) CheckPoppedLabel(LD, *this); @@ -6155,7 +6172,6 @@ NamedDecl *Sema::ActOnVariableDeclarator( IdentifierInfo *II = Name.getAsIdentifierInfo(); if (D.isDecompositionDeclarator()) { - AddToScope = false; // Take the name of the first declarator as our name for diagnostic // purposes. auto &Decomp = D.getDecompositionDeclarator(); Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp Sat Dec 16 18:06:30 2017 (r326909) @@ -826,7 +826,10 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarato NamedDecl *New = ActOnVariableDeclarator(S, D, DC, TInfo, Previous, MultiTemplateParamsArg(), AddToScope, Bindings); - CurContext->addHiddenDecl(New); + if (AddToScope) { + S->AddDecl(New); + CurContext->addHiddenDecl(New); + } if (isInOpenMPDeclareTargetContext()) checkDeclIsAllowedInOpenMPTarget(nullptr, New); Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp Sat Dec 16 18:06:30 2017 (r326909) @@ -677,6 +677,7 @@ TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(T Decl *TemplateDeclInstantiator::VisitBindingDecl(BindingDecl *D) { auto *NewBD = BindingDecl::Create(SemaRef.Context, Owner, D->getLocation(), D->getIdentifier()); + NewBD->setReferenced(D->isReferenced()); SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, NewBD); return NewBD; } Modified: head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler.h ============================================================================== --- head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler.h Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler.h Sat Dec 16 18:06:30 2017 (r326909) @@ -112,6 +112,10 @@ class ArchHandler { (public) /// info in final executables. virtual bool isLazyPointer(const Reference &); + /// Reference from an __stub_helper entry to the required offset of the + /// lazy bind commands. + virtual Reference::KindValue lazyImmediateLocationKind() = 0; + /// Returns true if the specified relocation is paired to the next relocation. virtual bool isPairedReloc(const normalized::Relocation &) = 0; Modified: head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp ============================================================================== --- head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp Sat Dec 16 18:06:30 2017 (r326909) @@ -67,6 +67,10 @@ class ArchHandler_arm : public ArchHandler { (public) return invalid; } + Reference::KindValue lazyImmediateLocationKind() override { + return lazyImmediateLocation; + } + Reference::KindValue pointerKind() override { return invalid; } Modified: head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp ============================================================================== --- head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp Sat Dec 16 18:06:30 2017 (r326909) @@ -127,6 +127,10 @@ class ArchHandler_arm64 : public ArchHandler { (public return pointer64; } + Reference::KindValue lazyImmediateLocationKind() override { + return lazyImmediateLocation; + } + uint32_t dwarfCompactUnwindType() override { return 0x03000000; } Modified: head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86.cpp ============================================================================== --- head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86.cpp Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86.cpp Sat Dec 16 18:06:30 2017 (r326909) @@ -70,6 +70,10 @@ class ArchHandler_x86 : public ArchHandler { (public) return delta32; } + Reference::KindValue lazyImmediateLocationKind() override { + return lazyImmediateLocation; + } + Reference::KindValue unwindRefToEhFrameKind() override { return invalid; } Modified: head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp ============================================================================== --- head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp Sat Dec 16 18:06:30 2017 (r326909) @@ -116,6 +116,10 @@ class ArchHandler_x86_64 : public ArchHandler { (publi return unwindFDEToFunction; } + Reference::KindValue lazyImmediateLocationKind() override { + return lazyImmediateLocation; + } + Reference::KindValue unwindRefToEhFrameKind() override { return unwindInfoToEhFrame; } Modified: head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp ============================================================================== --- head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp Sat Dec 16 15:17:54 2017 (r326908) +++ head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp Sat Dec 16 18:06:30 2017 (r326909) @@ -172,6 +172,8 @@ class Util { (private) SymbolScope &symbolScope); void appendSection(SectionInfo *si, NormalizedFile &file); uint32_t sectionIndexForAtom(const Atom *atom); + void fixLazyReferenceImm(const DefinedAtom *atom, uint32_t offset, + NormalizedFile &file); typedef llvm::DenseMap AtomToIndex; struct AtomAndIndex { const Atom *atom; uint32_t index; SymbolScope scope; }; @@ -1423,6 +1425,8 @@ void Util::addRebaseAndBindingInfo(const lld::File &at uint8_t segmentIndex; uint64_t segmentStartAddr; + uint32_t offsetInBindInfo = 0; + for (SectionInfo *sect : _sectionInfos) { segIndexForSection(sect, segmentIndex, segmentStartAddr); for (const AtomInfo &info : sect->atomsAndOffsets) { @@ -1467,6 +1471,59 @@ void Util::addRebaseAndBindingInfo(const lld::File &at bind.symbolName = targ->name(); bind.addend = ref->addend(); nFile.lazyBindingInfo.push_back(bind); + + // Now that we know the segmentOffset and the ordinal attribute, + // we can fix the helper's code + + fixLazyReferenceImm(atom, offsetInBindInfo, nFile); + + // 5 bytes for opcodes + variable sizes (target name + \0 and offset + // encode's size) + offsetInBindInfo += + 6 + targ->name().size() + llvm::getULEB128Size(bind.segOffset); + if (bind.ordinal > BIND_IMMEDIATE_MASK) + offsetInBindInfo += llvm::getULEB128Size(bind.ordinal); + } + } + } + } +} + +void Util::fixLazyReferenceImm(const DefinedAtom *atom, uint32_t offset, + NormalizedFile &file) { + for (const auto &ref : *atom) { + const DefinedAtom *da = dyn_cast(ref->target()); + if (da == nullptr) + return; + + const Reference *helperRef = nullptr; + for (const Reference *hr : *da) { + if (hr->kindValue() == _archHandler.lazyImmediateLocationKind()) { + helperRef = hr; + break; + } + } + if (helperRef == nullptr) + continue; + + // TODO: maybe get the fixed atom content from _archHandler ? + for (SectionInfo *sectInfo : _sectionInfos) { + for (const AtomInfo &atomInfo : sectInfo->atomsAndOffsets) { + if (atomInfo.atom == helperRef->target()) { + auto sectionContent = + file.sections[sectInfo->normalizedSectionIndex].content; + uint8_t *rawb = + file.ownedAllocations.Allocate(sectionContent.size()); + llvm::MutableArrayRef newContent{rawb, + sectionContent.size()}; + std::copy(sectionContent.begin(), sectionContent.end(), + newContent.begin()); + llvm::support::ulittle32_t *loc = + reinterpret_cast( + &newContent[atomInfo.offsetInSection + + helperRef->offsetInAtom()]); + *loc = offset; + file.sections[sectInfo->normalizedSectionIndex].content = newContent; } } } Modified: head/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- head/lib/clang/include/clang/Basic/Version.inc Sat Dec 16 15:17:54 2017 (r326908) +++ head/lib/clang/include/clang/Basic/Version.inc Sat Dec 16 18:06:30 2017 (r326909) @@ -8,4 +8,4 @@ #define CLANG_VENDOR "FreeBSD " -#define SVN_REVISION "319231" +#define SVN_REVISION "320880" Modified: head/lib/clang/include/lld/Config/Version.inc ============================================================================== --- head/lib/clang/include/lld/Config/Version.inc Sat Dec 16 15:17:54 2017 (r326908) +++ head/lib/clang/include/lld/Config/Version.inc Sat Dec 16 18:06:30 2017 (r326909) @@ -4,5 +4,5 @@ #define LLD_VERSION_STRING "5.0.1" #define LLD_VERSION_MAJOR 5 #define LLD_VERSION_MINOR 0 -#define LLD_REVISION_STRING "319231" +#define LLD_REVISION_STRING "320880" #define LLD_REPOSITORY_STRING "FreeBSD" Modified: head/lib/clang/include/llvm/Support/VCSRevision.h ============================================================================== --- head/lib/clang/include/llvm/Support/VCSRevision.h Sat Dec 16 15:17:54 2017 (r326908) +++ head/lib/clang/include/llvm/Support/VCSRevision.h Sat Dec 16 18:06:30 2017 (r326909) @@ -1,2 +1,2 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "svn-r319231" +#define LLVM_REVISION "svn-r320880" From owner-svn-src-all@freebsd.org Sat Dec 16 18:54:11 2017 Return-Path: Delivered-To: svn-src-all@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 19294E8B1A6; Sat, 16 Dec 2017 18:54:11 +0000 (UTC) (envelope-from yaneurabeya@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 DA4A46E626; Sat, 16 Dec 2017 18:54:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x234.google.com with SMTP id q20so7609585pgv.2; Sat, 16 Dec 2017 10:54:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=JB7TVAVkSz7+grAglQkaB29NqGwfPROfjfI9eFbKhaU=; b=ssPqaqrRskxI8vBpbDMJ1/zj2m/E+eCtkAou7wPoqPZvLE3DS1bs/HWz3ujAPoziE3 yVDVbJmXXdd44FuSdAhPvv1S2T2ct/cK4lSdgkYB2d3yBDVcJPq3ZHXeu7EFzahEUx8p ShKfolR24LfY8GRswf0KSFh2pvPZ6aDvYBsZsY/uDMEM6qC/Edc27f/n5fHD+dhV77RR 4dkSDNbmrQJhese6lRl+9cb8L4Jh8aP8ZskRMy+FcsocdxyGOPFzo8br70gLkRIj3Z4k vvEvYvlEwiLrMQnlo2yI1i8hKmtmaeFOKZ5pmto7tALZTppAkm0F367m7+d/hAFOGkb9 DYhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=JB7TVAVkSz7+grAglQkaB29NqGwfPROfjfI9eFbKhaU=; b=VyWWVz3O8p6q8CpXnOgAaO+1KtxTHOkmJKPkMjTdzJnXyxdTIs9uDyNZIcqwhKZ7vS PMsbXLMhnkM+1yDPLDpogMwg1u2lrVBelX90orH1G6NDTj+SKJxlxj+0TrZHVLEuSmpF 1YhpZj67Mpz1WK99Sydmc+8o4wtxTEvSaxagfl2uRcilFJOQ+1OmuUn5IzXtcz2fMMu+ ZLuHqtacAm4aPeh9CgpJV2pBbnRh05jkGo9G9ncswxud9x1dNMvzB1Ksb5B3ba5AtpD4 /w+FX85EPV4+2nag79REJTbmY5Vd9EtiW8hNGwmJipmANwikMAM91Wugb+wHleb7hBAP 7LRA== X-Gm-Message-State: AKGB3mLLr70fjr6xQ8jbLNZcK6LPmFIb5vUbSEeSQXpBF2u8xJkSapGq n0PRHh6Kbmwge5eqJDG0e2akq/znQ4c= X-Google-Smtp-Source: ACJfBoub8d9iXZJxOhu6Rln//zpkbVXhOIlBvDRs48rYsulrmW8VabcQumNh4pgB2CJg6mETSh+Q1w== X-Received: by 10.99.176.3 with SMTP id h3mr15777649pgf.207.1513450449928; Sat, 16 Dec 2017 10:54:09 -0800 (PST) Received: from ?IPv6:2607:fb90:780a:e3f7:54ab:dadf:d7d3:b76f? ([2607:fb90:780a:e3f7:54ab:dadf:d7d3:b76f]) by smtp.gmail.com with ESMTPSA id 84sm18846764pfp.180.2017.12.16.10.54.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Dec 2017 10:54:09 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r323304 - stable/11/share/man/man5 From: Ngie Cooper X-Mailer: iPhone Mail (15C114) In-Reply-To: <871sjvgnxh.wl-herbert@mailbox.org> Date: Sat, 16 Dec 2017 10:54:08 -0800 Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <1F39F6D2-97FA-4173-B62D-44B8D95A90A5@gmail.com> References: <201709080451.v884pGhH036463@repo.freebsd.org> <871sjvgnxh.wl-herbert@mailbox.org> To: "Herbert J. Skuhra" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 18:54:11 -0000 > On Dec 15, 2017, at 22:57, Herbert J. Skuhra wrote: >=20 >> On Fri, 08 Sep 2017 06:51:16 +0200, Ngie Cooper wrote: >>=20 >> Author: ngie >> Date: Fri Sep 8 04:51:16 2017 >> New Revision: 323304 >> URL: https://svnweb.freebsd.org/changeset/base/323304 >>=20 >> Log: >> Regenerate src.conf(5) based on recent changes to src.opts.mk, etc. >>=20 >> Modified: >> stable/11/share/man/man5/src.conf.5 >>=20 >> Modified: stable/11/share/man/man5/src.conf.5 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >> --- stable/11/share/man/man5/src.conf.5 Fri Sep 8 04:48:25 2017 (r= 323303) >> +++ stable/11/share/man/man5/src.conf.5 Fri Sep 8 04:51:16 2017 (r= 323304) >> @@ -1,6 +1,6 @@ >> .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. >> .\" $FreeBSD$ >> -.Dd August 16, 2017 >> +.Dd September 7, 2017 >> .Dt SRC.CONF 5 >> .Os >> .Sh NAME >> @@ -1150,6 +1150,12 @@ and remove >> entries. >> .It Va WITHOUT_NLS >> Set to not build NLS catalogs. >> +When set, it enforces these options: >> +.Pp >> +.Bl -item -compact >> +.It >> +.Va WITHOUT_NLS_CATALOGS >> +.El >> .It Va WITHOUT_NLS_CATALOGS >> Set to not build NLS catalog support for >> .Xr csh 1 . >> @@ -1237,6 +1243,42 @@ and related files. >> Set to not build >> .Xr ppp 8 >> and related programs. >> +.It Va WITHOUT_PROFILE >> +Set to not build profiled libraries for use with >> +.Xr gprof 8 . >> +.Pp >> +This is a default setting on >> +mips/mips64el and mips/mips64. >> +.It Va WITH_PROFILE >> +Set to build profiled libraries for use with >> +.Xr gprof 8 . >> +.Pp >> +This is a default setting on >> +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mi= ps/mipsel, mips/mips, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powe= rpc64 and sparc64/sparc64. >> +.It Va WITHOUT_PROFILE >> +Set to not build profiled libraries for use with >> +.Xr gprof 8 . >> +.Pp >> +This is a default setting on >> +mips/mips64el. >> +.It Va WITH_PROFILE >> +Set to build profiled libraries for use with >> +.Xr gprof 8 . >> +.Pp >> +This is a default setting on >> +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mi= ps/mipsel, mips/mips, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc,= powerpc/powerpc64 and sparc64/sparc64. >> +.It Va WITHOUT_PROFILE >> +Set to not build profiled libraries for use with >> +.Xr gprof 8 . >> +.Pp >> +This is a default setting on >> +mips/mips64. >> +.It Va WITH_PROFILE >> +Set to build profiled libraries for use with >> +.Xr gprof 8 . >> +.Pp >> +This is a default setting on >> +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mi= ps/mipsel, mips/mips, mips/mips64el, mips/mipsn32, pc98/i386, powerpc/powerp= c, powerpc/powerpc64 and sparc64/sparc64. >> .It Va WITHOUT_PROFILE >> Set to not build profiled libraries for use with >> .Xr gprof 8 . >=20 > Here something went wrong: multiple (WITH|WITHOUT)_PROFILE entries. Herbert, Please file a bug. Cheers, -Enji PS I=E2=80=99m no longer a committer, so my ability to act on freebsd things= which I=E2=80=99m CCed on is diminished.= From owner-svn-src-all@freebsd.org Sat Dec 16 19:37:56 2017 Return-Path: Delivered-To: svn-src-all@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 92FCDE8C59C; Sat, 16 Dec 2017 19:37:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CD326FAD2; Sat, 16 Dec 2017 19:37:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGJbtf9053944; Sat, 16 Dec 2017 19:37:55 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGJbtER053939; Sat, 16 Dec 2017 19:37:55 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201712161937.vBGJbtER053939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sat, 16 Dec 2017 19:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326910 - head/lib/libsysdecode X-SVN-Group: head X-SVN-Commit-Author: ed X-SVN-Commit-Paths: head/lib/libsysdecode X-SVN-Commit-Revision: 326910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 19:37:56 -0000 Author: ed Date: Sat Dec 16 19:37:55 2017 New Revision: 326910 URL: https://svnweb.freebsd.org/changeset/base/326910 Log: libsysdecode: Add a new ABI type, SYSDECODE_ABI_CLOUDABI32. In order to let truss(8) support tracing of 32-bit CloudABI applications, we need to add a new ABI type to libsysdecode. We can reuse the existing errno mapping table. Also link in the cloudabi32 system call table to translate system call names. While there, remove all of the architecture ifdefs. There are not needed, as the CloudABI data types and system call tables build fine on any architecture. Building this unconditionally will make it easier to do tracing for different compat modes, emulation, etc. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D13516 Modified: head/lib/libsysdecode/errno.c head/lib/libsysdecode/syscallnames.c head/lib/libsysdecode/sysdecode.3 head/lib/libsysdecode/sysdecode.h Modified: head/lib/libsysdecode/errno.c ============================================================================== --- head/lib/libsysdecode/errno.c Sat Dec 16 18:06:30 2017 (r326909) +++ head/lib/libsysdecode/errno.c Sat Dec 16 19:37:55 2017 (r326910) @@ -58,7 +58,6 @@ static int bsd_to_linux_errno[ELAST + 1] = { }; #endif -#if defined(__aarch64__) || defined(__amd64__) #include static const int cloudabi_errno_table[] = { @@ -139,7 +138,6 @@ static const int cloudabi_errno_table[] = { [CLOUDABI_EXDEV] = EXDEV, [CLOUDABI_ENOTCAPABLE] = ENOTCAPABLE, }; -#endif int sysdecode_abi_to_freebsd_errno(enum sysdecode_abi abi, int error) @@ -165,13 +163,12 @@ sysdecode_abi_to_freebsd_errno(enum sysdecode_abi abi, break; } #endif -#if defined(__aarch64__) || defined(__amd64__) + case SYSDECODE_ABI_CLOUDABI32: case SYSDECODE_ABI_CLOUDABI64: if (error >= 0 && (unsigned int)error < nitems(cloudabi_errno_table)) return (cloudabi_errno_table[error]); break; -#endif default: break; } @@ -193,7 +190,7 @@ sysdecode_freebsd_to_abi_errno(enum sysdecode_abi abi, return (bsd_to_linux_errno[error]); break; #endif -#if defined(__aarch64__) || defined(__amd64__) + case SYSDECODE_ABI_CLOUDABI32: case SYSDECODE_ABI_CLOUDABI64: { unsigned int i; @@ -203,7 +200,6 @@ sysdecode_freebsd_to_abi_errno(enum sysdecode_abi abi, } break; } -#endif default: break; } Modified: head/lib/libsysdecode/syscallnames.c ============================================================================== --- head/lib/libsysdecode/syscallnames.c Sat Dec 16 18:06:30 2017 (r326909) +++ head/lib/libsysdecode/syscallnames.c Sat Dec 16 19:37:55 2017 (r326910) @@ -63,10 +63,10 @@ static #include #endif -#if defined(__amd64__) || defined(__aarch64__) static +#include +static #include -#endif const char * sysdecode_syscallname(enum sysdecode_abi abi, unsigned int code) @@ -95,12 +95,14 @@ sysdecode_syscallname(enum sysdecode_abi abi, unsigned return (linux32_syscallnames[code]); break; #endif -#if defined(__amd64__) || defined(__aarch64__) + case SYSDECODE_ABI_CLOUDABI32: + if (code < nitems(cloudabi32_syscallnames)) + return (cloudabi32_syscallnames[code]); + break; case SYSDECODE_ABI_CLOUDABI64: if (code < nitems(cloudabi64_syscallnames)) return (cloudabi64_syscallnames[code]); break; -#endif default: break; } Modified: head/lib/libsysdecode/sysdecode.3 ============================================================================== --- head/lib/libsysdecode/sysdecode.3 Sat Dec 16 18:06:30 2017 (r326909) +++ head/lib/libsysdecode/sysdecode.3 Sat Dec 16 19:37:55 2017 (r326910) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2017 +.Dd December 16, 2017 .Dt SYSDECODE 3 .Os .Sh NAME @@ -61,9 +61,12 @@ Supported on amd64 and i386. .It Li SYSDECODE_ABI_LINUX32 32-bit Linux binaries. Supported on amd64. +.It Li SYSDECODE_ABI_CLOUDABI32 +32-bit CloudABI binaries. +Supported on all platforms. .It Li SYSDECODE_ABI_CLOUDABI64 64-bit CloudABI binaries. -Supported on aarch64 and amd64. +Supported on all platforms. .It Li SYSDECODE_ABI_UNKNOWN A placeholder for use when the ABI is not known. .El Modified: head/lib/libsysdecode/sysdecode.h ============================================================================== --- head/lib/libsysdecode/sysdecode.h Sat Dec 16 18:06:30 2017 (r326909) +++ head/lib/libsysdecode/sysdecode.h Sat Dec 16 19:37:55 2017 (r326910) @@ -35,7 +35,8 @@ enum sysdecode_abi { SYSDECODE_ABI_FREEBSD32, SYSDECODE_ABI_LINUX, SYSDECODE_ABI_LINUX32, - SYSDECODE_ABI_CLOUDABI64 + SYSDECODE_ABI_CLOUDABI64, + SYSDECODE_ABI_CLOUDABI32 }; int sysdecode_abi_to_freebsd_errno(enum sysdecode_abi _abi, int _error); From owner-svn-src-all@freebsd.org Sat Dec 16 19:40:29 2017 Return-Path: Delivered-To: svn-src-all@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 61255E8C6E1; Sat, 16 Dec 2017 19:40:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AA246FC95; Sat, 16 Dec 2017 19:40:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGJeSNj054092; Sat, 16 Dec 2017 19:40:28 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGJeSWm054090; Sat, 16 Dec 2017 19:40:28 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201712161940.vBGJeSWm054090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sat, 16 Dec 2017 19:40:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326911 - head/usr.bin/truss X-SVN-Group: head X-SVN-Commit-Author: ed X-SVN-Commit-Paths: head/usr.bin/truss X-SVN-Commit-Revision: 326911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 19:40:29 -0000 Author: ed Date: Sat Dec 16 19:40:28 2017 New Revision: 326911 URL: https://svnweb.freebsd.org/changeset/base/326911 Log: Make truss(8) work for i686-unknown-cloudabi binaries on FreeBSD/amd64. This change copies the existing amd64_cloudabi64.c to amd64_cloudabi32.c and reimplements the functions for fetching system call arguments and return values to use the same scheme as used by the vDSO that is used when running cloudabi32 executables. As arguments are automatically padded to 64-bit words by the vDSO in userspace, we can copy the arguments directly into the array used by truss(8) internally. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D13516 Added: head/usr.bin/truss/amd64-cloudabi32.c - copied, changed from r326896, head/usr.bin/truss/amd64-cloudabi64.c Modified: head/usr.bin/truss/Makefile Modified: head/usr.bin/truss/Makefile ============================================================================== --- head/usr.bin/truss/Makefile Sat Dec 16 19:37:55 2017 (r326910) +++ head/usr.bin/truss/Makefile Sat Dec 16 19:40:28 2017 (r326911) @@ -22,6 +22,7 @@ ABIS+= i386-linux ABIS+= amd64-linux ABIS+= amd64-linux32 ABIS+= freebsd32 +ABIS+= cloudabi32 ABIS+= cloudabi64 .endif .if ${MACHINE_ARCH} == "powerpc64" Copied and modified: head/usr.bin/truss/amd64-cloudabi32.c (from r326896, head/usr.bin/truss/amd64-cloudabi64.c) ============================================================================== --- head/usr.bin/truss/amd64-cloudabi64.c Sat Dec 16 12:23:59 2017 (r326896, copy source) +++ head/usr.bin/truss/amd64-cloudabi32.c Sat Dec 16 19:40:28 2017 (r326911) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * Copyright (c) 2015-2017 Nuxi, https://nuxi.nl/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -38,60 +38,75 @@ __FBSDID("$FreeBSD$"); #include "truss.h" static int -amd64_cloudabi64_fetch_args(struct trussinfo *trussinfo, unsigned int narg) +amd64_cloudabi32_fetch_args(struct trussinfo *trussinfo, unsigned int narg) { struct current_syscall *cs; + struct ptrace_io_desc iorequest; struct reg regs; lwpid_t tid; - tid = trussinfo->curthread->tid; - if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) == -1) { - fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return (-1); - } + if (narg > 0) { + /* Fetch registers, containing the address of the arguments. */ + tid = trussinfo->curthread->tid; + if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) == -1) { + fprintf(trussinfo->outfile, + "-- CANNOT READ REGISTERS --\n"); + return (-1); + } - cs = &trussinfo->curthread->cs; - if (narg >= 1) - cs->args[0] = regs.r_rdi; - if (narg >= 2) - cs->args[1] = regs.r_rsi; - if (narg >= 3) - cs->args[2] = regs.r_rdx; - if (narg >= 4) - cs->args[3] = regs.r_rcx; - if (narg >= 5) - cs->args[4] = regs.r_r8; - if (narg >= 6) - cs->args[5] = regs.r_r9; + /* Fetch arguments. They are already padded to 64 bits. */ + cs = &trussinfo->curthread->cs; + iorequest.piod_op = PIOD_READ_D; + iorequest.piod_offs = (void *)regs.r_rcx; + iorequest.piod_addr = cs->args; + iorequest.piod_len = sizeof(cs->args[0]) * narg; + if (ptrace(PT_IO, tid, (caddr_t)&iorequest, 0) == -1 || + iorequest.piod_len == 0) + return (-1); + } return (0); } static int -amd64_cloudabi64_fetch_retval(struct trussinfo *trussinfo, long *retval, +amd64_cloudabi32_fetch_retval(struct trussinfo *trussinfo, long *retval, int *errorp) { + struct ptrace_io_desc iorequest; struct reg regs; lwpid_t tid; + /* Fetch registers, containing the address of the return values. */ tid = trussinfo->curthread->tid; if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) == -1) { fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); return (-1); } - retval[0] = regs.r_rax; - retval[1] = regs.r_rdx; - *errorp = (regs.r_rflags & PSL_C) != 0; + if (regs.r_rax == 0) { + /* System call succeeded. Fetch return values. */ + iorequest.piod_op = PIOD_READ_D; + iorequest.piod_offs = (void *)regs.r_rcx; + iorequest.piod_addr = retval; + iorequest.piod_len = sizeof(retval[0]) * 2; + if (ptrace(PT_IO, tid, (caddr_t)&iorequest, 0) == -1 || + iorequest.piod_len == 0) + return (-1); + *errorp = 0; + } else { + /* System call failed. Set error. */ + retval[0] = regs.r_rax; + *errorp = 1; + } return (0); } -static struct procabi amd64_cloudabi64 = { - "CloudABI ELF64", - SYSDECODE_ABI_CLOUDABI64, - amd64_cloudabi64_fetch_args, - amd64_cloudabi64_fetch_retval, - STAILQ_HEAD_INITIALIZER(amd64_cloudabi64.extra_syscalls), +static struct procabi amd64_cloudabi32 = { + "CloudABI ELF32", + SYSDECODE_ABI_CLOUDABI32, + amd64_cloudabi32_fetch_args, + amd64_cloudabi32_fetch_retval, + STAILQ_HEAD_INITIALIZER(amd64_cloudabi32.extra_syscalls), { NULL } }; -PROCABI(amd64_cloudabi64); +PROCABI(amd64_cloudabi32); From owner-svn-src-all@freebsd.org Sat Dec 16 20:19:01 2017 Return-Path: Delivered-To: svn-src-all@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 ABB4BE8D78A; Sat, 16 Dec 2017 20:19:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 769D47108C; Sat, 16 Dec 2017 20:19:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGKJ0ek070892; Sat, 16 Dec 2017 20:19:00 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGKJ0KZ070891; Sat, 16 Dec 2017 20:19:00 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712162019.vBGKJ0KZ070891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 16 Dec 2017 20:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326912 - head/usr.sbin/makefs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.sbin/makefs X-SVN-Commit-Revision: 326912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 20:19:01 -0000 Author: markj Date: Sat Dec 16 20:19:00 2017 New Revision: 326912 URL: https://svnweb.freebsd.org/changeset/base/326912 Log: Fix a logic bug in makefs lazy inode initialization. We may need to initialize multiple inode blocks before writing a given inode. makefs(8) was only initializing a single block at a time, so certain inode allocation patterns could lead to a situation where it wrote an inode to an uninitialized block. That inode might be clobbered by a later initialization, resulting in a filesystem image containing directory entries that point to a seemingly unused inode. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13505 Modified: head/usr.sbin/makefs/ffs.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Sat Dec 16 19:40:28 2017 (r326911) +++ head/usr.sbin/makefs/ffs.c Sat Dec 16 20:19:00 2017 (r326912) @@ -1130,7 +1130,7 @@ ffs_write_inode(union dinode *dp, uint32_t ino, const * Initialize inode blocks on the fly for UFS2. */ initediblk = ufs_rw32(cgp->cg_initediblk, fsopts->needswap); - if (ffs_opts->version == 2 && cgino + INOPB(fs) > initediblk && + while (ffs_opts->version == 2 && cgino + INOPB(fs) > initediblk && initediblk < ufs_rw32(cgp->cg_niblk, fsopts->needswap)) { memset(buf, 0, fs->fs_bsize); dip = (struct ufs2_dinode *)buf; From owner-svn-src-all@freebsd.org Sat Dec 16 20:25:52 2017 Return-Path: Delivered-To: svn-src-all@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 3C2D7E8DBAE; Sat, 16 Dec 2017 20:25:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13BF1719C6; Sat, 16 Dec 2017 20:25:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGKPpAH075085; Sat, 16 Dec 2017 20:25:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGKPodj075084; Sat, 16 Dec 2017 20:25:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712162025.vBGKPodj075084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 16 Dec 2017 20:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326913 - head/share/dict X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/dict X-SVN-Commit-Revision: 326913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 20:25:52 -0000 Author: imp Date: Sat Dec 16 20:25:50 2017 New Revision: 326913 URL: https://svnweb.freebsd.org/changeset/base/326913 Log: Sync with NetBSD's /usr/share/dict/words, with the exception of quim due to its vulgar nature. Submitted by: sevan@ Differential Revision: https://reviews.freebsd.org/D13510 Modified: head/share/dict/web2 Modified: head/share/dict/web2 ============================================================================== --- head/share/dict/web2 Sat Dec 16 20:19:00 2017 (r326912) +++ head/share/dict/web2 Sat Dec 16 20:25:50 2017 (r326913) @@ -1545,9 +1545,9 @@ ackman acknow acknowledge acknowledgeable -acknowledgement acknowledged acknowledgedly +acknowledgement acknowledger acknowledgment aclastic @@ -2648,6 +2648,7 @@ admedial admedian admensuration admi +admin adminicle adminicula adminicular @@ -2656,7 +2657,7 @@ adminiculate adminiculation adminiculum administer -administerd +administered administerial administrable administrant @@ -5948,6 +5949,7 @@ alphabetist alphabetization alphabetize alphabetizer +alphanumeric Alphard alphatoluic Alphean @@ -7003,6 +7005,7 @@ amove Amoy Amoyan Amoyese +amp ampalaya ampalea ampangabeite @@ -19646,6 +19649,7 @@ Beaune beaupere beauseant beauship +beaut beauteous beauteously beauteousness @@ -23499,6 +23503,7 @@ blebby blechnoid Blechnum bleck +bled blee bleed bleeder @@ -32163,6 +32168,7 @@ ceilinged ceilingward ceilingwards ceilometer +cel Celadon celadon celadonite @@ -34048,6 +34054,7 @@ checkless checkman checkmate checkoff +checkout checkrack checkrein checkroll @@ -39340,6 +39347,7 @@ collector collectorate collectorship collectress +Colleen colleen collegatary college @@ -42631,6 +42639,7 @@ coony coop cooper cooperage +cooperate Cooperia coopering coopery @@ -57415,6 +57424,7 @@ downlier downligging downlike downline +downlink downlooked downlooker downlying @@ -68583,6 +68593,7 @@ fatuoid fatuous fatuously fatuousness +fatwa fatwood faucal faucalize @@ -70236,6 +70247,7 @@ firestopping firetail firetop firetrap +firewall firewarden firewater fireweed @@ -71816,6 +71828,7 @@ fomenter fomes fomites Fon +fond fondak fondant fondish @@ -74044,6 +74057,7 @@ fuelizer fuerte fuff fuffy +fug fugacious fugaciously fugaciousness @@ -76068,6 +76082,7 @@ geeldikkop geelhout geepound geerah +geese geest geet Geez @@ -85657,6 +85672,7 @@ hickory Hicksite hickwall Hicoria +hid hidable hidage hidalgism @@ -86106,6 +86122,7 @@ hirmos Hirneola hiro Hirofumi +hirofumi hirondelle Hirotoshi Hiroyuki @@ -95495,6 +95512,7 @@ instantaneously instantaneousness instanter instantial +instantiate instantly instantness instar @@ -101941,6 +101959,7 @@ kickout kickseys kickshaw kickup +kid Kidder kidder Kidderminster @@ -106352,6 +106371,7 @@ Libytheinae Licania licareol licca +lice licensable license licensed @@ -106828,6 +106848,7 @@ Limnorchis Limnoria Limnoriidae limnorioid +limo Limodorum limoid limonene @@ -108017,6 +108038,7 @@ logium loglet loglike logman +logo logocracy logodaedaly logogogue @@ -108253,6 +108275,7 @@ looker looking lookout lookum +lookup loom loomer loomery @@ -118182,6 +118205,7 @@ Molinist Molinistic molka Moll +moll molland Mollberg molle @@ -128067,6 +128091,7 @@ nosewards nosewheel nosewise nosey +nosh nosine nosing nosism @@ -130324,6 +130349,7 @@ Oldfieldia Oldhamia oldhamite oldhearted +oldie oldish oldland oldness @@ -147610,6 +147636,7 @@ placeable Placean placebo placeful +placeholder placeless placelessly placemaker @@ -152000,6 +152027,7 @@ pot potability potable potableness +potage potagerie potagery potamic @@ -153673,6 +153701,7 @@ predynamite predynastic preen preener +preexist preeze prefab prefabricate @@ -162965,6 +162994,7 @@ rakishness rakit rakshasa raku +rale Ralf rallentando ralliance @@ -165219,6 +165249,7 @@ redhoop redia redictate redictation +redid redient redifferentiate redifferentiation @@ -165313,6 +165344,7 @@ redolent redolently redominate redondilla +redone redoom redouble redoublement @@ -166542,6 +166574,7 @@ Rellyanite reload reloan relocable +relocatable relocate relocation relocator @@ -173817,6 +173850,7 @@ sashless sasin sasine saskatoon +sass sassaby sassafac sassafrack @@ -184478,6 +184512,7 @@ softner softness softship softtack +software softwood softy sog @@ -185669,6 +185704,7 @@ spaller spalling spalpeen spalt +spam span spancel spandle @@ -186716,6 +186752,8 @@ spill spillage spiller spillet +spillikin +spillover spillproof spillway spilly @@ -201472,6 +201510,7 @@ Themis themis Themistian themsel +themself themselves then thenabouts @@ -204283,6 +204322,7 @@ tolylenediamine Tolypeutes tolypeutine Tom +tom Toma tomahawk tomahawker @@ -205532,6 +205572,7 @@ trade tradecraft tradeful tradeless +trademark trademaster trader tradership @@ -225433,6 +225474,8 @@ uplight uplimb uplimber upline +uplink +upload uplock uplong uplook @@ -232488,6 +232531,7 @@ wimblelike wimbrel wime wimick +wimp wimple wimpleless wimplelike @@ -233075,6 +233119,7 @@ wog wogiet Wogulian woibe +wok wokas woke wokowi @@ -233456,6 +233501,7 @@ workingman workingwoman workless worklessness +workload workloom workman workmanlike From owner-svn-src-all@freebsd.org Sat Dec 16 21:33:23 2017 Return-Path: Delivered-To: svn-src-all@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 309FFE900F4; Sat, 16 Dec 2017 21:33:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D821A7557B; Sat, 16 Dec 2017 21:33:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBGLXL2R007533; Sat, 16 Dec 2017 21:33:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBGLXL65007531; Sat, 16 Dec 2017 21:33:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712162133.vBGLXL65007531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 16 Dec 2017 21:33:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326914 - head/stand X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand X-SVN-Commit-Revision: 326914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 21:33:23 -0000 Author: imp Date: Sat Dec 16 21:33:21 2017 New Revision: 326914 URL: https://svnweb.freebsd.org/changeset/base/326914 Log: Move loader-only defines to loader.mk from defs.mk Produces the same .o's, verified with md5. Sponsored by: Netflix Modified: head/stand/defs.mk head/stand/loader.mk Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Sat Dec 16 20:25:50 2017 (r326913) +++ head/stand/defs.mk Sat Dec 16 21:33:21 2017 (r326914) @@ -50,52 +50,6 @@ CFLAGS+= -I${BOOTOBJ}/libsa CFLAGS+= -I${SASRC} -D_STANDALONE CFLAGS+= -I${SYSDIR} -# Filesystem support -.if ${LOADER_CD9660_SUPPORT:Uno} == "yes" -CFLAGS+= -DLOADER_CD9660_SUPPORT -.endif -.if ${LOADER_EXT2FS_SUPPORT:Uno} == "yes" -CFLAGS+= -DLOADER_EXT2FS_SUPPORT -.endif -.if ${LOADER_MSDOS_SUPPORT:Uno} == "yes" -CFLAGS+= -DLOADER_MSDOS_SUPPORT -.endif -.if ${LOADER_NANDFS_SUPPORT:U${MK_NAND}} == "yes" -CFLAGS+= -DLOADER_NANDFS_SUPPORT -.endif -.if ${LOADER_UFS_SUPPORT:Uyes} == "yes" -CFLAGS+= -DLOADER_UFS_SUPPORT -.endif - -# Compression -.if ${LOADER_GZIP_SUPPORT:Uno} == "yes" -CFLAGS+= -DLOADER_GZIP_SUPPORT -.endif -.if ${LOADER_BZIP2_SUPPORT:Uno} == "yes" -CFLAGS+= -DLOADER_BZIP2_SUPPORT -.endif - -# Network related things -.if ${LOADER_NET_SUPPORT:Uno} == "yes" -CFLAGS+= -DLOADER_NET_SUPPORT -.endif -.if ${LOADER_NFS_SUPPORT:Uno} == "yes" -CFLAGS+= -DLOADER_NFS_SUPPORT -.endif -.if ${LOADER_TFTP_SUPPORT:Uno} == "yes" -CFLAGS+= -DLOADER_TFTP_SUPPORT -.endif - -# Disk and partition support -.if ${LOADER_DISK_SUPPORT:Uyes} == "yes" -CFLAGS+= -DLOADER_DISK_SUPPORT -.if ${LOADER_GPT_SUPPORT:Uyes} == "yes" -CFLAGS+= -DLOADER_GPT_SUPPORT -.endif -.if ${LOADER_MBR_SUPPORT:Uyes} == "yes" -CFLAGS+= -DLOADER_MBR_SUPPORT -.endif - # GELI Support, with backward compat hooks (mostly) .if defined(HAVE_GELI) .if defined(LOADER_NO_GELI_SUPPORT) @@ -110,9 +64,8 @@ MK_LOADER_GELI=yes CFLAGS+= -DLOADER_GELI_SUPPORT CFLAGS+= -I${BOOTSRC}/geli LIBGELIBOOT= ${BOOTOBJ}/geli/libgeliboot.a -.endif -.endif -.endif +.endif # MK_LOADER_GELI +.endif # HAVE_GELI # Machine specific flags for all builds here Modified: head/stand/loader.mk ============================================================================== --- head/stand/loader.mk Sat Dec 16 20:25:50 2017 (r326913) +++ head/stand/loader.mk Sat Dec 16 21:33:21 2017 (r326914) @@ -69,6 +69,53 @@ CFLAGS+= -DBOOT_PROMPT_123 SRCS+= install.c .endif +# Filesystem support +.if ${LOADER_CD9660_SUPPORT:Uno} == "yes" +CFLAGS+= -DLOADER_CD9660_SUPPORT +.endif +.if ${LOADER_EXT2FS_SUPPORT:Uno} == "yes" +CFLAGS+= -DLOADER_EXT2FS_SUPPORT +.endif +.if ${LOADER_MSDOS_SUPPORT:Uno} == "yes" +CFLAGS+= -DLOADER_MSDOS_SUPPORT +.endif +.if ${LOADER_NANDFS_SUPPORT:U${MK_NAND}} == "yes" +CFLAGS+= -DLOADER_NANDFS_SUPPORT +.endif +.if ${LOADER_UFS_SUPPORT:Uyes} == "yes" +CFLAGS+= -DLOADER_UFS_SUPPORT +.endif + +# Compression +.if ${LOADER_GZIP_SUPPORT:Uno} == "yes" +CFLAGS+= -DLOADER_GZIP_SUPPORT +.endif +.if ${LOADER_BZIP2_SUPPORT:Uno} == "yes" +CFLAGS+= -DLOADER_BZIP2_SUPPORT +.endif + +# Network related things +.if ${LOADER_NET_SUPPORT:Uno} == "yes" +CFLAGS+= -DLOADER_NET_SUPPORT +.endif +.if ${LOADER_NFS_SUPPORT:Uno} == "yes" +CFLAGS+= -DLOADER_NFS_SUPPORT +.endif +.if ${LOADER_TFTP_SUPPORT:Uno} == "yes" +CFLAGS+= -DLOADER_TFTP_SUPPORT +.endif + +# Disk and partition support +.if ${LOADER_DISK_SUPPORT:Uyes} == "yes" +CFLAGS+= -DLOADER_DISK_SUPPORT +.if ${LOADER_GPT_SUPPORT:Uyes} == "yes" +CFLAGS+= -DLOADER_GPT_SUPPORT +.endif +.if ${LOADER_MBR_SUPPORT:Uyes} == "yes" +CFLAGS+= -DLOADER_MBR_SUPPORT +.endif +.endif + .if defined(HAVE_ZFS) CFLAGS+= -DLOADER_ZFS_SUPPORT CFLAGS+= -I${ZFSSRC}