Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp820482pxk; Thu, 1 Oct 2020 14:54:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynr++tT3IlHGX8txuM1ckbDfGx1CdLY8sdP4kkgoTCOMo95ag9A9KD2lRDjjgi6RvAWxlb X-Received: by 2002:aa7:d9c9:: with SMTP id v9mr10607647eds.103.1601589244568; Thu, 01 Oct 2020 14:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601589244; cv=none; d=google.com; s=arc-20160816; b=ZRMdVqJNi2S+A4z/xErAjMrVRfKUmc3jAa1KePlKgr9Guxdt0MgWcB6eFJsQeUcNE4 /s/KW82u77BoTjpTJTanxTLU4m/OhV/urTIWhZfihIi3uq/1Ekpc0sDdYAQ9lgBknIx0 xdM5HA0POC0OgxLtGHyMPo8V2RegQcsLLxGiuz91xJiGujp+bc54bVQwSY6W7y2ZJrsH FLYp6pQ7MNj9E4gpAPjrKnFeChuDeWIPCFz7aQlKSKA3VlS5LCtiuwTXKhWxvBnkV7ca n0PDhnI/XhtLF1DajgMuZ/Cfrz49Utnt3/cGUKNZ1q+nv9PSiv1xPgS1KEJ0TjGukEwH ZY1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0MO3TB9QnrjSENYfVdz/nHKpbVM5NFXJ2wQlqqWkYJo=; b=MJGXQMHMQ80ZW2b4Nq6aiJhC323NJJxjLickJSPFdFjKkRb/HgjCXYMkTONw+H118w qaETFvVhCK9lx51IKNejWIB3IVVd9HmDSXHpm6NZhYTEEXqiLqWk/fA8egBbMdcieKHH NPVwRMvgQhdyQ/d5v6PRUusk8PDlXC5HS5/NqoHtlQc2k0ho54YTQFbUhBOvlMFFIyC4 8pOq5sdLnAredrBsJSkQ0IS6rmJIA/79q8q2X6wLzs123qMFBVaCTHOkZ6Ws+Ocip1+O sWKwB09v2zhkiWY9aLEIqWcR2LF3jEYmAf8y/Tqn5nL1GDCSYoUEGKXtjAVREzT57ml9 fvwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e18si4671756ejk.628.2020.10.01.14.53.42; Thu, 01 Oct 2020 14:54:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733224AbgJAVwP (ORCPT + 99 others); Thu, 1 Oct 2020 17:52:15 -0400 Received: from brightrain.aerifal.cx ([216.12.86.13]:59124 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727848AbgJAVwP (ORCPT ); Thu, 1 Oct 2020 17:52:15 -0400 Date: Thu, 1 Oct 2020 17:52:13 -0400 From: Rich Felker To: Petr Vorel Cc: linux-kernel@vger.kernel.org, musl@lists.openwall.com, linux-api@vger.kernel.org, libc-alpha@sourceware.org, Peter Korsgaard , Florian Weimer , Baruch Siach , "David S . Miller" , Michal Kubecek , Stephen Hemminger Subject: Re: [musl] [PATCH 1/1] uapi: Don't include in Message-ID: <20201001215212.GS17637@brightrain.aerifal.cx> References: <20201001195231.17226-1-petr.vorel@gmail.com> <20201001201108.GR17637@brightrain.aerifal.cx> <20201001202703.GD24195@dell5510> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201001202703.GD24195@dell5510> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 01, 2020 at 10:27:03PM +0200, Petr Vorel wrote: > Hi Rich, > > > On Thu, Oct 01, 2020 at 09:52:31PM +0200, Petr Vorel wrote: > > > + update code where needed (include in code which > > > included only to get struct sysinfo or SI_LOAD_SHIFT). > > > > The reason is to avoid indirect include when using > > > some network headers: or others [1] -> > > > -> . > > > > This indirect include causes redefinition of struct sysinfo when > > > included both and some of network headers: > > > > In file included from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/kernel.h:5, > > > from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/netlink.h:5, > > > from ../include/tst_netlink.h:14, > > > from tst_crypto.c:13: > > > x86_64-buildroot-linux-musl/sysroot/usr/include/linux/sysinfo.h:8:8: error: redefinition of ‘struct sysinfo’ > > > struct sysinfo { > > > ^~~~~~~ > > > In file included from ../include/tst_safe_macros.h:15, > > > from ../include/tst_test.h:93, > > > from tst_crypto.c:11: > > > x86_64-buildroot-linux-musl/sysroot/usr/include/sys/sysinfo.h:10:8: note: originally defined here > > > > [1] or , , , > > > > Suggested-by: Rich Felker > > > Signed-off-by: Petr Vorel > > > --- > > > Hi, > > > > this looks to be long standing problem: python-psutil [2], iproute2 [3], > > > even for glibc in the past [4] and it tried to be solved before [5]. > > > > This will require glibc fix after: > > > You can't do this; it breaks the existing contract with glibc. New > > kernel headers can't force a glibc upgrade. > Right, got that. > > > You just have to get rid > > of use of elsewhere in the uapi headers. It was a > > mistake that was ever separated out of > > since it didn't (and couldn't) fix the contract that > > exposes struct sysinfo (and that it's misnamed). But > > it's no big deal. This can all be fixed without any breakage anywhere > > just by not using it. > Back to your original suggestion to move the alignment macros to a separate > header. I was trying to avoid it not sure if introducing new header is > acceptable, but we'll see. Isn't there already another similar header with that type of macro that they belong in? Rich