From patchwork Sun Mar 29 18:08:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: nenhard X-Patchwork-Id: 455915 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 5110114011D for ; Mon, 30 Mar 2015 05:09:01 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=j3J/y6dM; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6CC8A94F72; Sun, 29 Mar 2015 18:09:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SC0H7p8AWJAo; Sun, 29 Mar 2015 18:08:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id C9E2895041; Sun, 29 Mar 2015 18:08:59 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5D0A21C25CA for ; Sun, 29 Mar 2015 18:08:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 57EED91513 for ; Sun, 29 Mar 2015 18:08:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m3Z5AqW+y5dq for ; Sun, 29 Mar 2015 18:08:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com [209.85.214.181]) by whitealder.osuosl.org (Postfix) with ESMTPS id A218C91336 for ; Sun, 29 Mar 2015 18:08:58 +0000 (UTC) Received: by obcjt1 with SMTP id jt1so104605221obc.2 for ; Sun, 29 Mar 2015 11:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=5iY2/Xi5l2tVySLs/xazXAWE1D4+ShX5X/aYedYxZr8=; b=j3J/y6dM1uAHRiS2HrBS8gFa/BqDwG59SSqzpecXGXJe30sW8f7PyyvROjZ5VuhIuj phiRKwKZjZIuBNJocjqNAv/LJ7YLKCxatBQnEuImhLzkTn8fqK7KDQQyuJFE4FhsMrEg UlKK5d+zfodG5MvC9gCFHzU+HZTku23oVUcV3DEAyQdA6FWSx+UXkyi3pMUMLnHrW9ph Jm4oOiD5YUI7BlSpjEhrCuGwb/iuM5E+/gE6XpTO0of5fk5IM+MRki/6f5Wyr2AnCvBq t6/FcijU0H3rQ/b58t/f7hCnk2Z9U3yQG0pz1cUtXrCEJNFF6ooTtjCvxsLVIdURvB0Z 8GRw== MIME-Version: 1.0 X-Received: by 10.202.108.213 with SMTP id h204mr8067202oic.98.1427652537902; Sun, 29 Mar 2015 11:08:57 -0700 (PDT) Received: by 10.202.14.73 with HTTP; Sun, 29 Mar 2015 11:08:57 -0700 (PDT) In-Reply-To: <20150329174001.GF6817@brightrain.aerifal.cx> References: <20150329174001.GF6817@brightrain.aerifal.cx> Date: Sun, 29 Mar 2015 20:08:57 +0200 Message-ID: Subject: Re: getifaddrs() and CONFIG_PAGE_SIZE_16KB=y From: nenhard To: uclibc@uclibc.org X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" Thanks, here is a workaround. Can someone do a proper patch? 2015-03-29 19:40 GMT+02:00 Rich Felker : > On Sun, Mar 29, 2015 at 02:03:47PM +0200, Nenad Kljajić wrote: > > When I compiled MIPS32 kernel with option CONFIG_PAGE_SIZE_16KB=y > > getifaddrs() fails with 'Device or resource busy'. > > Netlink sockets require a page-sized buffer for the response. uClibc > probably has a hard-coded 4k or 8k result buffer rather than using the > current page size... > > Rich > diff -rup a/libc/inet/ifaddrs.c b/libc/inet/ifaddrs.c --- a/libc/inet/ifaddrs.c 2012-05-15 09:20:09.000000000 +0200 +++ b/libc/inet/ifaddrs.c 2015-03-29 15:07:11.528316570 +0200 @@ -119,7 +119,7 @@ __netlink_request (struct netlink_handle { struct netlink_res *nlm_next; struct netlink_res **new_nlm_list; - static volatile size_t buf_size = 4096; + static volatile size_t buf_size = 16384; char *buf; struct sockaddr_nl nladdr; struct nlmsghdr *nlmh;