From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 10 00:31:51 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 834D51065679; Sun, 10 Jan 2010 00:31:51 +0000 (UTC) (envelope-from prvs=1626ead20c=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id E2F738FC14; Sun, 10 Jan 2010 00:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=multiplay.co.uk; s=Multiplay; t=1263082864; x=1263687664; q=dns/txt; h=Received: Message-ID:From:To:Cc:References:Subject:Date:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=w+AEZtlbfj8nO77KUG5Ye WNboPfBlWUh6pSfOopu4r0=; b=MnmFCMS3N+JuOSYQfv7LX55HW+xYdhfnLtdpy TnptpjEaqAztd+BEaXj1HhNuLe6Vj9NdHZuiGVF7+aPUYTn75y7/SJ3zGnCVJECx ntsAmjzEDcAzU6/K2Ka62IO4dl+Mob+33YHbzP8o9faQ/T4d++F3TuwbiTgXMucj aYOL3w= X-MDAV-Processed: mail1.multiplay.co.uk, Sun, 10 Jan 2010 00:21:04 +0000 Received: from r2d2 by mail1.multiplay.co.uk (MDaemon PRO v10.0.4) with ESMTP id md50009138199.msg; Sun, 10 Jan 2010 00:21:03 +0000 X-Spam-Processed: mail1.multiplay.co.uk, Sun, 10 Jan 2010 00:21:03 +0000 (not processed: message from trusted or authenticated source) X-Authenticated-Sender: Killing@multiplay.co.uk X-MDRemoteIP: 213.123.247.160 X-Return-Path: prvs=1626ead20c=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: <938508422A4044F981DB634CC932F62C@multiplay.co.uk> From: "Steven Hartland" To: "Alexander Nesterov" References: <2AE0B73B2EE94747B570A9A814756B47@multiplay.co.uk> <4B488DE6.9060700@gmail.com> Date: Sun, 10 Jan 2010 00:20:53 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: nginx hanging with state zoneli X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 00:31:51 -0000 ----- Original Message ----- From: "Alexander Nesterov" > On 08.01.2010 20:21, Steven Hartland wrote: >> [..] >> 12582/218/12800/12800 4k (page size) jumbo clusters in use (current/cache/total/max) > > Try to increase jumbo clusters (sysctl kern.ipc.nmbjumbop) Thanks for the suggestion Alex I've doubled this now and will keep an eye. Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 10 10:18:27 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1CB2106566B for ; Sun, 10 Jan 2010 10:18:27 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout1.freenet.de (mout1.freenet.de [IPv6:2001:748:100:40::2:3]) by mx1.freebsd.org (Postfix) with ESMTP id B2BA98FC0A for ; Sun, 10 Jan 2010 10:18:27 +0000 (UTC) Received: from [195.4.92.22] (helo=12.mx.freenet.de) by mout1.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.70 #1) id 1NTusN-0006iC-3l; Sun, 10 Jan 2010 11:18:27 +0100 Received: from p57ae195e.dip0.t-ipconnect.de ([87.174.25.94]:12479 helo=ernst.jennejohn.org) by 12.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #94) id 1NTusM-0002pY-Kf; Sun, 10 Jan 2010 11:18:26 +0100 Date: Sun, 10 Jan 2010 11:18:24 +0100 From: Gary Jennejohn To: freebsd-hackers@freebsd.org Message-ID: <20100110111824.5e467773@ernst.jennejohn.org> In-Reply-To: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> References: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> X-Mailer: Claws Mail 3.7.3 (GTK+ 2.16.2; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Fernando =?ISO-8859-1?Q?Apestegu=EDa?= Subject: Re: [PATCH] linprocfs dofilesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 10:18:28 -0000 On Fri, 8 Jan 2010 18:19:29 +0100 Fernando Apestegu__a wrote: > Hi all, > > This patch implements the "filesystems" file in the linux proc fs. > I have used it for some time without seeing any problems. Let me > know in case this is useful. > > Tested against 8.0-RELEASE-p1 > > Thanks You should file a PR with this, if you haven't done so already. Patches which are only sent to mailing lists tend to get lost. --- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 10 14:54:58 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B396A106566B for ; Sun, 10 Jan 2010 14:54:58 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 777498FC16 for ; Sun, 10 Jan 2010 14:54:58 +0000 (UTC) Received: from toad.stack.nl (toad.stack.nl [IPv6:2001:610:1108:5010::135]) by mx1.stack.nl (Postfix) with ESMTP id 8F003359D38; Sun, 10 Jan 2010 15:54:57 +0100 (CET) Received: by toad.stack.nl (Postfix, from userid 1677) id 7F61473F9D; Sun, 10 Jan 2010 15:54:57 +0100 (CET) Date: Sun, 10 Jan 2010 15:54:57 +0100 From: Jilles Tjoelker To: Fernando =?iso-8859-1?Q?Apestegu=EDa?= Message-ID: <20100110145457.GB44690@stack.nl> References: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers Subject: Re: [PATCH] linprocfs dofilesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 14:54:58 -0000 On Fri, Jan 08, 2010 at 06:19:29PM +0100, Fernando Apesteguía wrote: > This patch implements the "filesystems" file in the linux proc fs. > I have used it for some time without seeing any problems. Let me > know in case this is useful. Concrete examples of Linux apps that start working or work better with this change will be helpful. -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 10 20:13:02 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 236B4106566B for ; Sun, 10 Jan 2010 20:13:02 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.9]) by mx1.freebsd.org (Postfix) with ESMTP id C6EB98FC13 for ; Sun, 10 Jan 2010 20:13:01 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-067-233-140.pools.arcor-ip.net [88.67.233.140]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LjtbV-1O1UA91qRt-00bkCO; Sun, 10 Jan 2010 21:13:00 +0100 Received: (qmail 47818 invoked from network); 10 Jan 2010 20:12:59 -0000 Received: from f8x64.laiers.local (192.168.4.188) by ns1.laiers.local with SMTP; 10 Jan 2010 20:12:59 -0000 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Sun, 10 Jan 2010 21:12:59 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-RELEASE; KDE/4.3.4; amd64; ; ) References: <201001081414.o08EEaBM053148@casselton.net> <201001081113.30008.jhb@freebsd.org> In-Reply-To: <201001081113.30008.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201001102112.59479.max@love2party.net> X-Provags-ID: V01U2FsdGVkX18CIZJpEbKPphM+E7cULxo79Se+6zm8hEzz6ls UYpjw06nyVkAI/kEllIH5pBmF6aMemo4dN4IwbR2iZOeR3iogx JAmSf1XkYaUqmJnYbAqLw== Cc: Mark Tinguely Subject: Re: bus_dmamap_load_uio() and user data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:13:02 -0000 On Friday 08 January 2010 17:13:29 John Baldwin wrote: > On Friday 08 January 2010 9:14:36 am Mark Tinguely wrote: > > > You should use the pmap from the thread in the uio structure. Similar > > > to this from the x86 bus_dma code: > > > > > > if (uio->uio_segflg == UIO_USERSPACE) { > > > KASSERT(uio->uio_td != NULL, > > > ("bus_dmamap_load_uio: USERSPACE but no > > > proc")); pmap = vmspace_pmap(uio->uio_td->td_proc->p_vmspace); } else > > > pmap = NULL; > > > > > > Later when doing VA -> PA conversions the code does this: > > > > > > if (pmap) > > > paddr = pmap_extract(pmap, vaddr); > > > else > > > paddr = pmap_kextract(vaddr); > > > > We do that, but I notice that all the architecture that implement > > bounce buffers assume the VA is in the current map. Most of the > > addresses are KVA, but bus_dmamap_load_uio() can be in the user space. > > > > I was wondering about the sequence: > > > > bus_dmamap_load_uio() user space > > dma_load_buffer() > > add bounce page save UVA (in caller user map) > > > > later: > > > > bus_dma_sync > > copies bounce buffer from saved UVA. <- here is my concern. The user > > pmap is not remembered use current pmap. > > > > Since the bounce buffer copy routines have been running in other > > architectures for years without corruption, I was wondering we can safely > > assume that the dma sync is running in the same thread/address space as > > the bus_dmamap_load_uio call. I was hoping you would say, don't worry the > > scheduler would always reload the same thread to execute the dma sync code > > ... > > Ahh. I think bus_dmamap_load_uio() doesn't do deferred callbacks (i.e. > mandates BUS_DMA_NOWAIT), and probably is always invoked from curthread. > Even in the case of aio, the thread's vmspace is the effective one at the > time bus_dmamap_load_uio() would be invoked, so in practice it is safe. I ran into ?this? problem with bus_dmamap_sync and bounce buffers while trying to do a BUS_DMASYNC_POSTREAD in interrupt context. The sync code was trying to copy from bounce buffer to the UVA without proper context -> SEGFAULT. I tried to move the sync to the ioctl context that is used by the userland to figure out which part of the buffer is "ready" ... this /kind of/ worked, but lead to DMA problems in ata (which I didn't yet investigate) when trying to write the buffer to disk. I meanwhile moved to exporting a kernel buffer instead, using OBJT_SG - which is a bit more work and eats KVA, but at least on amd64 there is no shortage of that. -- Max From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 10 21:26:58 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA4021065692 for ; Sun, 10 Jan 2010 21:26:58 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by mx1.freebsd.org (Postfix) with ESMTP id 627358FC08 for ; Sun, 10 Jan 2010 21:26:57 +0000 (UTC) Received: by ewy5 with SMTP id 5so9939199ewy.14 for ; Sun, 10 Jan 2010 13:26:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=HFXp1PfHf6ezLosoOR+F3kKScYipqCKNQY+VuduJ3Cg=; b=LB0zPVp4hoA1Y6gzxbzETmafwWf4DajhRwyRC8U1JXRoRIisrlAksLSiEV9z1aKRlB ReIsI9/uG0HxUYAGDNr6bT0o/Qb1gpwVAJPhuKFpN78td/LCWYRDTo2Htu7KwX6x+wb3 nK6bUwHqgXrJ3VKoZWpZcdVD7g/nyzBBaf3IU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=NxU3QSDdl45LJsfpvuqV05t8ddvTROdPLzq/8Zx9VT5iO3Th1JK1LZVdxKa4FiYUS3 D2l2iGORdfufYb9Hu0+3/AzuWMCU1wtMgvwhx3sBon2VHSDPCtn0S9tzWhPVGaYG9g/l BUb2sN1D2ZRHEzrt5mebM96R29xMfNH2MNm+E= MIME-Version: 1.0 Received: by 10.213.38.208 with SMTP id c16mr262200ebe.7.1263158811702; Sun, 10 Jan 2010 13:26:51 -0800 (PST) In-Reply-To: <20100110111824.5e467773@ernst.jennejohn.org> References: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> <20100110111824.5e467773@ernst.jennejohn.org> Date: Sun, 10 Jan 2010 22:26:51 +0100 Message-ID: <1bd550a01001101326i7ffd793egd14fe6d8e649123e@mail.gmail.com> From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: gary.jennejohn@freenet.de Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] linprocfs dofilesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 21:26:58 -0000 2010/1/10 Gary Jennejohn : > On Fri, 8 Jan 2010 18:19:29 +0100 > Fernando Apestegu__a wrote: > >> Hi all, >> >> This patch implements the "filesystems" file in the linux proc fs. >> I have used it for some time without seeing any problems. Let me >> know in case this is useful. >> >> Tested against 8.0-RELEASE-p1 >> >> Thanks > > You should file a PR with this, if you haven't done so already. > > Patches which are only sent to mailing lists tend to get lost. Done. misc/142595 > > --- > Gary Jennejohn > From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 10 21:33:56 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9908106566B for ; Sun, 10 Jan 2010 21:33:56 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by mx1.freebsd.org (Postfix) with ESMTP id 3F9118FC0C for ; Sun, 10 Jan 2010 21:33:56 +0000 (UTC) Received: by ewy5 with SMTP id 5so9943918ewy.14 for ; Sun, 10 Jan 2010 13:33:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=t0E02Wr7do2hQ1Uj1rcpJc6W7NRxuEq7m6VIGU6g+XA=; b=K6ptHRuxmGrmyIDJ2RZ5DwEDRthkytItgA19gsQR465rtf8CYiLnQOu7eIwhqqOoc9 03J5uBoxdNa5IGLYK6qcfkm+R21vG1mI7e6LvisSb1Xis4lCSGwlqDGnSZ085s15wfbE /OzbRdX9u1oWD5StbHEwoeEMsqkTG6p3pnIpI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=e+tTbON87gQFJF9Aw5LCi3tW1gLoWq+djfoiNycN/C+BrKwhObaCfSDU3smTuQhr6Q I/CoHkgjoI2vUU7FldxHNAUEmx0Z44+fI9VzY5gBNX8Y8Ke+hE5+i7jDlSYrfYfTtrUw f2xC7BwiJAHmQejxJZ4b7KJ5fbipClAd43e0w= MIME-Version: 1.0 Received: by 10.213.100.167 with SMTP id y39mr267031ebn.70.1263159235353; Sun, 10 Jan 2010 13:33:55 -0800 (PST) In-Reply-To: <20100110145457.GB44690@stack.nl> References: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> <20100110145457.GB44690@stack.nl> Date: Sun, 10 Jan 2010 22:33:55 +0100 Message-ID: <1bd550a01001101333kd63d72arc0c5fbc9314b5f03@mail.gmail.com> From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers Subject: Re: [PATCH] linprocfs dofilesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 21:33:56 -0000 2010/1/10 Jilles Tjoelker : > On Fri, Jan 08, 2010 at 06:19:29PM +0100, Fernando Apestegu=EDa wrote: >> This patch implements the "filesystems" file in the linux proc fs. >> I have used it for some time without seeing any problems. Let me >> know in case this is useful. > > Concrete examples of Linux apps that start working or work better with > this change will be helpful. Some small utilities as procinfo[1] and other system information apps[2], but it is not the most used file under /proc. I did this mostly because I wanted/needed to test my own application. Cheers. [1] http://linux.die.net/man/8/procinfo [2] http://sourceforge.net/projects/gsysinfo/ > > -- > Jilles Tjoelker > From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 11 01:35:59 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06DB71065670; Mon, 11 Jan 2010 01:35:59 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 9CBC98FC14; Mon, 11 Jan 2010 01:35:58 +0000 (UTC) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id o0B1ZvoD071841; Sun, 10 Jan 2010 19:35:57 -0600 (CST) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1263173757; bh=4J5IBzmAbBNs62fmn5g2lD7hnOmYKopvzMJNvVAgk0I=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=D4IMXHnjgRieLSxEmKgbvqpo2uz26NOic5KmXtc7OA45l/cQv+xaz3msLEQf5Qgek LnqC0RYeWmIzBQaBOnFV+d2xa8K0+MDqVcf2HWLeToF0GPTJ+S8YckOyPTkN5riEJS LceV7cWq8AIx5TBsz1ru95UqSCJY8mMVKuwTvJMc= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id o0B1ZuIR071840; Sun, 10 Jan 2010 19:35:56 -0600 (CST) (envelope-from tinguely) Date: Sun, 10 Jan 2010 19:35:56 -0600 (CST) From: Mark Tinguely Message-Id: <201001110135.o0B1ZuIR071840@casselton.net> To: freebsd-hackers@freebsd.org, max@love2party.net In-Reply-To: <201001102112.59479.max@love2party.net> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.2 (casselton.net [127.0.0.1]); Sun, 10 Jan 2010 19:35:57 -0600 (CST) X-Mailman-Approved-At: Mon, 11 Jan 2010 02:30:41 +0000 Cc: tinguely@casselton.net Subject: Re: bus_dmamap_load_uio() and user data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 01:35:59 -0000 > > Ahh. I think bus_dmamap_load_uio() doesn't do deferred callbacks (i.e. > > mandates BUS_DMA_NOWAIT), and probably is always invoked from curthread. > > Even in the case of aio, the thread's vmspace is the effective one at the > > time bus_dmamap_load_uio() would be invoked, so in practice it is safe. > > I ran into ?this? problem with bus_dmamap_sync and bounce buffers while trying > to do a BUS_DMASYNC_POSTREAD in interrupt context. The sync code was trying > to copy from bounce buffer to the UVA without proper context -> SEGFAULT. I > tried to move the sync to the ioctl context that is used by the userland to > figure out which part of the buffer is "ready" ... this /kind of/ worked, but > lead to DMA problems in ata (which I didn't yet investigate) when trying to > write the buffer to disk. > > I meanwhile moved to exporting a kernel buffer instead, using OBJT_SG - which > is a bit more work and eats KVA, but at least on amd64 there is no shortage of > that. > > -- > Max Thank-you for the information. If it is possible for the user context to be inactive in the DMA routines, (as you pointed out the interrupt context) then I was thinking we would have to: 1) include the pmap in the bounce buffer structures in busdma_load_buffer(). 2) if pmap is not kernel pmap, and not equal to the current pmap then a) map physical page in current pmap b) copy from buffer using the new mapping unfortunately, it is possible one of the L2 cache is VIPT which will introducing page color issue and requiring every color KVAs. we have the same situation in the bus dma sync routine. I will see if those with this hardware would put a test case for inactive user pmap into the code. We would see it more often in cache syncing than just happen to trip over bounce buffer situation. --Mark Tinguely. From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 11 19:57:46 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5D7D106566C for ; Mon, 11 Jan 2010 19:57:46 +0000 (UTC) (envelope-from fazaeli@sepehrs.com) Received: from sepehrs.com (sepehrs.com [213.217.59.98]) by mx1.freebsd.org (Postfix) with ESMTP id 454A98FC0A for ; Mon, 11 Jan 2010 19:57:43 +0000 (UTC) Received: from [192.168.1.180] ([192.168.3.1]) by sepehrs.com (8.14.3/8.14.3) with ESMTP id o0BJIGcK039719 for ; Mon, 11 Jan 2010 22:48:16 +0330 (IRST) Message-ID: <4B4B7A7F.2090808@sepehrs.com> Date: Mon, 11 Jan 2010 22:52:39 +0330 From: "H.Fazaeli" User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: uiomove and mutex X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 19:57:46 -0000 dear gurus man mutex(9) states that: "No mutexes should be held (except for Giant) across functions which access memory in userspace, such as copyin(9), copyout(9), uiomove(9), fuword(9), etc. No locks are needed when calling these functions." can someone pls. explain why it is so? Suppose I have a kernel buffer to which kernel writes and userland processes read via a character device. In the device read method, If we unlock the mutex just before uiomove, is it guaranteed that kernel does not write to the buffer in the middle of uiomove? If yes, how? What is the solution in such a situation? rwlocks? an intermediate buffer? -- Best regards. Hooman Fazaeli From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 11 20:11:19 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EC211065676 for ; Mon, 11 Jan 2010 20:11:19 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 612F68FC15 for ; Mon, 11 Jan 2010 20:11:18 +0000 (UTC) Received: by pxi12 with SMTP id 12so14759843pxi.3 for ; Mon, 11 Jan 2010 12:11:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=PHGBtmxKmiLasGJi4ti2aMkhFTRiHzWtE09rnVe7WjQ=; b=ih2NZaDW2McXGhpKHpzwpolRoQMbyi31O2afBrrcqja4fKFNc+8P/8wL2Ihvga0mGY FSHpbX6Llzuuoyf1yQVdRxpYaeK0p9YQ/Kpzqu4dm3mdYTsdQc2Nl4JTq3e3WCP+NApP RzjreNfo5EEvCW9MGzBqyEScxwZFpjramQy0Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Enwxg24uuru2dW20dPPIGAA3Z2CNHH5QOnavGU86EVVAqXSoITonCujO/ZpoSIhrmp 2CHS+mhTlKBlMHddbuhltmkqfQPDmaP9+T7e5kE9wi9XksFg171A0tUecgwpXmP6QlOK /HMqz+dg0rUutnJdRBackHeMnvii86hH120ao= MIME-Version: 1.0 Received: by 10.114.18.37 with SMTP id 37mr460118war.143.1263240676252; Mon, 11 Jan 2010 12:11:16 -0800 (PST) In-Reply-To: <4B4B7A7F.2090808@sepehrs.com> References: <4B4B7A7F.2090808@sepehrs.com> Date: Mon, 11 Jan 2010 12:11:16 -0800 Message-ID: From: Xin LI To: "H.Fazaeli" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: uiomove and mutex X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 20:11:19 -0000 On Mon, Jan 11, 2010 at 11:22 AM, H.Fazaeli wrote: > dear gurus > > man mutex(9) states that: > > "No mutexes should be held (except for Giant) across functions which > access memory in userspace, such as copyin(9), copyout(9), uiomove(9), > fuword(9), etc. =C2=A0No locks are needed when calling these functions." > > can someone pls. explain why it is so? These routines MAY yield control. Mutexes should never be held when the calling thread is going to sleep, etc., since they are not supposed to be held for long time, and holding mutex while sleeping may cause deadlock or "livelock" if it has been slept due to someone else sleeping and requires the mutex to be awaken. > Suppose I have a kernel buffer to which kernel writes and > userland processes read via a character device. In the device > read method, If we unlock the mutex just before uiomove, is it > guaranteed that kernel does not write to the buffer in the middle > of uiomove? If yes, how? What is the solution in such a situation? > rwlocks? an intermediate buffer? This really depends on the nature of your operation and there is no generic solution. If the memory block is managed by the driver, it would be probably something like this (just an example to demonstrate the idea): (define a temporary pointer, say p) - hold the mutex - p =3D the block - remove the block from your buffer queue - unhold the mutex - uiomove to userland - hold the mutex - add p back to your buffer queue - unhold mutex However, you can of course find something better than this for situations more specific and avoid some mutex operation... Cheers, --=20 Xin LI http://www.delphij.net From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 11 20:22:45 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2D491065676 for ; Mon, 11 Jan 2010 20:22:45 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mx1.freebsd.org (Postfix) with ESMTP id 4C45B8FC22 for ; Mon, 11 Jan 2010 20:22:45 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-066-024-221.pools.arcor-ip.net [88.66.24.221]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0MJEQE-1NRftm0Jqc-002xjU; Mon, 11 Jan 2010 21:22:44 +0100 Received: (qmail 70266 invoked from network); 11 Jan 2010 20:22:43 -0000 Received: from f8x64.laiers.local (192.168.4.188) by laiers.local with SMTP; 11 Jan 2010 20:22:43 -0000 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Mon, 11 Jan 2010 21:22:42 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-RELEASE-p2; KDE/4.3.4; amd64; ; ) References: <4B4B7A7F.2090808@sepehrs.com> In-Reply-To: <4B4B7A7F.2090808@sepehrs.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001112122.43000.max@love2party.net> X-Provags-ID: V01U2FsdGVkX18b+OOHGjlzPcw9OsWDJ6CT6SaojFAFfWpDiXh 3LF9rf63t+v6cxVPbXAHDHnaw2igrpmCatDVISM7WvEurPZL+e pXMGCusY7mc0rXJ9rj+yw== Cc: "H.Fazaeli" Subject: Re: uiomove and mutex X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 20:22:45 -0000 On Monday 11 January 2010 20:22:39 H.Fazaeli wrote: > dear gurus > > man mutex(9) states that: > > "No mutexes should be held (except for Giant) across functions which > access memory in userspace, such as copyin(9), copyout(9), uiomove(9), > fuword(9), etc. No locks are needed when calling these functions." > > can someone pls. explain why it is so? Any memory access to user memory (unless the memory has been wired down before) can result in a swap in from secondary storage, which - in turn - results in a sleep. Most locks are not allowed to be held over a sleep. See locking(9) for details. > Suppose I have a kernel buffer to which kernel writes and > userland processes read via a character device. In the device > read method, If we unlock the mutex just before uiomove, is it > guaranteed that kernel does not write to the buffer in the middle > of uiomove? If yes, how? What is the solution in such a situation? > rwlocks? an intermediate buffer? sx(9) is one possibility. The other way is to use a pointer or state that you modify while holding the mutex: Thread1: lock(&mtx); buffer_in_use=1; unlock(&mtx); uiomove() lock(&mtx); buffer_in_use=0; wakeup(&buffer_in_use); unlock(&mtx); Thread2: lock(&mtx); while(buffer_in_use) mlseep(&buffer_in_use, &mtx, ...) do_stuff_to_the_buffer(); unlock(&mtx); -- Max From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 12 14:57:09 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 950F51065670 for ; Tue, 12 Jan 2010 14:57:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 661648FC13 for ; Tue, 12 Jan 2010 14:57:09 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 13DE146B52; Tue, 12 Jan 2010 09:57:09 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 7AE298A01D; Tue, 12 Jan 2010 09:56:56 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 12 Jan 2010 08:14:08 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091231; KDE/4.3.1; amd64; ; ) References: <4B4B7A7F.2090808@sepehrs.com> <201001112122.43000.max@love2party.net> In-Reply-To: <201001112122.43000.max@love2party.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001120814.08397.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 12 Jan 2010 09:56:56 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Max Laier , "H.Fazaeli" Subject: Re: uiomove and mutex X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 14:57:09 -0000 On Monday 11 January 2010 3:22:42 pm Max Laier wrote: > On Monday 11 January 2010 20:22:39 H.Fazaeli wrote: > > dear gurus > > > > man mutex(9) states that: > > > > "No mutexes should be held (except for Giant) across functions which > > access memory in userspace, such as copyin(9), copyout(9), uiomove(9), > > fuword(9), etc. No locks are needed when calling these functions." > > > > can someone pls. explain why it is so? > > Any memory access to user memory (unless the memory has been wired down > before) can result in a swap in from secondary storage, which - in turn - > results in a sleep. Most locks are not allowed to be held over a sleep. > > See locking(9) for details. > > > Suppose I have a kernel buffer to which kernel writes and > > userland processes read via a character device. In the device > > read method, If we unlock the mutex just before uiomove, is it > > guaranteed that kernel does not write to the buffer in the middle > > of uiomove? If yes, how? What is the solution in such a situation? > > rwlocks? an intermediate buffer? > > sx(9) is one possibility. The other way is to use a pointer or state that you > modify while holding the mutex: > > Thread1: > > lock(&mtx); > buffer_in_use=1; > unlock(&mtx); > > uiomove() > > lock(&mtx); > buffer_in_use=0; > wakeup(&buffer_in_use); > unlock(&mtx); > > Thread2: > > lock(&mtx); > while(buffer_in_use) > mlseep(&buffer_in_use, &mtx, ...) > do_stuff_to_the_buffer(); > unlock(&mtx); Note that a simple flag like this is actually a slower version of using an sx lock. If you have a very simple driver I would just use an sx lock. If you later find that you need to optimize it then you can look at doing something fancier. If you already have other state you are frobbing that includes the equivalent of a buffer_in_use flag then an approach like the above may be ok instead of an sx lock. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 12 22:18:15 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 700441065694 for ; Tue, 12 Jan 2010 22:18:15 +0000 (UTC) (envelope-from lgj@usenix.org) Received: from lonestar.usenix.org (lonestar.usenix.org [131.106.3.102]) by mx1.freebsd.org (Postfix) with ESMTP id 59AD18FC27 for ; Tue, 12 Jan 2010 22:18:15 +0000 (UTC) Received: from vesper.usenix.org (vesper.usenix.org [131.106.3.142]) by lonestar.usenix.org (8.14.2/8.14.2) with ESMTP id o0CMBxdG026002 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Tue, 12 Jan 2010 14:18:14 -0800 (PST) Message-Id: From: Lionel Garth Jones To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 12 Jan 2010 14:18:14 -0800 X-Mailer: Apple Mail (2.930.3) X-DCC-Usenix-Metrics: lonestar; whitelist X-Spam-Status: No, score=0.7 required=6.0 tests=ALL_TRUSTED, FH_DATE_PAST_20XX autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on lonestar X-Mailman-Approved-At: Tue, 12 Jan 2010 22:57:49 +0000 Subject: HotPar '10 Submissions Deadline Approaching X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 22:18:15 -0000 We're writing to remind you that the submissions deadline for the 2nd USENIX Workshop on Hot Topics in Parallelism (HotPar '10) is quickly approaching. Please submit you work by Sunday, January 24, 2010. http://www.usenix.org/hotpar10/cfpb HotPar '10 will bring together researchers and practitioners doing innovative work in the area of parallel computing. HotPar recognizes the broad impact of multicore computing and seeks relevant contributions in all fields, including application design, languages and compilers, systems, and architecture. We request submissions of 5-page position papers that propose new directions for research of products in these areas, advocate non-traditional approaches to the problems engendered by parallelism, or potentially generate controversy and discussion. More information and submission guidelines are available at http://www.usenix.org/hotpar10/cfpb We look forward to receiving your submissions! Sincerely, Geoff Lowney, Intel David Patterson, University of California, Berkeley HotPar '10 Program Co-Chairs hotpar10chairs@usenix.org ------------------------------------------------------------------------ Call for Papers: 2nd USENIX Workshop on Hot Topics in Parallelism (HotPar '10) June 14-15, 2010 Berkeley, CA, USA http://www.usenix.org/hotpar10/cfpb Sponsored by USENIX in cooperation with ACM SIGMETRICS, ACM SIGSOFT, ACM SIGOPS, ACM SIGARCH, and ACM SIGPLAN Position paper submissions due: January 24, 2010 ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 13 01:59:49 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 686511065679 for ; Wed, 13 Jan 2010 01:59:49 +0000 (UTC) (envelope-from spry@anarchy.in.the.ph) Received: from mail-pz0-f185.google.com (mail-pz0-f185.google.com [209.85.222.185]) by mx1.freebsd.org (Postfix) with ESMTP id 4EAAF8FC0A for ; Wed, 13 Jan 2010 01:59:49 +0000 (UTC) Received: by pzk15 with SMTP id 15so14497378pzk.3 for ; Tue, 12 Jan 2010 17:59:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.48.10 with SMTP id v10mr2721654wav.11.1263346553872; Tue, 12 Jan 2010 17:35:53 -0800 (PST) Date: Wed, 13 Jan 2010 09:35:53 +0800 Message-ID: From: Mars G Miro To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Mailman-Approved-At: Wed, 13 Jan 2010 02:15:03 +0000 Subject: Cross-building amd64->i386 fails at RESCUE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 01:59:49 -0000 Hi List! Has anyone successfully cross-built amd64->i386 in 8.0? I tried but got these: http://pastebin.com/f1cafe40d . Setting NO_RESCUE builds fine, so I'm thinking if i'd have /rescue, I'll prolly just hafta build it once I've had my x86 up. Thanks. -- cheers mars ----- From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 13 02:38:03 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 936BF106566C for ; Wed, 13 Jan 2010 02:38:03 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id 526C58FC13 for ; Wed, 13 Jan 2010 02:38:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id DD5157BFD4; Wed, 13 Jan 2010 15:21:54 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fNn8k6HiQe2v; Wed, 13 Jan 2010 15:21:50 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Wed, 13 Jan 2010 15:21:50 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id C4CE611432; Wed, 13 Jan 2010 15:21:49 +1300 (NZDT) Date: Wed, 13 Jan 2010 15:21:49 +1300 From: Andrew Thompson To: Mars G Miro Message-ID: <20100113022149.GF63408@citylink.fud.org.nz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org Subject: Re: Cross-building amd64->i386 fails at RESCUE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 02:38:03 -0000 On Wed, Jan 13, 2010 at 09:35:53AM +0800, Mars G Miro wrote: > Hi List! > > Has anyone successfully cross-built amd64->i386 in 8.0? I tried > but got these: > http://pastebin.com/f1cafe40d . All the time. You didnt mention how you are doing the build, I use % make buildworld buildkernel TARGET=i386 You may want to clear out your /usr/obj and try again. Andrew From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 13 02:52:08 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9BA4106566B for ; Wed, 13 Jan 2010 02:52:08 +0000 (UTC) (envelope-from spry@anarchy.in.the.ph) Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mx1.freebsd.org (Postfix) with ESMTP id BCE518FC12 for ; Wed, 13 Jan 2010 02:52:08 +0000 (UTC) Received: by pwi15 with SMTP id 15so2786602pwi.3 for ; Tue, 12 Jan 2010 18:52:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.115.3.4 with SMTP id f4mr538960wai.10.1263351122597; Tue, 12 Jan 2010 18:52:02 -0800 (PST) In-Reply-To: <20100113022149.GF63408@citylink.fud.org.nz> References: <20100113022149.GF63408@citylink.fud.org.nz> Date: Wed, 13 Jan 2010 10:52:02 +0800 Message-ID: From: Mars G Miro To: Andrew Thompson , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Wed, 13 Jan 2010 04:06:16 +0000 Cc: Subject: Re: Cross-building amd64->i386 fails at RESCUE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 02:52:08 -0000 On Wed, Jan 13, 2010 at 10:21 AM, Andrew Thompson wro= te: > On Wed, Jan 13, 2010 at 09:35:53AM +0800, Mars G Miro wrote: >> Hi List! >> >> =A0 =A0 Has anyone successfully cross-built amd64->i386 in 8.0? I tried >> but got these: >> http://pastebin.com/f1cafe40d . > > All the time. You didnt mention how you are doing the build, I use > > =A0% make buildworld buildkernel TARGET=3Di386 > I did: setenv MAKEOBJDIRPREFIX /usr/obj-i386 setenv TARGET i386 setenv TARGET_ARCH i386 then 'make buildworld' in /usr/src > You may want to clear out your /usr/obj and try again. > > Yes I always do that. > Andrew > --=20 cheers mars ----- Pablo Picasso - "Computers are useless. They can only give you answers." - http://www.brainyquote.com/quotes/authors/p/pablo_picasso.html From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 13 16:05:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 502D01065693; Wed, 13 Jan 2010 16:05:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 201798FC0A; Wed, 13 Jan 2010 16:05:38 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id C6BA446B17; Wed, 13 Jan 2010 11:05:37 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id C00578A025; Wed, 13 Jan 2010 11:05:34 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 13 Jan 2010 08:51:42 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091231; KDE/4.3.1; amd64; ; ) References: <20100113022149.GF63408@citylink.fud.org.nz> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001130851.42443.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 13 Jan 2010 11:05:34 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Mars G Miro , Andrew Thompson Subject: Re: Cross-building amd64->i386 fails at RESCUE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 16:05:38 -0000 On Tuesday 12 January 2010 9:52:02 pm Mars G Miro wrote: > On Wed, Jan 13, 2010 at 10:21 AM, Andrew Thompson wrote: > > On Wed, Jan 13, 2010 at 09:35:53AM +0800, Mars G Miro wrote: > >> Hi List! > >> > >> Has anyone successfully cross-built amd64->i386 in 8.0? I tried > >> but got these: > >> http://pastebin.com/f1cafe40d . > > > > All the time. You didnt mention how you are doing the build, I use > > > > % make buildworld buildkernel TARGET=i386 > > > > I did: > > setenv MAKEOBJDIRPREFIX /usr/obj-i386 > setenv TARGET i386 > setenv TARGET_ARCH i386 > > then 'make buildworld' in /usr/src Can you verify that 'make buildworld TARGET=i386' works? If so, can you try just setting MAKEOBJDIRPREFIX via setenv (or setting it as an argument to make)? -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 14 06:44:09 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01EEC1065670 for ; Thu, 14 Jan 2010 06:44:09 +0000 (UTC) (envelope-from lujiandong1001@yahoo.com.cn) Received: from web15707.mail.cnb.yahoo.com (web15707.mail.cnb.yahoo.com [202.165.102.74]) by mx1.freebsd.org (Postfix) with SMTP id 4B8F38FC0A for ; Thu, 14 Jan 2010 06:44:07 +0000 (UTC) Received: (qmail 89373 invoked by uid 60001); 14 Jan 2010 06:44:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.cn; s=s1024; t=1263451443; bh=S1KTkgiw5lfYOvfSIHeZrDor7U5WupmMF1N2/6Yy9Ds=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=i1WMq9zSeQkj38eI/5enMLDX4XwE/EUwb515GRyAl40JP48BKxn07MSNyN9wP3JsT7/5l3YTL1fN2U9ZiDbtOJBHkosK1gm86aIoeLXlxBU+Lp4QSNVUTENVzyset18u7Zr0GMm8LHFI28a6EvSaVgPqQ1XmEWAKlKoQU1ft4Ns= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.cn; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=s2M2290qyWub31zLNCv3sVK5UhPgeCjVc232Few3ZGLc6Tcs43MNf22F3cC5GAl5KXZWd0rlU0jQsY7QJvXc/4gdbiH9f1Gjf+jlkN4FSORGGIWyypyfBxbdV30SgNpBswQhB6jEWJ4gke65wdJZT0m5cu43FUHVJXfBQ9W7nUE=; Message-ID: <739519.89145.qm@web15707.mail.cnb.yahoo.com> X-YMail-OSG: BWEkFBoVM1ktgjXUewXbZITmPRf5Bp2D0qKGhTBoBxKSLhVvXtUBdPsj8qp8x1irjTulifRYx8PCq1AlIeWeDcejJl1ZwbFfQ9w4.S_1z.2qun0V83ri69vqGslZ8dcliKu_QKs_TB8YXT1dr.O850oGbb0i1L7b68or6vBQk02mWDJ7FmZ0KHJV8sqPE_V11p3utscgdL0WANUK4wTxcoIBeOy4tb7EVPLsZSfUHeVUSnQNcQjZk6CFPVVbz6E- Received: from [218.241.83.19] by web15707.mail.cnb.yahoo.com via HTTP; Thu, 14 Jan 2010 14:44:03 CST X-Mailer: YahooMailRC/240.3 YahooMailWebService/0.8.100.260964 Date: Thu, 14 Jan 2010 14:44:03 +0800 (CST) From: Jiandong Lu To: freebsd-hackers@freebsd.org MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 14 Jan 2010 12:18:58 +0000 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: about libstdc++ ,change the defaule allocator X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 06:44:09 -0000 hello,everyone.=0A I get the current source code from svn,and successfu= lly build world.=0A c++'s standard library is from gnu. This library pr= ivodes many allocators: =0Abitmap_allocator_base=0Amalloc_allocator_base=0A= mt_allocator_base=0Anew_allocator_base=0Apool_allocator_base=0AI want to kn= ow how to set a default allocator,and how to change it.=0A=0AI have read th= e Makefile:=0A/usr/src/gnu/lib/libstdc++/Makefile=0A=0AThanks.=0A=0A=0A=0A = ___________________________________________________________ =0A =BA= =C3=CD=E6=BA=D8=BF=A8=B5=C8=C4=E3=B7=A2=A3=AC=D3=CA=CF=E4=BA=D8=BF=A8=C8=AB= =D0=C2=C9=CF=CF=DF=A3=A1 =0Ahttp://card.mail.cn.yahoo.com/ From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 14 18:54:50 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8ECB0106566B for ; Thu, 14 Jan 2010 18:54:50 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-px0-f183.google.com (mail-px0-f183.google.com [209.85.216.183]) by mx1.freebsd.org (Postfix) with ESMTP id 65B828FC14 for ; Thu, 14 Jan 2010 18:54:50 +0000 (UTC) Received: by pxi13 with SMTP id 13so602259pxi.3 for ; Thu, 14 Jan 2010 10:54:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=jOnGk26vP146VNRfQjBZzF0w58rmXfiiQr5PyywCqmM=; b=HoDbP2WyRsC0F4kp2Sdi1z+cnY/o8fK2rAxfKNxwy6S4160jFq5Y8mWdG93WMcBmpG x7hzSu2acCXxybOOXjvjZdjpCJqXDQOyC9o6b71nzkZhHQCC+P1pW7oz3KCvR1eR/GGp 172lOz0Jwzd2Tz/NoPftS2uVtdZV/dDFyMrMY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=d0Mz9p285Z4pFSfnflLrPGoZ5ga2bMa06pzO+jVsVdlUzh0/fJBFOcsnpA18aqANp9 8KJiOmK/dALUdp7dUFfrx4BVamcFHIUtS79sTMEjUBP6qd+xvV9qfPcmzwuRyRJRPjNI +zhqwNyl170U35fYViMWE0rLR/0VXB2Wj+nqE= MIME-Version: 1.0 Received: by 10.115.26.7 with SMTP id d7mr837922waj.12.1263495283140; Thu, 14 Jan 2010 10:54:43 -0800 (PST) In-Reply-To: <739519.89145.qm@web15707.mail.cnb.yahoo.com> References: <739519.89145.qm@web15707.mail.cnb.yahoo.com> Date: Thu, 14 Jan 2010 10:54:42 -0800 Message-ID: From: Xin LI To: Jiandong Lu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: about libstdc++ ,change the defaule allocator X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 18:54:50 -0000 2010/1/13 Jiandong Lu : > hello,everyone. > =C2=A0 =C2=A0 I get the current source code from svn,and successfully bui= ld world. > =C2=A0 =C2=A0 c++'s standard library is from gnu. This library privodes m= any allocators: > bitmap_allocator_base > malloc_allocator_base > mt_allocator_base > new_allocator_base > pool_allocator_base > I want to know how to set a default allocator,and how to change it. > > I have read the Makefile: > /usr/src/gnu/lib/libstdc++/Makefile I have no idea why you will think the allocator is being changed here... The standard and portable way to override the allocator is at the point you instance C++ templates by specifing Allocator parameter. If, however, you want to globally change the default allocator without touching all your source files, the only way is to make modification on c++allocator.h, which is, in my opinion, never permitted by the standard and banned by god. Cheers, --=20 Xin LI http://www.delphij.net From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 15 09:43:51 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E7F01065670 for ; Fri, 15 Jan 2010 09:43:51 +0000 (UTC) (envelope-from mail@maxlor.com) Received: from mxout004.mail.hostpoint.ch (mxout004.mail.hostpoint.ch [217.26.49.183]) by mx1.freebsd.org (Postfix) with ESMTP id DF5088FC13 for ; Fri, 15 Jan 2010 09:43:50 +0000 (UTC) Received: from [10.0.2.20] (helo=asmtp002.mail.hostpoint.ch) by mxout004.mail.hostpoint.ch with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1NViPr-0000Oa-HO for freebsd-hackers@freebsd.org; Fri, 15 Jan 2010 10:24:27 +0100 Received: from [82.136.101.114] (helo=atlantis.intranet) by asmtp002.mail.hostpoint.ch with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1NViPr-000PUg-Cv for freebsd-hackers@freebsd.org; Fri, 15 Jan 2010 10:24:27 +0100 Received: from [192.168.10.167] (pub212004072186.fx-hfc.datazug.ch [212.4.72.186]) by atlantis.intranet (Postfix) with ESMTPSA id 2112E1B5D8 for ; Fri, 15 Jan 2010 10:24:27 +0100 (CET) X-Authenticated-Sender-Id: mail@maxlor.com From: Benjamin Lutz To: freebsd-hackers@freebsd.org Date: Fri, 15 Jan 2010 10:24:26 +0100 User-Agent: KMail/1.9.9 X-Face: $Ov27?7*N,h60fIEfNJdb!m,@#4T/d; 1hw|W0zvsHM(a$Yn6BYQ0^SEEXvi8>D`|V*F"=?utf-8?q?=5F+=0A=09R2?=@Aq>+mNb4`,'[[%z9v0Fa~]AD1}xQO3|>b.z&}l#R-_(P`?@Mz"kS; XC>Eti,i3>%@=?utf-8?q?g=3F=0A=094f?=,\c7|Ghwb&ky$b2PJ^\0b83NkLsFKv|smL/cI4UD%Tu8alAD MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201001151024.26325.mail@maxlor.com> Subject: getifaddrs(3), ifa_data field X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 09:43:51 -0000 I noticed that the getifaddrs(3) library function doesn't behave as=20 described in the manpage. The manpage says: The ifa_data field references address family specific data. For AF_LINK addresses it contains a pointer to the struct if_data (as defined in include file ) which contains various interface attributes and statistics. This is correct and works. For all other address families, it contains a pointer to the struct ifa_data (as defined in include file ) which contains per=E2=80=90address interface statistics. This is not what I'm seeing. First, I can't find a struct ifa_data=20 definition, and second, the ifa_data field seems to be NULL for all address= =20 types other than AF_LINK. I'm thinking there are three possible explanations for this behaviour: =2D I need to set some non-default option to enable the ifa_data field for non-AF_LINK addresses. =2D There's a regression; the ifa_data field should contain data for non-AF_LINK addresses but no longer does. =2D The behaviour is correct, but the manpageis outdated. Please give me a bit more background information on this issue. Cheers Benjamin From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 15 11:50:42 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9D4F106566B for ; Fri, 15 Jan 2010 11:50:42 +0000 (UTC) (envelope-from lsimakov@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 712358FC15 for ; Fri, 15 Jan 2010 11:50:42 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id d26so51231eyd.9 for ; Fri, 15 Jan 2010 03:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=7J/g1bsi4f9JleE8q53KYfBjkHkHEAEifj1CMqZLWu0=; b=bEYJx1ggLmOPzgkd8LQNUnf8PmegDKYg2ETP4p7J4wHxp6GeGRRE7n9VttuiO9UrTD Jz+Nne0lXoR+WPCjDCikaZDRyFPWHYG4LLx0TIN7GW8DM8HrtHoSUj9ZVCd0K5SZYDIZ ZNMDypQVzFL4oN6O8C1dAnKEoQNbRUtEumluU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=TL1Q9rZEpbGWHenwfqofykZzL/r+9vcpdKisO7zu1tpZ4b+H2XedO39RskJ+ftR3qu DvCTGnuRjKbgGZ3xRLC3J91PHKN/H+amcv6K0+LqyXgEqD/b6q5J0byL/afqDKmKjhP1 Zj+doq2iGFBBQQmoWA0uycY1O2UxsELHDQc5Q= MIME-Version: 1.0 Received: by 10.216.88.2 with SMTP id z2mr742820wee.89.1263554766455; Fri, 15 Jan 2010 03:26:06 -0800 (PST) Date: Fri, 15 Jan 2010 14:26:06 +0300 Message-ID: From: q q To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Q:possibility PFIL+mbuf use for packet spawning X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 11:50:42 -0000 I'm using pfil as packet filter for packet modifications. Is it possible to spawn new packets to network from pfil using mbuf? Another question: im using m_append to change packet length and add data(its working, at least server got longer message) but when i wireshark clients packets(win machine) i see that i got acknoledge on older length not on new one. Am i missunderstanding something? Yours, qSpirit. From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 15 16:11:25 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF5971065672 for ; Fri, 15 Jan 2010 16:11:25 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 42BEB8FC17 for ; Fri, 15 Jan 2010 16:11:25 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-066-000-110.pools.arcor-ip.net [88.66.0.110]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MNQ45-1NTspO2cEj-006nw0; Fri, 15 Jan 2010 17:11:23 +0100 Received: (qmail 50931 invoked from network); 15 Jan 2010 16:11:23 -0000 Received: from f8x64.laiers.local (192.168.4.188) by laiers.local with SMTP; 15 Jan 2010 16:11:23 -0000 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Fri, 15 Jan 2010 17:11:23 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-RELEASE-p2; KDE/4.3.4; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001151711.23061.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19QaoOPXI7t97XGn3Mqoi4PP1JPzmvK+5uXAmF AozbusFIY4TfOQ+bADkx1aeAG4KeW5WPh/jlgyWZuLhtXUIgAh RNP0Bi0wbm5cj+e3O5mUQ== Cc: q q Subject: Re: Q:possibility PFIL+mbuf use for packet spawning X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:11:25 -0000 On Friday 15 January 2010 12:26:06 q q wrote: > I'm using pfil as packet filter for packet modifications. > > Is it possible to spawn new packets to network from pfil using mbuf? You can call into ip_output with a new mbuf to send a new packet. See for example pf_send_tcp in contrib/pf/net/pf.c > Another question: im using m_append to change packet length and add > data(its working, at least server got longer message) but when i wireshark > clients packets(win machine) i see that i got acknoledge on older length > not on new one. Am i missunderstanding something? Assuming you are talking about tcp packets (otherwise there wouldn't be an ack), you have to alter the tcp header, checksums, etc. as well. Just adding data doesn't work. Regards, -- Max From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 15 16:16:15 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFF8C106568B for ; Fri, 15 Jan 2010 16:16:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A09CF8FC13 for ; Fri, 15 Jan 2010 16:16:15 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 5470946B09; Fri, 15 Jan 2010 11:16:15 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id F14668A01D; Fri, 15 Jan 2010 11:16:02 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 15 Jan 2010 11:10:29 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091231; KDE/4.3.1; amd64; ; ) References: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> In-Reply-To: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201001151110.29417.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 15 Jan 2010 11:16:02 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Fernando =?iso-8859-15?q?Apestegu=EDa?= Subject: Re: [PATCH] linprocfs dofilesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:16:15 -0000 On Friday 08 January 2010 12:19:29 pm Fernando Apestegu=EDa wrote: > Hi all, >=20 > This patch implements the "filesystems" file in the linux proc fs. > I have used it for some time without seeing any problems. Let me > know in case this is useful. >=20 > Tested against 8.0-RELEASE-p1 This patch is not correct. It seems that /proc/filesystems is a list of=20 available filesystems, not a list of mounted filesystems. E.g.: > cat /proc/filesystems = =20 nodev sysfs = =20 nodev rootfs = =20 nodev bdev nodev proc nodev sockfs nodev binfmt_misc nodev usbfs nodev usbdevfs nodev futexfs nodev tmpfs nodev pipefs nodev eventpollfs nodev devpts ext2 nodev ramfs nodev hugetlbfs iso9660 nodev relayfs nodev mqueue ext3 nodev rpc_pipefs nodev nfs nodev nfs4 nodev autofs To do the same thing in FreeBSD you would need to walk the vfsconf list=20 instead. However, I'm not sure it is worth it to add this unless there are apps people commonly use that need it. =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 15 21:05:59 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54699106566B for ; Fri, 15 Jan 2010 21:05:59 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pz0-f185.google.com (mail-pz0-f185.google.com [209.85.222.185]) by mx1.freebsd.org (Postfix) with ESMTP id 303A48FC14 for ; Fri, 15 Jan 2010 21:05:58 +0000 (UTC) Received: by pzk15 with SMTP id 15so852429pzk.3 for ; Fri, 15 Jan 2010 13:05:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=mC9ATC45Im9FoHKle2EeIWemCUh/qDs96J5oHfrx28U=; b=SHFg1O4cKWyduNhdo/yYOTLBGBGvSR69kh9BQ7wxzLjANl7+FS3GK1FOKvv8y9hR7i L1QZ0d8vMzZLwnOPefksirqhS3z7hyG5tGQZJ8omCPGELZCu1eq8GNIWlW7kSUYP5rSs P11I7HGxddA+99aKORsPC7HH7QLW7B2Q94ITM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=IZMxJCNPG7G2TTajosMiHi+ERlEFKQg9Z049PAt0TVJMN6f2MZS66v4mLpOY5bnVE6 7MphBOylheZW9ZqjgEQGjtYRc6NsmLaYxlrXFPTIFJ8HOHySIyrlX6W3U8E6riRtPZIg uLVAnXutuFsvYDQ+xVKYhnC4ckJ7H26N1Up3k= MIME-Version: 1.0 Received: by 10.142.61.38 with SMTP id j38mr1954954wfa.335.1263588108987; Fri, 15 Jan 2010 12:41:48 -0800 (PST) Date: Fri, 15 Jan 2010 12:41:48 -0800 Message-ID: <7d6fde3d1001151241tfeaa4a2j1c8448e40b2b164e@mail.gmail.com> From: Garrett Cooper To: FreeBSD-Hackers Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: User error or awk bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 21:05:59 -0000 Hi Hackers, While testing out something to emulate $(abspath ) in GNU make 3.81+, I tried wrote the following in awk: gsub (/\/{2,}/, "") I expect it to squish all duplicate `/' in $0. Interestingly enough, it doesn't match my expected behavior: [gcooper@optimus ~]$ SLASHES="////////" ; test "$(echo "$SLASHES" | awk '{ gsub (/\/{2,}/, ""); print }')" = "$SLASHES"; echo $? 0 I've tried this same code on RHEL 4.6, Gentoo Linux, and of course my CURRENT box, and the results are the same. So, my question is: did I do something wrong, or accidentally stumble on an *awk bug? Thanks! -Garrett From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 15 21:56:55 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E030A106566C for ; Fri, 15 Jan 2010 21:56:55 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mx1.freebsd.org (Postfix) with ESMTP id B67648FC13 for ; Fri, 15 Jan 2010 21:56:55 +0000 (UTC) Received: by pwi15 with SMTP id 15so601970pwi.3 for ; Fri, 15 Jan 2010 13:56:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=G0mav1vtIoiccNrSQgGwUiYStOOO2txZGHJ11Tk8/K4=; b=wBERQC5ojrrl6dS3q9ZRs79AgFhGMAWv4lmhiGq4o+XKnX3MPJfepktMFcHKC7QybE CD3XB1t+L1AbTkrwvEHbMTPBGNIQVsxhP2dGNbcMTHrK/fdxfAOvAxQcoiEvsq6dUCB+ IZiPqUnX1Avo1usI3JdeuRZ0htvEHd2WBkzeU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=kKo6fhlhQ76MaX5/E4cqb28GCk011gpx9rmDXME9UnDjUdEIABrPjyARNftVeC6+tx k6H6DT/Ti+ZFcDklQkplSveODGcaN0gYtdpiReKHyBxQbqbaTntEIkS+I9AeCuAMNd8D RmsrXVVn2cORa+21zrtEZF3T76uj+c1RimUwk= MIME-Version: 1.0 Received: by 10.143.27.37 with SMTP id e37mr2003007wfj.234.1263592609575; Fri, 15 Jan 2010 13:56:49 -0800 (PST) In-Reply-To: <201001152121.o0FLLiCK067174@m5p.com> References: <7d6fde3d1001151241tfeaa4a2j1c8448e40b2b164e@mail.gmail.com> <201001152121.o0FLLiCK067174@m5p.com> Date: Fri, 15 Jan 2010 13:56:49 -0800 Message-ID: <7d6fde3d1001151356y3d2f4833o972e6a0515839ef0@mail.gmail.com> From: Garrett Cooper To: George Mitchell Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD-Hackers Subject: Re: User error or awk bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 21:56:56 -0000 On Fri, Jan 15, 2010 at 1:21 PM, George Mitchell wrote: > Try quoting the "/\/{2,}/" in your call to gsub. =A0 =A0 =A0 =A0 -- Georg= e Doesn't work :(...: nawk (FreeBSD) -- [gcooper@optimus ~]$ echo //////// | awk '{ gsub ("//{2,}/", "/"); print }' //////// gawk (Gentoo Linux) -- gcooper@orangebox /scratch/ltp/scripts $ echo //////// | awk '{ gsub ("//{2,}/", "/"); print }' //////// Thanks! -Garrett From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 15 22:02:21 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B01B1065676 for ; Fri, 15 Jan 2010 22:02:21 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pz0-f185.google.com (mail-pz0-f185.google.com [209.85.222.185]) by mx1.freebsd.org (Postfix) with ESMTP id 4EFDA8FC18 for ; Fri, 15 Jan 2010 22:02:21 +0000 (UTC) Received: by pzk15 with SMTP id 15so884709pzk.3 for ; Fri, 15 Jan 2010 14:02:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=kDqwE/tbpH6/JicGdtQOWCD/pwP3MPs9KszlScIIkDc=; b=YSDSTpYNFYQNLJMgULrX+kjmkTTQO8LRTWe01Yjxu7oU1bEH033EDWGJnuZKtdlREh 2BadJ3hPtBOZRDroySdBP9xitmq0/ZYpgOdUSD20xg5/Auw6EtHIvbrxjjnCwUfUjuQ9 Bnrdml/ls6xOCajSEzjeEMzdorvfGiJdFIVto= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=C0RNgTPXlNpLN0MC6/TNs1HvVIEf2OfPJ+fFTaJ7n99nuQK1cqpqk6Ep27awgj1+zc Skqwob9ub5ckWldGUDjyQnUerUY6zuOGWbOQ1uROf/Sml6CLbVH6JgIp3yPwkDw/rVrH DVVNN3EpvJCz5rhlYG+bRIqRRWcLB7jRZaVMI= MIME-Version: 1.0 Received: by 10.143.21.42 with SMTP id y42mr1999870wfi.207.1263592938935; Fri, 15 Jan 2010 14:02:18 -0800 (PST) In-Reply-To: <20100115215701.GN86359@bunrab.catwhisker.org> References: <7d6fde3d1001151241tfeaa4a2j1c8448e40b2b164e@mail.gmail.com> <20100115211639.GM86359@bunrab.catwhisker.org> <7d6fde3d1001151351u58ee4989m41d39538469de236@mail.gmail.com> <20100115215701.GN86359@bunrab.catwhisker.org> Date: Fri, 15 Jan 2010 14:02:18 -0800 Message-ID: <7d6fde3d1001151402m74d999e5off14be9a99b5d187@mail.gmail.com> From: Garrett Cooper To: David Wolfskill Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD-Hackers Subject: Re: User error or awk bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 22:02:21 -0000 On Fri, Jan 15, 2010 at 1:57 PM, David Wolfskill wro= te: > On Fri, Jan 15, 2010 at 01:51:34PM -0800, Garrett Cooper wrote: >> ... >> > >> > d254(6.4-S)[7] echo //////// | awk '{ gsub (/\/{2,}/, ""); print }' >> > //////// >> > d254(6.4-S)[8] echo //////// | awk '{ gsub (/\/+/, "/"); print }' >> > / >> > d254(6.4-S)[9] >> >> =A0 =A0 I'm avoiding this because it would create an infinite loop in my >> awk script (I want to squish slashes, not eliminate them completely >> :)...). > > Errr... =A0I thought "/\/{2,}/" was a regex referring to "2 or more > consecutive /", and the replacement was "", which sounds about as close > to eliminating them completely as I can imagine. =A0:-} > > How about: > > d254(6.4-S)[10] echo //////// | awk '{ gsub (/\/\/+/, "/"); print }' > / > d254(6.4-S)[11] > > then? This works very well. Is the expression quantifier operator [ `{' ] not supported in awk like perl, python, tcl, etc? Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 15 21:55:21 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B6D0106566B for ; Fri, 15 Jan 2010 21:55:21 +0000 (UTC) (envelope-from talon@lpthe.jussieu.fr) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.freebsd.org (Postfix) with ESMTP id 37DD08FC16 for ; Fri, 15 Jan 2010 21:55:20 +0000 (UTC) Received: from parthe.lpthe.jussieu.fr (parthe.lpthe.jussieu.fr [134.157.10.1]) by shiva.jussieu.fr (8.14.3/jtpda-5.4) with ESMTP id o0FLZmlD069308 for ; Fri, 15 Jan 2010 22:35:48 +0100 (CET) X-Ids: 164 Received: from niobe.lpthe.jussieu.fr (niobe.lpthe.jussieu.fr [134.157.10.41]) by parthe.lpthe.jussieu.fr (Postfix) with ESMTP id 39F638A22D for ; Fri, 15 Jan 2010 22:35:47 +0100 (CET) Received: by niobe.lpthe.jussieu.fr (Postfix, from userid 2005) id F2A5816B; Fri, 15 Jan 2010 22:35:46 +0100 (CET) Date: Fri, 15 Jan 2010 22:35:46 +0100 From: Michel Talon To: hackers@freebsd.org Message-ID: <20100115213546.GA39730@lpthe.jussieu.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV 0.94.2/10303/Fri Jan 15 17:10:09 2010 on shiva.jussieu.fr X-Virus-Status: Clean X-Miltered: at jchkmail2.jussieu.fr with ID 4B50DFB4.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 4B50DFB4.000/134.157.10.1/parthe.lpthe.jussieu.fr/parthe.lpthe.jussieu.fr/ X-Mailman-Approved-At: Fri, 15 Jan 2010 22:18:12 +0000 Cc: Subject: Re:User error or awk bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 21:55:21 -0000 awk doesn't use perl or python type regular expressions but much simpler ones, called "extended". Your constructs are managed by Gnu awk with the --posix option only. The following achieves what you want in a simpler way niobe% echo "/"|awk 'gsub(/\/+/,"/")' / niobe% echo "//"|awk 'gsub(/\/+/,"/")' / -- Michel TALON From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 16 05:53:09 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A43DE1065670 for ; Sat, 16 Jan 2010 05:53:09 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id 92F198FC15 for ; Sat, 16 Jan 2010 05:53:09 +0000 (UTC) Received: from eagle.syrec.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.3/8.14.3) with ESMTP id o0G5r9bA074693 for ; Fri, 15 Jan 2010 21:53:09 -0800 (PST) (envelope-from yuri@rawbw.com) Message-ID: <4B515444.4070707@rawbw.com> Date: Fri, 15 Jan 2010 21:53:08 -0800 From: Yuri User-Agent: Thunderbird 2.0.0.23 (X11/20091130) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Current 8.0-STABLE doesn't compile (warning: implicit declaration of function 'bus_describe_intr') X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: yuri@rawbw.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 05:53:09 -0000 After upgrading sources (RELENG_8) I get the errors below. Yuri --- error log --- cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -I/usr/obj/usr/src/sys/GENERIC -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c cc1: warnings being treated as errors /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c: In function 'ahci_setup_interrupt': /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c:574: warning: implicit declaration of function 'bus_describe_intr' /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c:574: warning: nested extern declaration of 'bus_describe_intr' *** Error code 1 From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 16 07:27:34 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C068B106566C for ; Sat, 16 Jan 2010 07:27:34 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by mx1.freebsd.org (Postfix) with ESMTP id 7FEB28FC0C for ; Sat, 16 Jan 2010 07:27:34 +0000 (UTC) Received: from a91-153-117-195.elisa-laajakaista.fi (a91-153-117-195.elisa-laajakaista.fi [91.153.117.195]) by gw01.mail.saunalahti.fi (Postfix) with ESMTP id C80C21513E5; Sat, 16 Jan 2010 09:11:15 +0200 (EET) Date: Sat, 16 Jan 2010 09:11:15 +0200 From: Jaakko Heinonen To: Jilles Tjoelker Message-ID: <20100116071114.GA7988@a91-153-117-195.elisa-laajakaista.fi> References: <1bd550a01001010945i1a043ff9t70eb814cafe4b30a@mail.gmail.com> <20100101193814.GA60021@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20100101193814.GA60021@stack.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Hackers , des@FreeBSD.org, Fernando =?utf-8?Q?Apestegu=C3=ADa?= Subject: Re: linprocfs Input/output error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 07:27:34 -0000 On 2010-01-01, Jilles Tjoelker wrote: > On Fri, Jan 01, 2010 at 06:45:33PM +0100, Fernando Apesteguía wrote: > > > cat: /compat/linux/proc/cpuinfo: Input/output error > > pfs_read() fails any read over MAXPHYS + 1 with EIO. This limit probably > has to do with the allocation of a buffer of that size using sbuf_new(9) > (and so, malloc(9)). > > Some sort of limit seems appropriate, but MAXPHYS seems unrelated, and > if the request is too long it should perhaps just truncate it. With a quick test this patch seems to work: %%% Index: sys/fs/pseudofs/pseudofs_vnops.c =================================================================== --- sys/fs/pseudofs/pseudofs_vnops.c (revision 202405) +++ sys/fs/pseudofs/pseudofs_vnops.c (working copy) @@ -637,10 +637,8 @@ pfs_read(struct vop_read_args *va) error = EINVAL; goto ret; } - if (buflen > MAXPHYS + 1) { - error = EIO; - goto ret; - } + if (buflen > MAXPHYS + 1) + buflen = MAXPHYS + 1; sb = sbuf_new(sb, NULL, buflen, 0); if (sb == NULL) { %%% Maybe des@ can comment if this looks sane? -- Jaakko From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 16 13:47:06 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 110051065670 for ; Sat, 16 Jan 2010 13:47:06 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 9393B8FC17 for ; Sat, 16 Jan 2010 13:47:04 +0000 (UTC) Received: by mail-fx0-f227.google.com with SMTP id 27so948997fxm.3 for ; Sat, 16 Jan 2010 05:47:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=aH4Mkpk53KODmjHsdMqXgHvxNX65Vow06CuLSStADxE=; b=nZiG9J45Aj6dQhClBjBZF5LO3BUjFvTJQDrq2mmBAwRUPG2AHEiOLg5L+OQg55aZZd XPJ8GYRVpkqBBafdAlE2NvgTiYqDBlvfuV/vMaPZtGoqn97f1JSaCOkVd8WoW7XHPMh4 jKF3tbc2pRK8CHw3O211sG0g+53wCYcw5zVRY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=bcY3lX9sr7OfB5A8nPNYXI+hIsbEMsoib37Sn5Co1Q15Md4QMlptSFFtfAGTOQkkGq ApuvZ0WIfvT4lwnP9HER51d9KWJrYnF3L3I03ddK3oFGyB4YVDEXs0jlaQF2zpEikUFR OSEz5wIkj45gwdUoGP/zfonEKITFSwH4YLS8E= Received: by 10.223.73.20 with SMTP id o20mr4089691faj.71.1263649624260; Sat, 16 Jan 2010 05:47:04 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 13sm1237078fxm.13.2010.01.16.05.47.03 (version=SSLv3 cipher=RC4-MD5); Sat, 16 Jan 2010 05:47:04 -0800 (PST) Sender: Alexander Motin Message-ID: <4B51C357.1030306@FreeBSD.org> Date: Sat, 16 Jan 2010 15:47:03 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: yuri@rawbw.com References: <1263633781.00207717.1263621602@10.7.7.3> In-Reply-To: <1263633781.00207717.1263621602@10.7.7.3> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Current 8.0-STABLE doesn't compile (warning: implicit declaration of function 'bus_describe_intr') X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 13:47:06 -0000 Yuri wrote: > After upgrading sources (RELENG_8) I get the errors below. > > Yuri > > --- error log --- > cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE > -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include > /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq > -finline-limit=8000 --param inline-unit-growth=100 --param > large-function-growth=1000 -fno-common -g -I/usr/obj/usr/src/sys/GENERIC > -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx > -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector > -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes > -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign > -fformat-extensions -c /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c > cc1: warnings being treated as errors > /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c: In function > 'ahci_setup_interrupt': > /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c:574: warning: implicit > declaration of function 'bus_describe_intr' > /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c:574: warning: nested > extern declaration of 'bus_describe_intr' > *** Error code 1 It is already fixed. Update your sources again. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 16 19:28:18 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21865106566C for ; Sat, 16 Jan 2010 19:28:18 +0000 (UTC) (envelope-from polatel@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id A544D8FC14 for ; Sat, 16 Jan 2010 19:28:17 +0000 (UTC) Received: by ewy26 with SMTP id 26so2026949ewy.3 for ; Sat, 16 Jan 2010 11:28:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=yWy2EiMQNqhzdeWRq8s+BMfeicRXQLOOukzLw8k2zao=; b=ui9ml3qUbi+CuGjQbxdOOgfAiV7pR53FFwoh4HLdQWGTx0JkAaNFMREQ/glcpAOp9u uKB5n8+Eyrei/VBkiSj7QdSJIZmqrhXYGiNetbSndw16z9L+ymzlbsrHKyfGbB7J3OZX koqzMhrUCDwHhtq41hEA/oM0juBze2TjHjKqA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=ChlHXESuZj5JSR45/Y2ue/ci3xO1YirbJAxT4z/qATJhlVZMZ+2r+ebimBURk13ldw uAz25QkmmwzSumuNkhaPwpfz7MJIpDMy/OjiRhlj3vSD/K7Ekjm7fqr4MODsTgOuB7Tv zsGq4MlaahV6Bd8/dNianB1fegNHmZNbUO22M= Received: by 10.213.2.67 with SMTP id 3mr1405878ebi.77.1263668504289; Sat, 16 Jan 2010 11:01:44 -0800 (PST) Received: from harikalardiyari ([78.179.49.34]) by mx.google.com with ESMTPS id 7sm3133499eyb.18.2010.01.16.11.01.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 16 Jan 2010 11:01:44 -0800 (PST) Sender: Ali Polatel Date: Sat, 16 Jan 2010 21:01:37 +0200 From: Ali Polatel To: freebsd-hackers@freebsd.org Message-ID: <20100116190137.GA11414@harikalardiyari> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: ptrace bug or feature? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 19:28:18 -0000 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey everyone, Problem: ptrace's PT_SETREGS request can't alter system calls. Code: http://alip.github.com/code/ptrace-freebsd-deny.c Expected: The file foo.bar shouldn't be created. Got: The file is created. Other efforts like replacing PT_GETREGS/PT_SETREGS calls with PT_KILL doesn't help, the file is created nevertheless. I'm inclined to call this a bug but I can't be sure. Any comments appreciated. TIA --=20 Regards, Ali Polatel --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iEYEABECAAYFAktSDREACgkQQU4yORhF8iAfoACgwQg6X/QZ9pKQ/mYm3zc152Wx 1h4AoJpuneWLGoFVs7cwRTjZPqUQfUzP =hZNV -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--