Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3193017rwl; Tue, 27 Dec 2022 05:48:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXvpqM9OlRKdyMbv6CGSXnz6C5MvQe72jDtymwSAvhWvXayvop6p8/mL2Y7j/wvKkDI7fScE X-Received: by 2002:a17:907:a803:b0:7c3:15cc:76d0 with SMTP id vo3-20020a170907a80300b007c315cc76d0mr22718101ejc.47.1672148914678; Tue, 27 Dec 2022 05:48:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672148914; cv=none; d=google.com; s=arc-20160816; b=RDmtF/cCRrnrCchTk0A4ZlSN7FOlfUzKcuooMUObnrOFL94X233vhgKD/33E2P8XfU g4GtZ7O4b0aYKzHzGDrWmBVdwTpm1NzonIcokJBIwItZhNHCiI62xsH6sMS3d9/3dEam rp7f4L8hyT3TnNJ0zOHqQc1aCRPgPw5w2ZREzXVDyp7XnUH2x7PyGewrRDD46Kk3diy9 QNiLeMHj9boZogqdN8S//oajCOeDf7JWKSK7U/E6hCVgGn0+lz7Jwwi+Sg+QBnxqwWGT HEJNIGO0N8XtjVrmTPfTMg4/7RfWU+p2KpMvuwlfeYeDbjaWW5WTpFiuUu2UBXcZAtfh tUNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:content-language:references:cc:to:user-agent:mime-version:date :message-id:dkim-signature; bh=h4Q1cCosCeAUbXGydn3eTVy/LM1wv3tuTAP4xN1o3T0=; b=rz9dQ/1Mawbmauw07HKJ1AXuDZBk36BNcqW+b61NBtCEfgEMSkiUgagwEH3dS/m6lS KJn7ZPP4Xdn340TNWuqTtqcjjckov3uqd1zaTgEcZcSazBI69wIPX6kdpYI4jv8donom tibZKSO9uXITe9+BDg8SfoO9D/guY8GhuOA9IE5gHZx/Htz9zWJT1r08OHtDkqvRz3MZ dFv6pZ8JLXoWCKefvvu9RH0D2sB4w7ZnwndWFV78PkzPKL7PO0+LNmuICbev4mOW+Dc1 dBtCsPxxguMEofS+Q2H4ZXanwRIoSGp3GfV9JzFAnngUIu7LG39jx6vEwuErKOFeGGpf mpsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gnuweeb.org header.s=default header.b=ZJ9DyL6b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnuweeb.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz31-20020a1709077d9f00b007c0b03b23b5si11408234ejc.542.2022.12.27.05.48.19; Tue, 27 Dec 2022 05:48:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gnuweeb.org header.s=default header.b=ZJ9DyL6b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnuweeb.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229765AbiL0NdH (ORCPT + 66 others); Tue, 27 Dec 2022 08:33:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbiL0NdE (ORCPT ); Tue, 27 Dec 2022 08:33:04 -0500 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0576DB1D6; Tue, 27 Dec 2022 05:33:03 -0800 (PST) Received: from [10.7.7.5] (unknown [182.253.183.184]) by gnuweeb.org (Postfix) with ESMTPSA id E95E37E2BA; Tue, 27 Dec 2022 13:32:59 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1672147983; bh=i77DIBl5pA2lkekeQ2mmSNW2g6Fu6p88wv+enkBT8hE=; h=Date:To:Cc:References:From:Subject:In-Reply-To:From; b=ZJ9DyL6bvMg8msWUpK4TCfW2D4cIYzCMfRUIMsX/ZkxiXK1ZqLIWoWXmT4F8jbWll tz00VjQyscF2J1yhFPY5qH0P5yK5Vfxjf2a19id7bUkaOszrGMahimYM80SKcjxdpj edd7+S8AiCB2qrwY8s62RoXWepaMts709vINjUhtjzXCPF5R052ue2yu5m2aLq+siv H2cJqhcazkY1yxdX7MQVAR3/QTFT4glQvo25e5uaPv/CvvRToXzDAyWWX+2ki6XF0E vLaChiUrF3J0ujWrmY0b4iLdL+8IHOEO3y9uqkjWfjB6tPES/Stg2nX83FiuTwooXa JYk+uogr9pLHQ== Message-ID: <00eee75f-59fa-83b2-c7e1-f0da347b2dde@gnuweeb.org> Date: Tue, 27 Dec 2022 20:32:57 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 To: Willy Tarreau Cc: Shuah Khan , "Paul E. McKenney" , Gilang Fachrezy , VNLX Kernel Department , Alviro Iskandar Setiawan , Kanna Scarlet , Muhammad Rizki , GNU/Weeb Mailing List , Linux Kernel Mailing List , Linux Kselftest Mailing List References: <20221222035134.3467659-1-ammar.faizi@intel.com> <20221222043452.GB29086@1wt.eu> <20221222134615.3535422-1-ammar.faizi@intel.com> <20221227062640.GA5337@1wt.eu> Content-Language: en-US From: Ammar Faizi Subject: Re: [RFC PATCH v1 0/8] nolibc signal handling support In-Reply-To: <20221227062640.GA5337@1wt.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/27/22 1:26 PM, Willy Tarreau wrote: > Yes, and quite frankly I prefer to make that the least complicated. > Doing just a simple loop in the _start code is trivial. The main > concern was to store the data. Till now we had an optional .bss > section, we didn't save environ and errno was optional. But let's > be honest, while it does allow for writing the smallest programs, > most programs will have at least one global variable and will get > this section anyway, so we don't save anything in practice. This > concern used to be valid when I was making tiny executables when > running on floppies where each byte mattered, but now that's pointless. > > Thus what I'm proposing is to switch to weak symbol definitions for > errno, environ, and auxv. I did a quick test to make sure that the same > symbol was properly used when accessed from two units and that's OK, I'm > seeing the same instance for all of them (which is better than the current > situation where errno is static, hence per-unit). Looks good to me. > Thus now my focus will be on storing these variables where relevant > for all archs, so that your getauxval() implementation works on top > of it. It will be much cleaner and will also improve programs' ease > of implementation and reliability. Are you going to wire up a patchset for it? If so, I'll wait for it. When it's already committed, I'll base this series on top it. Or I take your series locally then submit your patches and mine in a single series. What do you prefer? -- Ammar Faizi