Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3266347rdg; Tue, 17 Oct 2023 09:13:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0qkV8UaTeLp61jW822KKmSa9srz96M+kD9JNto1NFDI24DHZ2sRfWqkIKGVVS2r/CunMD X-Received: by 2002:a17:903:5d0:b0:1bc:2d43:c747 with SMTP id kf16-20020a17090305d000b001bc2d43c747mr2553639plb.38.1697559234218; Tue, 17 Oct 2023 09:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697559234; cv=none; d=google.com; s=arc-20160816; b=xIw7vkYzkIqiEkS+Bcm8+GVamARV78iSmQ51iHUDdA0i+TuoQ9cTLVV47w7uJhRIg3 2srVR+q36RJ61rLhE530CrSriTPgbLf312ane1t6ZtVzSj6HSaKlFTCAbPz+aSBwCtxe 8kA/v9MZnjxC/aLKrZa7a3Ett46rjBLgnrthjRGJr5M3sbrxYgEY4EIbIvRb6Xgg43YA ZqSMePiUgpUAeWuoyApjC6OVgRW0rldShbqZbYh37FLPQzEly08qeimEo61ka2+qH274 glxberO2iFp1yFM86S7Iynd+dM8WMfOaxIxaXQsx3R8noVcHTaPICb03e/D5WOd7AWxQ vT7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature; bh=ocr30lr2y0V9zsCKJhUGQr9AXtBKIbrFwvST7PQfksE=; fh=kfUSjzhysOdFV/NA+5b+A0Z0byxrv6kZVzfAcER/OUo=; b=O0oJzc32uwv91B4Q4wbVNsX2EEMxbEaY1vdsA6LRBTEFpAXY1+/tZaP65vML+hY2cr GLR4A9Tzlgx8jij5iTvxqWVQmYagFgxMM4nCvWFMvqlk3KBkPWunOw9eAzaDx8goYAST sjjXKewQZQo915k34Kq/oLyh8kBhuLu4dQ4LXzsrLv1Iyhtf1PcM1z8DBdswvWf3DD4s pCqlbuQNcYl84WwnzlHBCeXNdeb7nHUiC26nqLhndh1+l/dttkmkC5JBBC9K2qxGoayY F35jPAAaw3hgqEELEoQljZCcfD3PP6JG7Ss+wbZmQxeEPR1R4BkCqLbHSZBId0ka18mE X7IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Pt2cHvsO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id m16-20020a170902db1000b001c755810f7esi2205897plx.499.2023.10.17.09.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 09:13:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Pt2cHvsO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id F2C298024AEF; Tue, 17 Oct 2023 09:13:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234920AbjJQQNm (ORCPT + 99 others); Tue, 17 Oct 2023 12:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235106AbjJQQNi (ORCPT ); Tue, 17 Oct 2023 12:13:38 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 689CE101 for ; Tue, 17 Oct 2023 09:13:35 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-9b2f73e3af3so896299766b.3 for ; Tue, 17 Oct 2023 09:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697559213; x=1698164013; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=ocr30lr2y0V9zsCKJhUGQr9AXtBKIbrFwvST7PQfksE=; b=Pt2cHvsO/1oBbToYDW4aO8hTnkWqlL9aMHNH+VbnTwE9kuETn6hyWYRADEYs1c7WWV finkwglffO9HawJIjA203SBMrplmA5C/4F0YMsiPmdNeq4qsjRI125tkudSmhxy1xKLR J4OM//UiHpvq2Vpc2m/F0UQdptLOWHfn4AL0jzoLzcxUtOV+1LzjMYYgOjeXO6Q90A2f 5Lh3bj7qqSaseFYMNbPFueCtnWfHSWqba3BQv6so10MJZEthQXfLU3SpSBsLB9MOcNAs HwReLJYDyg0Q3lSIKL1S4qCvCB1mV6+zTz98CEepCiVU+Pc0mzHQREQuZu8d3hx+/NXF fQ2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697559213; x=1698164013; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ocr30lr2y0V9zsCKJhUGQr9AXtBKIbrFwvST7PQfksE=; b=KrbkIubEq4Ui/EEyoC0yTnldFZ+6NLaSIHQ7IYxgAeMpFtJlm4R3AYcT9mrSIfiTQI EbAWWyIpwPChMhFZpHrLDL7ryBdkXro1u7KXvJ9+UJCBgJPLL+ti1OEje5cjDYQojV4r 8XJMCPLkxJ4IRG2u1VfVHFx9gkPAcHQlf6p9zL0POgSSWi6ht/Xu1vswiK6XPLJBbXOK TulI+TO+uAm2broEiEfMLP+/79CDGwm+4/KgLfQ8jjatFrXg7Csh2LVFM6FHVMqhNuR8 Y+69fCX+Mkk8v3Vi4c/gPOueAZbHd9MeVSs9VwZQI1AL1sJWbZbGUz17sxuiHeauyMtM wnYA== X-Gm-Message-State: AOJu0YzbsQdlzNCtUrFxGwioF1aFAKCjDG+f/18WnRo3oefIvEOcPAEr YMlAgZXDHc1xFBJLLE1JiXw= X-Received: by 2002:a17:907:6d0c:b0:9b8:e670:657b with SMTP id sa12-20020a1709076d0c00b009b8e670657bmr2044955ejc.64.1697559213113; Tue, 17 Oct 2023 09:13:33 -0700 (PDT) Received: from krava (2001-1ae9-1c2-4c00-726e-c10f-8833-ff22.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:726e:c10f:8833:ff22]) by smtp.gmail.com with ESMTPSA id ox30-20020a170907101e00b009a1be9c29d7sm68306ejb.179.2023.10.17.09.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 09:13:32 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Tue, 17 Oct 2023 18:13:24 +0200 To: Arnd Bergmann Cc: Yury Norov , Song Liu , Alexei Starovoitov , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: Re: [PATCH] buildid: reduce header file dependencies for module Message-ID: References: <20231017143408.2876181-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231017143408.2876181-1-arnd@kernel.org> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 17 Oct 2023 09:13:52 -0700 (PDT) On Tue, Oct 17, 2023 at 04:33:58PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The vmlinux decompressor code intentionally has only a limited set of > included header files, but this started running into a build failure > because of the bitmap logic needing linux/errno.h: > > In file included from include/linux/cpumask.h:12, > from include/linux/mm_types_task.h:14, > from include/linux/mm_types.h:5, > from include/linux/buildid.h:5, > from include/linux/module.h:14, > from arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:39, > from arch/arm/boot/compressed/../../../../lib/decompress_unlz4.c:10, > from arch/arm/boot/compressed/decompress.c:60: > include/linux/bitmap.h: In function 'bitmap_allocate_region': > include/linux/bitmap.h:527:25: error: 'EBUSY' undeclared (first use in this function) > 527 | return -EBUSY; > | ^~~~~ > include/linux/bitmap.h:527:25: note: each undeclared identifier is reported only once for each function it appears in > include/linux/bitmap.h: In function 'bitmap_find_free_region': > include/linux/bitmap.h:554:17: error: 'ENOMEM' undeclared (first use in this function) > 554 | return -ENOMEM; > | ^~~~~~ > > This is easily avoided by changing linux/buildid.h to no longer depend on > linux/mm_types.h, a header that pulls in a huge number of indirect dependencies. > > Fixes: b9c957f554442 ("bitmap: move bitmap_*_region() functions to bitmap.h") > Fixes: bd7525dacd7e2 ("bpf: Move stack_map_get_build_id into lib") > Signed-off-by: Arnd Bergmann > --- > include/linux/buildid.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/linux/buildid.h b/include/linux/buildid.h > index 3b7a0ff4642fd..8a582d242f067 100644 > --- a/include/linux/buildid.h > +++ b/include/linux/buildid.h > @@ -2,10 +2,11 @@ > #ifndef _LINUX_BUILDID_H > #define _LINUX_BUILDID_H > > -#include > +#include looks good, but I think we should now include in lib/buildid.c ? thanks, jirka > > #define BUILD_ID_SIZE_MAX 20 > > +struct vm_area_struct; > int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id, > __u32 *size); > int build_id_parse_buf(const void *buf, unsigned char *build_id, u32 buf_size); > -- > 2.39.2 >