Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 124B7200D08 for ; Thu, 21 Sep 2017 14:11:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 10E571609D0; Thu, 21 Sep 2017 12:11:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 56A101609B8 for ; Thu, 21 Sep 2017 14:11:22 +0200 (CEST) Received: (qmail 76959 invoked by uid 500); 21 Sep 2017 12:11:21 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 76943 invoked by uid 99); 21 Sep 2017 12:11:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Sep 2017 12:11:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id CB83DC05A9 for ; Thu, 21 Sep 2017 12:11:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.401 X-Spam-Level: X-Spam-Status: No, score=-2.401 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Qp6qUpIxq6IM for ; Thu, 21 Sep 2017 12:11:20 +0000 (UTC) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id D2B915FD48 for ; Thu, 21 Sep 2017 12:11:19 +0000 (UTC) Received: by mail-io0-f169.google.com with SMTP id n69so10297227ioi.5 for ; Thu, 21 Sep 2017 05:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=8nx6u1EYQ/V6z1l0YYID6Hk36IozBJHPcfFS9IdsrjU=; b=CEhOfTQUi1SnuZn+gJiwI6pYMUKHzPCDwZ0lQTEro1C+8bzoeU5RfJZUms3+0SdCbH O6ySRD1r5AFgC9yLTDOGr8Tmxz+VNsNoWWNpyDQ2/azi6zqK1MsZrMkSc3Ho9Kn6zCC9 LPZLsNN11t/oIbCwSsYT5qrnYuLLRjHgOi3kQKMSTQlHMfk+CQ+iGEWUwGuIESacI8gk 5jfwuAkX/LUm1CSm9EuBmsX/tkmMz4s4eiVaw9ChJq8d6/w44FoHB7NfT/8QZT/zn/L1 82mIbZ8A6i51KM1djQPT4Bd7zNNtX+ul2pc2bCh6y7NMUSK7cxL9HlTwYblN1FdmzLky RoHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=8nx6u1EYQ/V6z1l0YYID6Hk36IozBJHPcfFS9IdsrjU=; b=R/BBwAJLepiJmpEJ2+UN1g64c9nytdJparP5O6LR5NggpBkU+iCKhtlwjQgEt3qhD3 /7AnHxyfssqFCn7DN+oqwl5Oi+4i6UaCucTpSWhzlQs0Oj5Sdu7afkJlYezkgtgQy4Vj Mga/AZlZ/eH9nYFDDavV2UCNJksndi7MSRGLomUV1iwzrPKK/BgWkf4QIf8B9B+nItF/ T4LDf/hgff1f1bY5U1FzNkBLLcdeBUKd7I/YtmEzSmap98x9JBuUb82mJrQkuJNF0e9p SAgU4HD1VH7cGn4rJlBpla7vIa6H2GggJHKUYTAXIvi5uXY6qorQ+a0BM5tUN12sXRT4 v8fw== X-Gm-Message-State: AHPjjUjLKv0s44dA0RKKMspU1FpqeDoy75Z/nHqACEY63PvrH3w715pL a5FjkukAk5Iqdp+StoDY66QRSaQLjkJNze+CtpnU5YIw X-Google-Smtp-Source: AOwi7QBlW+aNH5vm0sEKL9ye5JFRXGb5jlWFp+IfXJQJ1tHeFsL4L5ovUo4MVSciz9Vmtm1beBtRJpouL57u+bRfqoo= X-Received: by 10.202.223.8 with SMTP id w8mr2195868oig.17.1505995878789; Thu, 21 Sep 2017 05:11:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.168.6.68 with HTTP; Thu, 21 Sep 2017 05:11:17 -0700 (PDT) In-Reply-To: <83732463-EC9B-4313-B5EB-6DF0149DFD57@greenbytes.de> References: <8005E707-7A46-4909-A408-048E835DC628@greenbytes.de> <83732463-EC9B-4313-B5EB-6DF0149DFD57@greenbytes.de> From: Eric Covener Date: Thu, 21 Sep 2017 08:11:17 -0400 Message-ID: Subject: Re: SSLSrvConfigRec shared To: Apache HTTP Server Development List Content-Type: text/plain; charset="UTF-8" archived-at: Thu, 21 Sep 2017 12:11:23 -0000 On Thu, Sep 21, 2017 at 7:42 AM, Stefan Eissing wrote: > >> Am 21.09.2017 um 13:35 schrieb Eric Covener : >> >> On Thu, Sep 21, 2017 at 7:00 AM, Yann Ylavic wrote: >>> On Thu, Sep 21, 2017 at 11:48 AM, Stefan Eissing >>> wrote: >>>> >>>>> Am 21.09.2017 um 11:37 schrieb Yann Ylavic : >>>>> >>>>> If the module defines its own server_config_create() which allocates >>>>> one, each vhost will have its own, and the module's >>>>> server_config_merge() can do whatever needs to for the members of the >>>>> config (pointer copy, shallow/deep copy, ...). >>>> >>>> Yes, but only *iff* there is every a directive of that module used in >>>> a VirtualHost. >>> >>> OK, I see know, thanks. >>> >>> I'd call that a premature optimization though, even if it matured for decades :) >>> Only the module knows what to do when merging, so I think the core >>> config should still call config_create() and config_merge() for those, >>> precisely because post_config() is always called. >>> Modules also know how to merge configs that do nothing (usually), with >>> all those _set members all over the place, so it should work (untested >>> ;) even if it may consume more (not that much I think) initial memory >>> for large confs. >> >> Maybe less intrusive for a module to make a copy of its config if it >> detects base/vh are the same and needs them to differ? > > That is why I "fixed" this for mod_ssl only. But mod_md has similar code now. > > Do we have some sort of bitfield of flags for each module? That would be great > as we could make an opt-in change that way. > IIUC it should be safe to extend module_struct with a minor bump to add 'int flags' to the bottom, but when you check the value you'd need to check the MMN first. In the module you'd then just have some flags or'ed together after register_hooks. (hopefully someone will check my work) -- Eric Covener covener@gmail.com