From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id AC4D63857017 for ; Wed, 26 Oct 2022 17:55:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AC4D63857017 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666806941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AzAVtuKjU356NO0CD/fe6HSsVW0t+n94nMWWL1u1PjQ=; b=FwaJ3f31BvAEC3QEJ7N/0nZQ/88E3ySn6/pdi1uoyUTBz2YpicY673KxE13dvvBhZHERvt eLOBPct2AoUNavtjbgnSG9Vj0o2ENKIR/C4ANQuX+zg7dK6WYxvm+KVvd6YZNL/qeCzmx4 Rz8QBGBXav6jlZJHCdif2C/vvr1fAUc= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-530-aJfYmh1lPn-SlPResCa9eA-1; Wed, 26 Oct 2022 13:55:39 -0400 X-MC-Unique: aJfYmh1lPn-SlPResCa9eA-1 Received: by mail-wm1-f70.google.com with SMTP id f26-20020a7bcc1a000000b003c03db14864so682126wmh.6 for ; Wed, 26 Oct 2022 10:55:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AzAVtuKjU356NO0CD/fe6HSsVW0t+n94nMWWL1u1PjQ=; b=bpqQWsCoJLVr2iJe7c14J+EgSnImYg5sI0jDrhRjywk+k97WUHBz6miG6eUxEbcIX3 ahm2PkR9bYa/I5SzSVBzdWYqEJ/r498sdHZP2sieJTbvYKSPa3AypdC442R3aBf25yPe zUi/zLj5n9U1AdLK7b7CtFJcL/gtEbZ1WWhd86DPSz6dX3crInhqPDuJP3I5nlvAue9s +Hwemo25ecYzXCqI174Nv1d/GMHTMaGjbPtuB1RPgIGErcWzBcfxoLoF01wWaWseLIfb MGoFALgQYGXKNvF/ETR9ARpqmAm2ywg7TXdRhw0Fz40WdpB25XO41G9fbm7t7u+JWWcU g2kw== X-Gm-Message-State: ACrzQf31P8WZG6iR2KWFRSCB9TYGOK3nHt9t5F3DlhcFvcB/ztJ1uoyz EdfKlNHCJ8BP1hQHEUcDvLMzlqejTtOCiQ7h4CQPyJdE3PJjMpoHmXDssFABWdSUsDPxxdR87AL 02azKI6vST4AiTOPf7xPHB754n0tlr1ITDaMfJ/9c X-Received: by 2002:a05:6000:818:b0:236:8a38:5278 with SMTP id bt24-20020a056000081800b002368a385278mr3778010wrb.88.1666806938383; Wed, 26 Oct 2022 10:55:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Gke+zw1Swc3BX/Fuv2OzgAvj4gMGgIuiUvVFXZwIkxncTJN1bkqobldJL/+odAZOFDQJd9Wi8UUXGo29cRZ8= X-Received: by 2002:a05:6000:818:b0:236:8a38:5278 with SMTP id bt24-20020a056000081800b002368a385278mr3778001wrb.88.1666806938209; Wed, 26 Oct 2022 10:55:38 -0700 (PDT) MIME-Version: 1.0 References: <20221021000651.413015-1-amerey@redhat.com> <20221022000916.58609-1-amerey@redhat.com> <20221024183809.GB16441@redhat.com> In-Reply-To: <20221024183809.GB16441@redhat.com> From: Aaron Merey Date: Wed, 26 Oct 2022 13:55:27 -0400 Message-ID: Subject: Re: [PATCH] debuginfod: Support queries for ELF/DWARF sections To: "Frank Ch. Eigler" Cc: elfutils-devel@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Frank, On Mon, Oct 24, 2022 at 2:38 PM Frank Ch. Eigler wrote: > - use of write(2) to put files onto disk is not quite right; write(2) can > be partial, so you need a loop (or a macro wrapping a loop) Fixed. > - not sure I understand why the code worries about dots in or not in > section names. Why not just pass them verbatim throughout the code > base, and not worry about whether or not there's a dot? Does the > ELF standard even require a dot? Fair point. The motivation for providing a general section query API as opposed to an API for specific indices was to be flexible and accommodate a wide range of use cases. Insisting on the dot is contrary to this goal. > - not sure whether/why the I queries require a new _query_i view, as > opposed to running the _query_d & _query_e views union'd together. > I see an ORDER BY that's different here but not sure why bother; > if anything, the server could prefer one or the other type, based > on the same section-name heuristic as the client The idea here was to prevent cases where a section would be extracted from the executable on one server and from the debuginfo on another server. Granted this is only relevant when the file mtimes differ between servers and for sections that differ between debuginfo and executable. This situation seems unlikely and these particular sections aren't of much interest (ex. .shstrtab). I will remove this view and just use the existing ones. > - don't really see a need for the X-DEBUGINFOD-SECTION response > header, which simply echoes back the very same parameter the client > just requested; the other X-DEBUGINFOD-* headers are novel metadata > > - re. verbose logging in the section vs non-section case, suggest > just keeping the code simple (even if it makes the logs more verbose), > i.e., not duplicating if (...) clog << STUFF else clog << STUFF; > no biggie tho > > - the webapi docs in debuginfod.8 should document the new query type Fixed. Aaron