Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1284212rdd; Wed, 10 Jan 2024 14:52:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDqvswPFgj2MRoypgNuvrPz/+kxjt08AxkF/E4nu8HNGwxb8PfqRCDr1dhSqQjW4XjDKYu X-Received: by 2002:a05:6871:459c:b0:205:f08f:43f8 with SMTP id nl28-20020a056871459c00b00205f08f43f8mr344247oab.30.1704927177448; Wed, 10 Jan 2024 14:52:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704927177; cv=pass; d=google.com; s=arc-20160816; b=W5XmhPQT/DiDBEbEiHaV7+71xjppbZmu+6jyCZ24d9W16kFj8Hrrs/ExPnLL6kZLzn daPXs7ReZIb+h88/Jimq8rvSZKGZrOLs3XlvgDiIMMfRg9fRsrsqRZe5LwmGvFPWNDyh b03Am314jIjb6k8FcAk9USNZYkomb5fgUxJOpy0hccKubeufh11BeWtjiuXDsaRencc3 F6sdD7PPS4TdB2iWqw7q86q33B9yZXODD4qHAeIJyecYJPyH/2cFPapUlqUFGwqu02BX Iw6bHDcQLlnwOXEYYw2lGIFtNGccMAuBzlLcWbT9wAugTS+0oh0MybJ/qiinjPL+YpA0 3qjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:date:message-id:dkim-signature; bh=7cSqXJb2lbMqwBkYqN+FKElvfBCK9qJAIO2sWdxfuMA=; fh=VF7tDys6Dud8kA+jD6oi2J1plTB2mtX4cE7bjtfL9Bw=; b=LoWTboW3SuokfnNnVNc1zKnf2H9DrZ5fmN8hWZlW+kcwDS+IsLs4qYlOE+5AXT78fX yGCYLB2ZPTP7iP2OkNHCJoMoqGNJdrAiojqXWFyRVjuClPl0iNh+krsGJfOj10UiP2mj +Adz8PViiqCmx34QkYwc4CXyvEyNb920rg+nBoYhIBS6rcffu0y67s+LwzJsnwD6zk6e z2thMDdOq/A/J2a2uK3J7bgt1qwL04fKYgvyMj7MxsAfWTgVPkKgelGFUV/utdbS5uEt 6l7fcFDvDkP+DvwZaRGInCBVFJ10Tt+KhRBedV+C/MGNIWIUcAMIEwvZ+WhqOzMz+eG7 mpqw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@prevas.dk header.s=selector1 header.b=VbsyDy0u; arc=pass (i=1 spf=pass spfdomain=prevas.dk dkim=pass dkdomain=prevas.dk dmarc=pass fromdomain=prevas.dk); spf=pass (google.com: domain of linux-kernel+bounces-22863-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22863-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=prevas.dk Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s194-20020a632ccb000000b0056fbf85c743si4510083pgs.790.2024.01.10.14.52.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 14:52:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22863-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@prevas.dk header.s=selector1 header.b=VbsyDy0u; arc=pass (i=1 spf=pass spfdomain=prevas.dk dkim=pass dkdomain=prevas.dk dmarc=pass fromdomain=prevas.dk); spf=pass (google.com: domain of linux-kernel+bounces-22863-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22863-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=prevas.dk 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 14F2C28836E for ; Wed, 10 Jan 2024 22:52:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 106194F88E; Wed, 10 Jan 2024 22:52:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=prevas.dk header.i=@prevas.dk header.b="VbsyDy0u" Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2127.outbound.protection.outlook.com [40.107.14.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 365744EB55 for ; Wed, 10 Jan 2024 22:52:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FfSFCornNbozWo9JdTSYk3/zDy7dQWUtJMfZ0U5++Ae6qTBsbC2h6fi/jNgtNRRrEMXG32cdVHHyF0+7BErq8fW0fDuZw0jnPzkkvMx9l45uoP5272IGejL72XrKRvOBYICLZhXM/QcgX02hBNx7am+xudfyy06VT1DO9nmi87eOgzYruq/Mkfn38s1GtsgQmmPO4CK4/TP34vIjhv7mCIylvh9phQtC4o8/yxclnDeTBkd16PpoQmwy6fAqjjAMVKqvmLE1SbiJmhOZW4aCGVRtOVzaqiJ1oxhnZFjItp2e+awNTxmOVKnvvQ3CajOBgNKj1KshqdZqTbUbmfpXQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7cSqXJb2lbMqwBkYqN+FKElvfBCK9qJAIO2sWdxfuMA=; b=jzQtpPD+2DBpNS4ga7dCOO0fLbuUIAaJmuNP+Fx1VjyLGJN00BLY9PLTx41OIgQK33xgtNPERMgwhDm9keJa+W710gz2hD9y+PzPNYzYNKcnX366GutFHeu+Jc5QhlriFWuZaKRi+taATRMNjfFHPBN1k8TrxjTVQV1RENi/XztOJXFaMXmuEbpnfqYbUe849IumF5xpPVEtaqUn9FqJrTok8YVrW8OV7uK6FWHFMnOCBWhLGhOGoE8ozfO+eyfdkMu0XRAFwRgrtrY3hNbkCLIetbc/s8d4PQK843Momp2aAfwwFi94oJypaEjoreKeOBWXcJBLR+rouHuXEw/nHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7cSqXJb2lbMqwBkYqN+FKElvfBCK9qJAIO2sWdxfuMA=; b=VbsyDy0uW0E8C+cY6wghTZgrdKu+lGaQoiFemjxPYPIYxx6S6LJadTsd2rn+K62FR+nI6Zp5YcSVnfNsBfb9U6Htp9ICMJo5LJ4l90termBvJS0rwLH1Ei6qhUWtYlQ1rOZtSpRvwBUKfH+d0G6ZLBHUu2W5K084hl6xwqxPwrI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=prevas.dk; Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) by AS8PR10MB5853.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:525::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.23; Wed, 10 Jan 2024 22:52:41 +0000 Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de]) by DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de%7]) with mapi id 15.20.7159.020; Wed, 10 Jan 2024 22:52:41 +0000 Message-ID: Date: Wed, 10 Jan 2024 23:52:38 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] workqueue.c: Increase workqueue name length Content-Language: en-US, da To: Rafael Aquini Cc: Audra Mitchell , linux-kernel@vger.kernel.org, tj@kernel.org, jiangshanlai@gmail.com, hirokazu.yamauchi.hk@hitachi.com, ddouwsma@redhat.com, loberman@redhat.com, raquini@redhat.com References: <20231215193954.1785069-1-audra@redhat.com> <20240110202959.249296-1-audra@redhat.com> <2f0efed5-f9f3-4a5c-9fd4-a4837cada298@prevas.dk> From: Rasmus Villemoes In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MM0P280CA0003.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:a::14) To DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB7100:EE_|AS8PR10MB5853:EE_ X-MS-Office365-Filtering-Correlation-Id: 24d24539-0bdb-4d3c-1bf8-08dc122eda09 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tY4tPCIc/sCTFyi+4x8JaU0DrNVizuwj44ZcYy1yB3SESSwaDJTtiaavqN8f9PeJP91//gdK7Vzw7VM7yvWGnF1TEXke7lJCYwwExqEHVY6+9xDTSIyC8MD+g7yGPo3oLYKY07vUJ/E5IN0nBdRORVJipeFjCcyGggjLxfhsNGtPr+WX2dr1cGYYXjJwuAx67t7CtsNPmogbFUH3i/5oHVNkPFkbMJaXjl5vt+BdO46Bo1/toYjo5Dl2k6FRKmFcKWFrjbveT7SZ8ZdGubt+Nd7C+ify4NGYkLdq99kSEC18w1RUr23tfyAc0g6teSYQl1Rx+TSjAxybGOKUxbia7kQtIdevRuYwMQSAKcDI14SazKvgRVaFKIcukU1e+utGgS66DB2Nm+geqdAcZ/0fuMsDdgGU106xml0lGm1L6P3pvpWJTeoDSxB/KIJTIoIQNEYZ/En7OCROxaJYokLrgoY8t/zAxq2AWn8kj+ACiePwjp49eFiqCO+tFWhiXVWWgLd0acm8Y3cGZZv+YWdWKQHDn3GaPchDmIvcLulOQUH6amWGcONX/RVFdP25KpqO6pfNuxFZruwLvpOlQS2VA4EFroztTjFdE0PSgNU9L4GrQs6B7dgAcBtZielCagCS/3uFFF/pw6RaBk4+WarnxA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(366004)(39850400004)(136003)(396003)(376002)(346002)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(2906002)(5660300002)(41300700001)(26005)(83380400001)(478600001)(6486002)(44832011)(2616005)(38100700002)(31686004)(6512007)(6666004)(6506007)(31696002)(8936002)(8676002)(8976002)(4326008)(36756003)(86362001)(6916009)(66556008)(66946007)(66476007)(316002)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cUNHRXkwYlkxRGdrbTFRc3h6TFhhOHpVQzg4emhiQm04dHhBMWpMYTFHUWoy?= =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T0l0NEVoZEh2cDRBR3plOGhCSHFkR0hsMzllRmw3L3pFYUlZNzBzSGx1?= =?utf-8?B?NWMxaUE2Z0tLTTMzQjVrSWZLVnBCOEN6ZVNxeEV1d0R5Vkx5US9uZW0rakVT?= =?utf-8?B?QzcwQ09XazZDTlJYSVlaM3MwRlByY1QwbFkrM1hLNXR5OWlOMW0rcS9SeEdJ?= =?utf-8?B?UDZoc1dUTGxHSGc5KzR0QStjMENWSlIvcnFyWGJUUld5RHBZeFJsbDk2aFN6?= =?utf-8?B?Q05hVTJJMEZ5NGtSVm5qYm5DU2RJS0NqMXZqenJGa0k4Z2JPa0F2R0FjRHlC?= =?utf-8?B?NHBBVkxJSGRBd2F5V2JVTXFUUXlrUUZ5c050bmlzZmpib082MDRpYVNSdnVl?= =?utf-8?B?Mnc9PQ==?= X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 24d24539-0bdb-4d3c-1bf8-08dc122eda09 X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2024 22:52:41.7030 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DkO7/v4uJNPnIR5xp9fwOw411004JmDEk4CvTEZG64X4o+yX5X+QM45j7a49A5eiJ5jg4t3z/UV5THsFX4CjTNSKwT+ttRuZ9VDakxaodGQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR10MB5853 On 10/01/2024 23.31, Rafael Aquini wrote: > On Wed, Jan 10, 2024 at 11:06:22PM +0100, Rasmus Villemoes wrote: >> On 10/01/2024 22.52, Rafael Aquini wrote: >>> The extra vsnprintf call is required because the return of the existing >>> vsnprintf() is going to be already capped by sizeof(wq->name). >> >> No, it is not. vsnprintf() returns the length of the would-be-created >> string if the buffer was big enough. That is independent of whether one >> does a dummy NULL,0 call or just calls it with a real, but possibly too >> small, buffer. >> >> This is true for userspace (as required by posix) as well as the kernel >> implementation of vsnprintf(). What makes you think otherwise? >> > > this snippet from PRINTF(3) man page > > RETURN VALUE > Upon successful return, these functions return the number of characters > printed (excluding the null byte used to end output to strings). > Assuming we have the same man pages installed, try reading the very next paragraph: The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte ('\0')). If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. Thus, a return value of size or more means that the output was truncated. How else would you even expect the vsnprintf(NULL, 0, ...) thing to work?