Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp940192rwe; Fri, 14 Apr 2023 11:45:15 -0700 (PDT) X-Google-Smtp-Source: AKy350ag30GdmRq9/X0dLSN+CZG7ilguqON033e0u+R2MQw/ikig0p12yJYJwxUuSUdVGpcO/etc X-Received: by 2002:a05:6a21:328d:b0:ee:5c61:2398 with SMTP id yt13-20020a056a21328d00b000ee5c612398mr3239417pzb.34.1681497914884; Fri, 14 Apr 2023 11:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681497914; cv=none; d=google.com; s=arc-20160816; b=MczmElZn9JfIr2FrWUWsW72uG7PBXAwdfHjqmco8kl8QBk3dSvaxs9otLwCpMT08Cv FmAZAgv9EOjeJ+bZNMoJFfMM+1ix1dXK4t6gZgrpBx7CqDoB7seTdKmqZu1TWQ3U2+pU BZQLnWb10KpvLEKtYkucPtO002N4eLQjsxM0tqSGnOgOYZ9X6jriI/z+zEMV9ZMQN2F4 B6WQiz6Gq2YZMMPBbWSar272hGd7ox96DSYkp4uMxSkAbQgAaRFVZWz+Jz8fot4iCy50 aHiLR89MQJ9aBjMSxVJQYjdsKdAFEBX0jNITyGOr7ZKLYxHAGDlVUQ5T5uHjeD9SKFr8 uUlA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=15ywJLd+Sw1XDtoclIdwnW/TZunOb71OZz9fLKuiCBA=; b=Hzg/Wy492fXXrMkd0o19OJ6mKP7FA9dnhTnpmvqUwOUnjEtbtMcRnrLn5ClrFd6sRD YmaBSybRYaHIx9v4PB+S2wZ5LURaZPR6BLftPXJTJgHyHtfupGAyqOGA/TAJdXYnJZRa 91Uv6T3eFtGtmaomgmYWk+qGscktRnrC9dvG+bgEksLDxUOqD+wI84cNInQ6wRLXCM/o RaJt5eFP8XfR99RB8de+8yBOlfSFSamNrpQdLsmkIS3VMndAMtVUx36EJYyzQ/Ei8GpO bDanxS8/Jor4JrJQNc364o1GjvXE35XLfMPRgzSsny8nqpoTGeRSwfbxm/tg/GtYBrOU wI1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Eoy4fNsH; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t184-20020a625fc1000000b0063731f72bf4si4997083pfb.221.2023.04.14.11.45.00; Fri, 14 Apr 2023 11:45:14 -0700 (PDT) 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=@weissschuh.net header.s=mail header.b=Eoy4fNsH; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229984AbjDNSjC (ORCPT + 99 others); Fri, 14 Apr 2023 14:39:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjDNSi7 (ORCPT ); Fri, 14 Apr 2023 14:38:59 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 201169743; Fri, 14 Apr 2023 11:38:56 -0700 (PDT) Date: Fri, 14 Apr 2023 20:38:54 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1681497535; bh=FfkvoRHMnp00ZoRJQzLmg5CF/iTSYQ87lUHUGjhnDrw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Eoy4fNsH65cTX72ZqA9xOblLyAYIN3/8g+zo6TTkwBatjWITXKApV/t4a+IFHUR0z epD8Vyri0QYWXk8J1654WK5RvsA2bI+FtjZX2079ErcP2wttAcuOv6CMWyPMtngXzW EF9baBA/fNbb7inm3Yatm5gj72OHzyvZWLutXZyY= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Coly Li Cc: Kent Overstreet , linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] bcache: make kobj_type structures constant Message-ID: <3c7289e1-2f21-4adc-bed9-df44fd8988d3@t-8ch.de> References: <20230214-kobj_type-bcache-v1-1-cf00ead7bee7@weissschuh.net> <125CA8D6-D3B7-42FB-83BE-DCA688F2ACAF@suse.de> <20230214152119.epkfhkojqjvokqmv@t-8ch.de> <9DE71214-283C-4410-B5A4-22DFDA7021F4@suse.de> <4cc38847-a967-487b-8efe-81b741ab6782@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Hi Coly, On 2023-04-05 21:38:01+0800, Coly Li wrote: > > 2023年4月5日 01:38,Thomas Weißschuh 写道: > > > > Hi Coly, > > > > On 2023-02-15 00:16:03+0800, Coly Li wrote: > >>> 2023年2月14日 23:21,Thomas Weißschuh 写道: > >>> > >>> On Tue, Feb 14, 2023 at 05:51:09PM +0800, Coly Li wrote: > >>>> > >>>> > >>>>> 2023年2月14日 11:13,Thomas Weißschuh 写道: > >>>>> > >>>>> Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") > >>>>> the driver core allows the usage of const struct kobj_type. > >>>>> > >>>>> Take advantage of this to constify the structure definitions to prevent > >>>>> modification at runtime. > >>>>> > >>>> > >>>> How the const structure definition can prevent modification at run time? > >>> > >>> It will be put into .rodata instead of .data by the compiler. > >>> The .rodata section is mapped as read-only via the pagetable. > >>> > >>> See Documentation/security/self-protection.rst > >>> "Function pointers and sensitive variables must not be writable". > >> > >> I see. Thanks for the information. > >> > >> This patch will be added into my testing queue, and submitted later. > > > > It seems this was not submitted. > > Or did I miss it? > > No I don’t submit it yet. It is not emergent fix, and stay with other testing patches together. > > Do you want it to go now? No, it's not urgent. I just assumed it should have been in next by now and thought it got lost along the way. Let's keep it with the other testing patches. Thanks and sorry for bothering you, Thomas