Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3933584rwb; Fri, 30 Sep 2022 10:14:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7D1v/YR5WGWICgG3gRWzBovqVyCMHAJs9MTDO661RyMXdbg7MEI06m4R4SLdw81YcHaeVb X-Received: by 2002:a65:538e:0:b0:434:aa53:2244 with SMTP id x14-20020a65538e000000b00434aa532244mr8045460pgq.343.1664558044804; Fri, 30 Sep 2022 10:14:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664558044; cv=none; d=google.com; s=arc-20160816; b=kT18O3OETYTgibtOWgP0n8RrF5j91DyvZVbohZeX3TFfRmI7cuK5j2Dhu0u6GJtlEI 9kxwV6PcvGVsk8Zn1pYuESyCdpMX0Lh90Dcr9K5LQDZIFdeuEwg/bGV8MazNBNXNbM1S UDj9/yzmy+5o3qUx9ato5lfl0Raq3y93eEjxCurG1UVbE9Qi4aF9B+b+cehKJPZwCjSB kZplYzWqytmOxFRI6Lkn0f2e7YADrXVfok7yTAF7tO3sNrbdJ0FTVC/4PHHEOA7QvN6w Ibslbd6hmLCr07MAmPUsL63l31z6B2fe5U46aCg78EOjmsMS+CxMTPl6L6oDzHDRdczL GEDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=LMyHrhJnPEVuvwl7AW4u09S1R7T+l6FZqxuDf5fED+Q=; b=ttXfYSUBkLdowZ9XBTEVdPf05O7ndPQmdbRT5TQzQB5AjSe4tvEoqrEGzcmGcAsL0y fYaysyHXDlmBIURYKmdGzI4IhcUwvsnHLbTfkm/7rNAVnNxNIDaSwYbaN8ymtHOeQ893 /BBB3vTpQydCAHLUdeyunt0ttyrFOdGdX1TKIesH82vGixwpmYh4Th3LlDMKv3mUym/+ 8L/fZ4rWblpdb9oZAL3fyoyxfrmCR46gsDTZVgrvEW1Nh/hI4jZD8nrqeXIFf3+++YRU q/ZKPVo1fiZsuhxAWz3aIr5EPXir3YPTcgwOjsKY0sJcbQ+k0dkQQR+VVFDXak2nhi72 1NNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=so45NCRM; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s14-20020a17090302ce00b00176e05275d1si3375855plk.423.2022.09.30.10.13.52; Fri, 30 Sep 2022 10:14:04 -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=@kernel.org header.s=k20201202 header.b=so45NCRM; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231686AbiI3PwM (ORCPT + 99 others); Fri, 30 Sep 2022 11:52:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbiI3Pv6 (ORCPT ); Fri, 30 Sep 2022 11:51:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAA50104612; Fri, 30 Sep 2022 08:51:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 76F1AB82954; Fri, 30 Sep 2022 15:51:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3284CC43141; Fri, 30 Sep 2022 15:51:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664553112; bh=+eWM1THqIFbDHvQBPZTD+XciSZi/CQ/ZVgSibLCd7ko=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=so45NCRMIE4QgV4ZCL4L4VlMEGerkP4QbeRWVX5KOOGMGXBq1A+4EszKbB2VmuVfK GeJkKjEoTedBnESqkYloFdauwJJoolLNwntjO8k/xSX/m9bm6H6Zog16AHMbeBtBAZ ah4S7DGCs9rEWaenV/whcxtMmGiYpNhdEtWHogstDSYZHajrJWXBmxAQurl7gfUAZn AMf8HieAJSWbv5bnDoPLZtdYBuHk/nHK6RmALsowJgHcbiZumj+2X0mSbLybJJsFnW 28sULD+YMapqS+rVb2Zuh6NnGH5KR/WUqpb1DgloE76lhzESNrQ2yDcxgAuaHmcmZa P2KXb3mQ68bww== Received: by mail-lf1-f51.google.com with SMTP id 10so7528492lfy.5; Fri, 30 Sep 2022 08:51:52 -0700 (PDT) X-Gm-Message-State: ACrzQf2XPwwPLf0ssuz63K9Sr2/J4gAwbYPyjDnk9+lY55fAwurWPNaV ED75SN8UkigiZpyltRa8quBGSlIT9hE91qwjRoY= X-Received: by 2002:a05:6512:150e:b0:492:d9fd:9bdf with SMTP id bq14-20020a056512150e00b00492d9fd9bdfmr3382854lfb.583.1664553110088; Fri, 30 Sep 2022 08:51:50 -0700 (PDT) MIME-Version: 1.0 References: <20220929215515.276486-1-gpiccoli@igalia.com> <202209291951.134BE2409@keescook> <56d85c70-80f6-aa73-ab10-20474244c7d7@igalia.com> In-Reply-To: <56d85c70-80f6-aa73-ab10-20474244c7d7@igalia.com> From: Ard Biesheuvel Date: Fri, 30 Sep 2022 17:51:38 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [REGRESSION][PATCH] Revert "pstore: migrate to crypto acomp interface" To: "Guilherme G. Piccoli" Cc: Kees Cook , linux-kernel@vger.kernel.org, regressions@lists.linux.dev, linux-fsdevel@vger.kernel.org, kernel-dev@igalia.com, kernel@gpiccoli.net, Anton Vorontsov , Colin Cross , Tony Luck , Thorsten Leemhuis Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Fri, 30 Sept 2022 at 14:39, Guilherme G. Piccoli wrote: > > On 30/09/2022 00:29, Kees Cook wrote: > > [...] > > > > Hi! > > > > Thanks for looking at this. I wasn't able to reproduce the problem, > > initially. Booting with pstore.backend=ramoops pstore.compress=zstd and > > writing to /dev/pmsg0, after a reboot I'm able to read it back. > > > > Hi Kees, thanks a lot for your attention! > IIUC, compression applies to dmesg only, correct? > > > > [...] > > What's your setup for this? I'm using emulated NVDIMM through qemu for > > a ramoops backend. But trying this with the EFI backend (booting > > undef EFI with pstore.backend=efi), I _do_ see the problem. That's > > weird... I suspect there's some back interaction with buffer size > > differences between ramoops and EFI & deflate and zstd. > > > > And I can confirm EFI+zstd with the acomp change reverted fixes it. > > > > I'm using qemu but was able to use real HW (Steam Deck). In both cases, > kernel is not using the entire RAM ("mem=" parameter, for example) so we > can use a bit for ramoops. Also, both setups are UEFI, hence I can also > use efi_pstore. > Does this help? diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index b2fd3c20e7c2..c0b609d7d04e 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -292,7 +292,7 @@ static int pstore_compress(const void *in, void *out, return ret; } - return outlen; + return creq->dlen; } static void allocate_buf_for_compression(void) > > > [...] > > Hm, it's possible this was just sent directly to me? If that's true, I > > apologize for not re-posting it to lkml. I suspect I didn't notice at > > the time that it wasn't CCed to a list. > > No need for apologies, thanks for the clarification! How about if we add > a mailing list in the pstore entry on MAINTAINERS file, since it's just > composed for you and 3 other people now? I mean, "officially" speaking, > it should be enough to send a patch for the 4 maintainers with no list > in CC, and that's bad for achieving purposes. What list should be the > best, fsdevel? Lkml? > Makes sense > > > > > No worries! Whatever the case, there's always -stable updates. :) > > Heheh you're right! But for something like this (pstore/dmesg > compression broke for the most backends), I'd be glad if we could fix it > before the release. Yeah better to revert - this was not a critical change anyway. But I think the tweak above should fix things (it works for me here)