Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1182187rwe; Fri, 14 Apr 2023 16:04:29 -0700 (PDT) X-Google-Smtp-Source: AKy350aTctisPfrymXG0q2A0DM6tAzGfTlKlTV2kUqg3MWgjmKZR6KSHDzSEqi8WjQfrJrqBmxgt X-Received: by 2002:a05:6a20:8b99:b0:eb:b8d9:7a93 with SMTP id m25-20020a056a208b9900b000ebb8d97a93mr6819644pzh.18.1681513468918; Fri, 14 Apr 2023 16:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681513468; cv=none; d=google.com; s=arc-20160816; b=lRrC7Su02hXevME5ynuckN8i2nNQ9Y7Wh+T+yLmWCvSp32ZuLqhz24os3cjnXADVaI qp2Fzg23Fv32NVd+27JSxkhAKwqBUVmZsN9JiXa/G9/2jtGag0ji3RuzqnXtXL3pO/Hr cA1OSeJcdCT4sUNC23sLjbtc148GjLWi+hKe5r/kt1IBJXM91EZHqH64fay/XIXVE3Mi yudMqkBVaSOwGWwOcUxSYHyrg3PJuZc+yY06pcen3l8AqtLs+H0WDkOCkE+mi+ej3a6A ZWRmVfoASFxNLyFu/nSx3MdMBqd+R25R9/b+T8nFJs84AnA9P4zT1h41aQVg+ZaIe3nD b3mw== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Dp1a1kjluZNVhpPZDVJ9ePT3GsmbnzfwOL9U8ib3LlQ=; b=PE7b2HROhEL3MZe5X9yJrZMwdnnbe5pK+8FFuN/bZvkUEn6cS7F4HYVtytI2N33GuX dPUSJ4BLqsditsr4xuQtDZVICOYiAMuMxOQoL+Q7g38gc68Zj3Elb7LSz06EFcQyoes1 e5mGaThnNUVqNsJPyOXfe1JfLoCoKWFw1WAaZagsToKchdUD5Gf3HI0REjyg8gPnD3Bg bHckaSjkgNItdD3X5R2d4BFZxhDrpdEPX67U0ydHdLHE94SK3RKiiib3HwtZcRhJRyFd Woqs8fFlUG9ygmXdJRwlQLoQet5/apw4Q/o4hx1adwGGGp1PoQx077XAF51Jcxa0sJEs VaiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Yx84wb7g; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a654145000000b0050f781377e9si5475645pgp.70.2023.04.14.16.04.06; Fri, 14 Apr 2023 16:04:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@google.com header.s=20221208 header.b=Yx84wb7g; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229574AbjDNXBz (ORCPT + 99 others); Fri, 14 Apr 2023 19:01:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjDNXBy (ORCPT ); Fri, 14 Apr 2023 19:01:54 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 564D86EBB for ; Fri, 14 Apr 2023 16:01:52 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1a273b3b466so340095ad.1 for ; Fri, 14 Apr 2023 16:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1681513312; x=1684105312; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Dp1a1kjluZNVhpPZDVJ9ePT3GsmbnzfwOL9U8ib3LlQ=; b=Yx84wb7gBfazk3jnW0Ue8grsPP6hVzvp4fJspHF32wEjsRKZTcNxhQPZZOhWn6cW5E DNLircvthdGx8c1ESx8qhRWi8FDstC0PEM+hN6kxwSN6pD1xaSNsnYd5EeahYGeJ6xmt S52WbCianvDa9hulrUwSLiHAIeOjbO9/p6/dXCJDtjea920hs4u1/jsf4G7x+refmeN8 //olkAWaZUMUkC3En0dbLIo2D+pabl64ppm131YTaGYjUZa35Vnu2vujO0HjHJJeLxe3 LPC0pxpz2DgDwLhoI+XDwLKScUhmtbgVDqRBiGcX6sOvwhNsmTEoKJX9z1IfGOwawzpO wvlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681513312; x=1684105312; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Dp1a1kjluZNVhpPZDVJ9ePT3GsmbnzfwOL9U8ib3LlQ=; b=OtsgS6RElH/MqiZtKrGmQcm5Z1b9bbUH6Dh04W4zAvFS8NsZcjF5xzTkJGAFe4PNC1 cvD42SsgWHq6EbGRqlZhmZWo4vQy7J186KdHiEfk7qArnUM7k+4zNv2ZmEOvUng7yOwa vIKo7AaX/JA0OHe7pmYtjGz69NJ2P2CUvtxR68aREqiuYUxuwY9igcxIbEqQ5Jg/rr1/ EICw9k6phCl7ISIehJYb92Eqtmolo63hzUew2yVAuJ4yX5galw4XX7MSZgx3suyzA15T 25RfYw15BYTdfc0N68rsQ+PFjKONr7dodgeRcmqsddMQpR1eMZPwhIM94aeDgFA1hH9s Buyw== X-Gm-Message-State: AAQBX9fDsKaKUqUacUcPiEZ3djnyitCIwigtJwWRkeuAVyHepOUM4HL7 N0TVacVSq4jckCvBZ1vR3nTdfjlq0Wbjk6gDkTETtA== X-Received: by 2002:a17:903:2112:b0:19e:6b08:578c with SMTP id o18-20020a170903211200b0019e6b08578cmr55014ple.1.1681513311488; Fri, 14 Apr 2023 16:01:51 -0700 (PDT) Received: from google.com (13.65.82.34.bc.googleusercontent.com. [34.82.65.13]) by smtp.gmail.com with ESMTPSA id x12-20020a1709029a4c00b001a52ee4c4a5sm3508265plv.60.2023.04.14.16.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 16:01:50 -0700 (PDT) Date: Fri, 14 Apr 2023 16:01:47 -0700 From: William McVicker To: Theodore Ts'o , hch@lst.de, linux-ext4@vger.kernel.org Cc: "Stephen E. Baker" , adilger.kernel@dilger.ca, hch@lst.de, linux-ext4@vger.kernel.org Subject: Re: simplify ext4_sb_read_encoding regression Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,HK_RANDOM_ENVFROM,HK_RANDOM_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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-ext4@vger.kernel.org On 06/02/2022, Theodore Ts'o wrote: > On Wed, Jun 01, 2022 at 10:06:04PM -0400, Stephen E. Baker wrote: > > On Mon, May 30, 2022 at 9:37 PM Theodore Ts'o wrote: > > > > I don't know what to tell you. I took your config, stripped out all > > > > of the modules, and enabled CONFIG_HYPERVISOR_GUEST, > > > > CONFIG_VIRTIO_MENU, and CONFIG_VIRTIO_BLK, and build a 5.16 kernel. > > > > > Maybe a silly question, but how do I enable CONFIG_HYPERVISOR_GUEST with > > this config. > > So let's make things easy. Attached please find my minimal config. > This is what I use when I normally build a test kernels, and I get it > by running "kvm-xfstests install-kconfig". I use it because it's fast > to build, since it doesn't build extraneous stuff. I've also attached > the "seb-config", which is your configuration with the minimal changes > needed so it can run under qemu. The compressed size is twice as big, > and it takes 2-3 times longer to build. > > I can't reproduce the problem you are seeing using kvm-xfstests using > either kernel config building on 5.17. > > - Ted Hi, I believe I figured out what is going on here since I am hitting a similar issue with CONFIG_UNICODE. If you take a look at the .config from Stephen's message, you'll see that he sets: CONFIG_TRIM_UNUSED_KSYMS=y CONFIG_UNUSED_KSYMS_WHITELIST="" When trimming is enabled, kbuild will strip all exported symbols that are not listed in the whitelist. As a result, when utf8-core.c calls: um->tables = symbol_request(utf8_data_table); it will fail since `utf8_data_table` doesn't exist in the exported section of the kernel symbol table. For me on Android, this leads to the userdata partition failing to mount. To be clear, this happens when CONFIG_UNICODE=y. One question I have is -- Why are we using symbol_request()/symbol_put() when `utf8_data_table` is exported? Why can't we directly reference the `utf8_data_table` symbol? If we need to use symbol_request() when CONFIG_UNICODE=m, then can we apply the below patch to fix this when CONFIG_UNICODE=y? I have verified this works for me with CONFIG_UNICODE=y and CONFIG_TRIM_UNUSED_KSYMS=y. Thanks, Will diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c index 67aaadc3ab072..1631bffa51b2f 100644 --- a/fs/unicode/utf8-core.c +++ b/fs/unicode/utf8-core.c @@ -181,9 +181,15 @@ struct unicode_map *utf8_load(unsigned int version) return ERR_PTR(-ENOMEM); um->version = version; +#if defined(CONFIG_UNICODE_MODULE) um->tables = symbol_request(utf8_data_table); - if (!um->tables) +#else + um->tables = &utf8_data_table; +#endif + if (!um->tables) { + pr_err("%s: WILL: Failed to find utf8_data_table symbol!\n", __func__); goto out_free_um; + } if (!utf8version_is_supported(um, version)) goto out_symbol_put; @@ -198,7 +204,9 @@ struct unicode_map *utf8_load(unsigned int version) return um; out_symbol_put: +#if defined(CONFIG_UNICODE_MODULE) symbol_put(um->tables); +#endif out_free_um: kfree(um); return ERR_PTR(-EINVAL); @@ -208,7 +216,9 @@ EXPORT_SYMBOL(utf8_load); void utf8_unload(struct unicode_map *um) { if (um) { +#if defined(CONFIG_UNICODE_MODULE) symbol_put(utf8_data_table); +#endif kfree(um); } }