From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CDD6C4167E for ; Mon, 4 Apr 2022 21:49:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381374AbiDDVtw (ORCPT ); Mon, 4 Apr 2022 17:49:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379584AbiDDRgd (ORCPT ); Mon, 4 Apr 2022 13:36:33 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB7AE28E20 for ; Mon, 4 Apr 2022 10:34:36 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id u14so5619822pjj.0 for ; Mon, 04 Apr 2022 10:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=V1fiQ+TpCWz9aW9batEAHSpfr5r9dyK3Q/lTwaH3lR0=; b=n5mRgSQ8y20acZ/nK6OhYxxGJzwZSGfgcaIV5gwWcarOIpZUaCExb23hDcba/FfujR xFNvpv34nq2Hj6fGtwvQQenG/CsfvSWly7w85pOa2sG503FmKvshqI9P5cFMoVE3Aar/ UQu5P8WN1WRQr6qVnpL2fGXvjFr5cmxhUxxebpUNcv68zXidJPUkPwuQpB2cgSdry9M0 eLkTMCOhfou4kVQgZxaauYZqxvKoMSlmivMsJ7IiJDCkOcBgoxX2LkJHmM3A/XGrPuQZ 2pPiCkDFuX+TqlPuqM3RY9B1nPG/O5uu9L/f2k9jXWu9RJ6qGXKz05KdOk77e14RcYjY VMzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=V1fiQ+TpCWz9aW9batEAHSpfr5r9dyK3Q/lTwaH3lR0=; b=V48zJMWFDViA9Vb+sOdAGjmI+DEfY5Og7trgyRRtkxOxz4jXxWDWh+Tu4ht5ffPxBI HwnyWOlJoUlB3HQRBJ9dmTQu649SqCJgBGxb56xoRzPVNsZOjY4AHRvsm2lUn29/sXKn /xp4jNF4oAvTx2S1fLL6ybDR2XuUT0sVYhHoVhCwPYvLGOrI7j1+gre20/LlyefG+6Py KDqmpdMZvDzEI7gu9N5yLJxM9ZVqJPwtBGb+oKm5Mh8R8kT5pOaTMz2eMZGq4UQXy3dv aANlRJmSPYxyrKy6mlD8xHB3M7E1FyRRHhj9sri9H4dwy172pYkyjqK7yLY5k1mgW/2e R3kg== X-Gm-Message-State: AOAM530rgoGv5oTW6u+jaDSYHVPG5Sp/pGcdv+lVRJnUhgfuEMsVooU7 CZawFDQKtmO6s27W7Y9/L90yc7/9CVafejhM X-Google-Smtp-Source: ABdhPJwHq/HMWfqJNWl3Tmj7ZD7tbsm4BjEdWB/ICSYcy3kVA2KslfNYCV0z25OGCfSV48YcTJj1nA== X-Received: by 2002:a17:903:20c:b0:154:b58:d424 with SMTP id r12-20020a170903020c00b001540b58d424mr704902plh.45.1649093675449; Mon, 04 Apr 2022 10:34:35 -0700 (PDT) Received: from google.com ([2620:15c:211:202:9d5:9b93:ffb4:574a]) by smtp.gmail.com with ESMTPSA id f66-20020a62db45000000b004fa8a7b8ad3sm12748136pfg.77.2022.04.04.10.34.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 10:34:34 -0700 (PDT) Date: Mon, 4 Apr 2022 10:34:27 -0700 From: Nick Desaulniers To: Masahiro Yamada Cc: Masahiro Yamada , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH 2/8] kbuild: prevent exported headers from including , Message-ID: References: <20220404061948.2111820-1-masahiroy@kernel.org> <20220404061948.2111820-3-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 04, 2022 at 12:41:54AM -0700, Christoph Hellwig wrote: > On Mon, Apr 04, 2022 at 03:19:42PM +0900, Masahiro Yamada wrote: > > If we can make kernel headers self-contained (that is, none of exported > > kernel headers includes system headers), we will be able to add the > > -nostdinc flag, but that is much far from where we stand now. This is something I'd like to see done. IMO, the kernel headers should be the independent variable of which the libc is the dependendent variable. Android's libc, Bionic, is making use of the UAPI headers. They are doing some rewriting of UAPI headers, but I'd like to see what needs to be upstreamed from there. I just noticed include/uapi/linux/libc-compat.h, which seems like a good place for such compat related issues. In particular, having UAPI_HEADER_TESTS depend on CC_CAN_LINK is something I think we can works towards removing. The header tests themselves don't link; they force a dependency on a prebuilt libc sysroot, and they only need the headers from the sysroot because of this existing circular dependency between kernel headers and libc headers. I'd be happy to be explicitly cc'ed on changes like this series, going forward. Masahiro, if there's parts you'd like me to help with besides just code review, please let me know how I can help. > > What is still missing for that?