Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1047333rdg; Fri, 11 Aug 2023 08:08:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH19dXrKLJgx+4cCkmuYjWWoGxvbOxlyS66e2+twzJ8VYTqB0j30hoWf96ulZAKwCrxAb8+ X-Received: by 2002:a17:902:aa41:b0:1bc:2036:5338 with SMTP id c1-20020a170902aa4100b001bc20365338mr2014291plr.28.1691766520842; Fri, 11 Aug 2023 08:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691766520; cv=none; d=google.com; s=arc-20160816; b=M5EWCtcCEx+w0MWOd9NLidhBlp8AvkhTYU6QmKMBDdMob2KlRYzpIFMKn1YtcwSBcv nhPutuHTuT4v0amjeOo3Slm5uieUDeHhnJqJ/PGtDi69BKcDSh5+ptcTwMjXUhFlXY6T J1hspWypswVELIyQYtxwgK19bbYCugyOuyIdbPFRce9N7Ibp7fWNjRDnAvYfWgJEC0/3 akW+dz61CKCXq+0+YkYXl5/1VRq4joBfzfWy4sNlt0ls8hK/Cx9ySJlZDtcsrtUm8BXQ 8x6JtetaCNWWP2vQ+HIUxBHm+DbxIgEvVQq/MzPftX07pwJ/xUDNuYRFlxG3qeob1IVF k6mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=GBRpFjxLbns8NI82AkjFbqTYlTSuMd1HSZ4M2qYod0w=; fh=QpHILvsjEam1p+E6xJNjhPaIDe5fTeQIH9FrbghprAg=; b=LHsvDU4aL3G1deyUXkd8iK/66IvKH1FXWw2vS06Ajp8QIrNHyKF4Z7zhpR0j14LFVJ 9oVLvqQrGL2D3kFm9HzVWRGv+zPGUL8PzuqDqw0Gftj3szcET5Z09FKSVWQYqbpRIrkb O2xDwsfSg80xTvOHEBJ7CeTUsYcn1kqUiYpLCLS3dmHP6/lZQ9cl2ZGcV3d4tvsIUIqX 2s230LdfneNzc70TUIpfNdUNUo+7V0xjIzm01xQV54WaQO37IT92of3lzpY84vzy6gjs +cKV8dgFmyq0ADXt66lZCh8KdyCNQ7TkQsqgqnBj6OHndIsfhSUN/nVlRSHp80RT2zqt weuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=VgEAODst; 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 w32-20020a634920000000b0056383a7ddbcsi3665548pga.103.2023.08.11.08.08.27; Fri, 11 Aug 2023 08:08:40 -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=fail header.i=@igalia.com header.s=20170329 header.b=VgEAODst; 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 S233609AbjHKNaB (ORCPT + 99 others); Fri, 11 Aug 2023 09:30:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbjHKNaA (ORCPT ); Fri, 11 Aug 2023 09:30:00 -0400 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6855C26A0; Fri, 11 Aug 2023 06:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GBRpFjxLbns8NI82AkjFbqTYlTSuMd1HSZ4M2qYod0w=; b=VgEAODstO4Ai6X5+PSSXKGtpd4 AvcElTUI0IgZo7meovrPNNaecYhdVpIxNv8RiY2jno8AdVjQYKpZwdq8C7F2ktOsCDH0sJ/HwihCi xC2nVxcz1bFQqKaekIiBn9Eez8rOXuX7BY6FeMxgM3TSkVECUDB8XNn4NsJdgYpGIWoNc47DwgW+q yfmz7LPgUkZ1lz8VvvIFtXz2/VPLmJA5CqBq/cRLB7iXTPPeJp6POHC7Kgbdhr5SXBEEq8E0EgHIg YZryUEM3a3EmAOmS1awoAiZdldlXGKJFrzjlKlo/6cD1cDcestCWmunAXfxbiiRvlQ7PIGrDrfIys nfoLoUYQ==; Received: from 201-92-22-215.dsl.telesp.net.br ([201.92.22.215] helo=[192.168.1.60]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1qUSD8-00HAJo-3p; Fri, 11 Aug 2023 15:29:50 +0200 Message-ID: <2b358118-e7b9-1f6d-aa38-306f537a5d93@igalia.com> Date: Fri, 11 Aug 2023 10:29:37 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] printk: ringbuffer: Fix truncating buffer size min_t cast Content-Language: en-US To: Kees Cook , Petr Mladek , Vijay Balakrishna Cc: Sergey Senozhatsky , Steven Rostedt , John Ogness , stable@vger.kernel.org, Tony Luck , "Paul E. McKenney" , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20230811054528.never.165-kees@kernel.org> From: "Guilherme G. Piccoli" In-Reply-To: <20230811054528.never.165-kees@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 Great finding! Thanks a lot for the report and the fix - oneliners are usually the most challenging to debug. Tested it in the Steam Deck, and it works perfectly - I saw eventually one line or two filled with NULLs, now they're gone. Feel free to add: Tested-by: Guilherme G. Piccoli # Steam Deck