Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1358235rdb; Mon, 2 Oct 2023 07:17:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhi8YYHMikErmPE0FZKv011GqHrT1rTXHYoKAWMKXu17npVbydbOcvBIA8D7dx4qInshPi X-Received: by 2002:aa7:888f:0:b0:68f:e810:e86f with SMTP id z15-20020aa7888f000000b0068fe810e86fmr10837590pfe.28.1696256238901; Mon, 02 Oct 2023 07:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696256238; cv=none; d=google.com; s=arc-20160816; b=hKEz8vnSplnFgV9QOy7g9Ve1HGkTM+tmiJdSOFHLAyszIS/mtEepLgqoVvU4sVz1Rl 7l3U9BaSLvlO8zT+EYgt6kF7L96lqXUfCL4fMk0FpN/+Crl+mXLM4qSzPIH3aMn7qPhi zTpGNHst0Y6e6TwfdbbyS9wofSXnSl8H3nGu0FDEW+tNL1YUdPP4YnE2FLFQrJBq6c9D EFw9CzdAEmr0IZXmmCUmmhsP7ZOxMMU/sBNNtj+XrbK5du7hb8PNpwc53YzNocTTDIY7 M+/rr+bV6e1ViTPb7n7UFW9uN0MO7FFzff7o0sUb4C1R+u/NyQ23CEePa9z/iLqBj99y d4KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=yXWjSSlBJVOPDSwrXfZvR2ahtqs14JRak4I9NOcI2z0=; fh=LKP5DOqeHr6vRevfzNKLYiNme/zMSj9OJ563dSNp8RM=; b=ESzJwBzQVTzTdWYIWAZAs97WVOebZKDonW9qcUomnfKmCvkIYCXBysm92bf018F+8m N3ho7UWYsdyY4F8KoRIXfalRWmzLbecSgJYKk5DWTDd4bVm557KuxXwzDZxb5q4dvvuB sSjVO8IYwY8CqFojnXWxkkbkrPRbRkWDeFu8lKxLD9akryI94yfX/iX/DxhkWd7wfjp4 Q3QRm+7bsdLEzdva76dDSV4gSBeigrGRPBkgb4W+hZyDnXIOS92AnWQUwYyC8XZsYdkm qIM0xQL9KhPTmkALH1n3uVvoKP6zBLFBHta4na4TngF787t/5xxFqXudVzP//WdSjfrN guDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=J4nEfWtl; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id m68-20020a632647000000b00578db71453esi29642472pgm.468.2023.10.02.07.17.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 07:17:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=J4nEfWtl; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B252C806AFC1; Mon, 2 Oct 2023 04:44:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236650AbjJBLoj (ORCPT + 99 others); Mon, 2 Oct 2023 07:44:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231305AbjJBLoh (ORCPT ); Mon, 2 Oct 2023 07:44:37 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2A6ADD; Mon, 2 Oct 2023 04:44:34 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6B99121857; Mon, 2 Oct 2023 11:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1696247073; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yXWjSSlBJVOPDSwrXfZvR2ahtqs14JRak4I9NOcI2z0=; b=J4nEfWtlwwNaf7q2YgGB3wsF6Gqf7Fp1p+d9Mfb5dlPTt6lEOaGjrDsX5aXlWjjFBig5mb MKuabzJkgp3rRJ8714Z9cncgp7XjO9Xhz+4csilJv3TCCrrVEcoOso2WiZOBaAyOpzf/pd Z1W19SxSdVXwPchr22ERqFuVDA7ksGA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1696247073; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yXWjSSlBJVOPDSwrXfZvR2ahtqs14JRak4I9NOcI2z0=; b=GL722/WQMErreoDca0yEAJDS7/jK3cCmBxFh/3t0vwkUrz3Gs9DlLkyyV2VkBqbMFM9KR1 aidUyE+VmqjrnqAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2DC5313456; Mon, 2 Oct 2023 11:44:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id pzRzCiGtGmU5DgAAMHmgww (envelope-from ); Mon, 02 Oct 2023 11:44:33 +0000 Date: Mon, 2 Oct 2023 13:37:52 +0200 From: David Sterba To: David Sterba Cc: Wedson Almeida Filho , Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Wedson Almeida Filho , Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org Subject: Re: [PATCH 05/29] btrfs: move btrfs_xattr_handlers to .rodata Message-ID: <20231002113752.GL13697@twin.jikos.cz> Reply-To: dsterba@suse.cz References: <20230930050033.41174-1-wedsonaf@gmail.com> <20230930050033.41174-6-wedsonaf@gmail.com> <20231002112858.GK13697@twin.jikos.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231002112858.GK13697@twin.jikos.cz> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 02 Oct 2023 04:44:41 -0700 (PDT) On Mon, Oct 02, 2023 at 01:28:58PM +0200, David Sterba wrote: > On Sat, Sep 30, 2023 at 02:00:09AM -0300, Wedson Almeida Filho wrote: > > From: Wedson Almeida Filho > > > > This makes it harder for accidental or malicious changes to > > btrfs_xattr_handlers at runtime. > > > > Cc: Chris Mason > > Cc: Josef Bacik > > Cc: David Sterba > > Cc: linux-btrfs@vger.kernel.org > > Signed-off-by: Wedson Almeida Filho > > With slightly updated changelog added to misc-next, thanks. Removed again. I did not notice first that this is part of a larger series, please also CC the [PATCH 0/N] patch. There's a warning: fs/btrfs/super.c: In function ‘btrfs_fill_super’: fs/btrfs/super.c:1107:21: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 1107 | sb->s_xattr = btrfs_xattr_handlers; | ^ but the patch changing the type is present in the series. Please update the changelog of btrfs patch with: Add const specifier also to the pointed array members of btrfs_xattr_handlers. This moves the whole structure to the .rodata section which makes it harder for accidental or malicious changes to btrfs_xattr_handlers at runtime. or use it for others patches too.