Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1669835lqm; Fri, 3 May 2024 02:56:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0ovzUswZUFjpsmjAqyLXebHrvtVUsCx32LfsvO6a/2iNgPqXGwL9ecSfC/d019FwSzVh2VJhqbhvBu0gDzTnbWV0uw3663uD3aB3G/A== X-Google-Smtp-Source: AGHT+IFBcK8xR4t1f0KIaJfvYpPpp7+v2wb7+t05taanhPMEPbPQnIJYiNpflKlcoO4TFAkePzMM X-Received: by 2002:a17:906:27d3:b0:a52:2e91:321e with SMTP id k19-20020a17090627d300b00a522e91321emr1501061ejc.72.1714730208035; Fri, 03 May 2024 02:56:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714730208; cv=pass; d=google.com; s=arc-20160816; b=EvR/oWNc5/ORyaXh2g3q8XFYWGe1TL9vzvv6hkExgfs2qsOBmDtjhdItisxfQnUi6P dHQh5AsD6jDN1LGsCXO1fi08L696malyhxTojw1RuLibwqCdlVmwj9n5gsCaLU+9qWCD iKTqlDO/YL16qYwfiec16tllZGG9p4PiqZcu/cwre8J4+u3nMY+xKVkA8LX/MJ+cG/OP Sk4FQzAgj3NR21I3sbKsyLq9anggww983j6+Lg3v5335cZPQpHJQEQas15SppKX/yVlm WoDJyFZYlq4KVXfR7QW4XDvGSCA1jAY7qEUyLe2BVZuBIrwwNWCVEwiTPVHFg4b3Xdb7 2ELw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=XIG9slMCyHLfBKKaW+7Uev1fv1j+U80XAyAPuHSiT3A=; fh=aXVPkA3OAQPfHQI0077y9H2mRz3lCXaF3Zh5g/0LTzk=; b=hZ9JDw2YgaiKKZh1TZbUxO3neFPOVRIlND4CxtRoVv+KoTuclkvk2S04WBMK+OOJnz 1bopZ/UDvbz7Vh9uaB4uxhepb9TtuLL5vv1cnbtBTPW8fdEJKufIMcXEX0/ygRKSGiGD zT87/+xpQwfpN0WOejZuYlpWuEHEQ6mxMthYX4gBWFhzRCSF/a1BYaIZZlzNt5qocraz Kwg4GlfyWKtkyQuJpD6wTwjvuU/PAZmph2/rL2QuzkHGkdcoru54i9fAmDpVQ8Mv7KQh KK1XZqf3t2qLxT5+43aZbmi9PY7vUAf7P36A5y6XK0TItm9hjZ56eFImiShANR3FHpuL Z57A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UDz22OGC; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UDz22OGC; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-167494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167494-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id di10-20020a170906730a00b00a59964a02a7si357543ejc.175.2024.05.03.02.56.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 02:56:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UDz22OGC; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UDz22OGC; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-167494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167494-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B4ACF1F22BC2 for ; Fri, 3 May 2024 09:56:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6342514F9E3; Fri, 3 May 2024 09:56:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="UDz22OGC"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="WlZlfme+"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="UDz22OGC"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="WlZlfme+" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 238E714F9D6 for ; Fri, 3 May 2024 09:56:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714730196; cv=none; b=liJ8aaXEq5XRM+mCmkBANwtFCyOVM69oncw3LLsOTuRXETXj6Q4QGDcgYpZ0KJkh56L+JEHOyhbMCbyEaBZKZwpvcPBFnA8JrKYvvfL2ccr1voq+PhbkusaYvoLC/ll//4rgM5f/w5sZ7AoD4AaYvtlIAn7IVfd+rGCRyEGD2AA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714730196; c=relaxed/simple; bh=8AGEhTMiYOobEPnPXSlOy2Iliwm8S+Fjp0/zZG0xTsE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Hspv6cC8k92KMzFjd9EozZKbl+mGKbc2rDurcq5JjNKULEaRlCjeH+UQAAslNCGx7PC6xRNIGaTWxTA2iED/IrhcRPDgtq+/QuqJBBUCUY9Nn7nJk5H/n91L9velrfqWz7YGfWyKprlZNScQDAT7yKosDMQz+B18V1XVzZDYYG0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=UDz22OGC; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=WlZlfme+; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=UDz22OGC; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=WlZlfme+; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6701E2007F; Fri, 3 May 2024 09:56:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1714730193; h=from:from: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=XIG9slMCyHLfBKKaW+7Uev1fv1j+U80XAyAPuHSiT3A=; b=UDz22OGC/zAQQiaot+jIiQhUWv15+kZz0dTXsGCR10z0H2Yr0WYej5qOp2UFVcwCk+fcmS p+IUJGHNc92QP7a6ZauNtvhTrnpEHddSVLdlaDtfUOJa+i1AyIyO6Tnx4W0XQc885UoxPg fDjJ7Xz+zT+s5AbP6rYduAvtWiAOyME= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1714730193; h=from:from: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=XIG9slMCyHLfBKKaW+7Uev1fv1j+U80XAyAPuHSiT3A=; b=WlZlfme+eWD7nrt63Ts1gnsV6AUylkCuGW9vm7dt9vnQXmjCZHTx7Ot32eP5YkAmlh9PKm AKepehcuwnjMnlBA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1714730193; h=from:from: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=XIG9slMCyHLfBKKaW+7Uev1fv1j+U80XAyAPuHSiT3A=; b=UDz22OGC/zAQQiaot+jIiQhUWv15+kZz0dTXsGCR10z0H2Yr0WYej5qOp2UFVcwCk+fcmS p+IUJGHNc92QP7a6ZauNtvhTrnpEHddSVLdlaDtfUOJa+i1AyIyO6Tnx4W0XQc885UoxPg fDjJ7Xz+zT+s5AbP6rYduAvtWiAOyME= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1714730193; h=from:from: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=XIG9slMCyHLfBKKaW+7Uev1fv1j+U80XAyAPuHSiT3A=; b=WlZlfme+eWD7nrt63Ts1gnsV6AUylkCuGW9vm7dt9vnQXmjCZHTx7Ot32eP5YkAmlh9PKm AKepehcuwnjMnlBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E9876139CB; Fri, 3 May 2024 09:56:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id AyY7MtC0NGYyOwAAD6G6ig (envelope-from ); Fri, 03 May 2024 09:56:32 +0000 Date: Fri, 3 May 2024 11:56:30 +0200 From: Jean Delvare To: Tiezhu Yang Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] firmware: dmi: Change size of dmi_ids_string[] to 256 Message-ID: <20240503115630.520b2de2@endymion.delvare> In-Reply-To: <3283ce46-86d8-ff87-440e-ee9811c9e77a@loongson.cn> References: <1677030901-29326-1-git-send-email-yangtiezhu@loongson.cn> <20240429144442.472aa83c@endymion.delvare> <3283ce46-86d8-ff87-440e-ee9811c9e77a@loongson.cn> Organization: SUSE Linux X-Mailer: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-suse-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Level: X-Spamd-Result: default: False [-1.41 / 50.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; BAYES_HAM(-0.11)[66.09%]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[] X-Spam-Score: -1.41 X-Spam-Flag: NO On Tue, 30 Apr 2024 22:49:46 +0800, Tiezhu Yang wrote: > I did not find the string length of system vendor, product name, > board name, BIOS version and BIOS date in the spec, I only see > "There is no limit on the length of each individual text string." > in "6.1.3 Text strings", so it may be better to increase the size > to avoid the potential problems in theory at least. There is indeed no limit to individual string length, nor to the total length of the string section of a DMI table entry. The only limit is for the overall table, and that theoretical limit is 4 GB. This isn't a reasonable size for dmi_ids_string[]. This is the reason why the size of dmi_ids_string[] is based on real-world samples and I will only increase it if a production-grade product has strings which do not fit within the current limit. Note that nothing really bad will happen when the strings do not fit, they will be simply clipped to the buffer size, and the same data can be retrieved from sysfs or using the dmidecode user-space tool. So there's no compelling reason to increase the buffer size in advance. -- Jean Delvare SUSE L3 Support