From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4066 invoked from network); 2 Jun 2021 16:03:19 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 2 Jun 2021 16:03:19 -0000 Received: (qmail 28202 invoked by uid 550); 2 Jun 2021 16:03:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 28181 invoked from network); 2 Jun 2021 16:03:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622649784; bh=+3X9i94DZvJYL7wDLo1sRTEb1ToSfJ8tKeEf+y9M5h0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NLPw6HfuWH2aw7rLGwHO7m9uk282jK0AU6vinGYTx1BOnvJTxdxRpffBEdBGAeebM e5RSsEgrYaG9Gx1uoknDISLE0Sm4kOJ6Ns15XBnZTECyvbq6B/3C3xUUC2h+bV4G7Q 8hFyPtq9oNwDTGg+yNKG7ZYK36jWS2hLoyB7JArC78ameQGpDw0bSYh5IAtr2fbF8b u+np11slI/3WHGcaUFMyJQwVF28ToX71zusvAxtzW2Vdl80qnG9jlUe12qp4u8xE/T 7N4EYXNLtHlYETLDGNqrNNXlZfYfBB2Q6iUtJteFLBLOO7vZ45NSeH5Rj3IVdmhjks El+zKftXZoWHA== X-Gm-Message-State: AOAM5309XERn1eMYRylD+EwURpj0dO2erFtTvTGaryHMr/alvYCJa9JB 4tVVGmsJEpsjRHUt8A3uZYYeQbY1ZinXTasIyFM= X-Google-Smtp-Source: ABdhPJzgAtYTyAUZe477Q4d1tUxrB3J/lqoj4TNwhwzcGLRyS6PWAiDbhwBPED9D2Z1U/qY6z4o+lTpbQCGapFm8G54= X-Received: by 2002:a9d:6186:: with SMTP id g6mr11777811otk.246.1622649783524; Wed, 02 Jun 2021 09:03:03 -0700 (PDT) MIME-Version: 1.0 References: <20210510185837.GD2031@voyager> <20210524220004.GD2546@brightrain.aerifal.cx> <20210602145632.GC13220@brightrain.aerifal.cx> In-Reply-To: <20210602145632.GC13220@brightrain.aerifal.cx> From: Arnd Bergmann Date: Wed, 2 Jun 2021 18:01:24 +0200 X-Gmail-Original-Message-ID: Message-ID: To: musl@lists.openwall.com Cc: Markus Wichmann , Florian Weimer Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] Backwards kernel compatibility On Wed, Jun 2, 2021 at 4:56 PM Rich Felker wrote: > On Wed, Jun 02, 2021 at 01:52:43PM +0200, Arnd Bergmann wrote: > > > > > > The main source of overhead comes from the kernel 4.4 which on arm64 > > > produces stack traces when not implemented syscall is invoked: > > > > > > https://github.com/torvalds/linux/blob/afd2ff9b7e1b367172f18ba7f693dfb62bdcb2dc/arch/arm64/kernel/traps.c#L369 > > > > That is clearly a bug that was fixed in mainline and backported to linux-4.14 > > but not 4.4 or 4.9. I've sent a manual backport for inclusion in those kernels > > now. > > Is this practical to hotpatch into kernels on devices that aren't > readily upgradable? Including the patch in a source tree is trivial, as it just removes a few lines of (misguided) output. If you are asking about run-time patching it out of a running kernel using kpatch/kGraft/ksplice, this would also be doable by patching out the branch in that function, but the infrastructure for live patching kernels is likely missing on most of the systems that lack a way to replace the kernel image, so in practice it would not help. Arnd