Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1880189rwd; Wed, 17 May 2023 02:42:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5WOAIQawga+IwN+d2HvhAd8yU6OJ0pcSqUG9CibEo1Py0/J95xB1NmaVrpcX5gij/pO28S X-Received: by 2002:a17:90a:f0d1:b0:253:26e5:765a with SMTP id fa17-20020a17090af0d100b0025326e5765amr3973200pjb.48.1684316546010; Wed, 17 May 2023 02:42:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684316545; cv=none; d=google.com; s=arc-20160816; b=Yw3FJ4OKqmvqdTQ0AG1eFbIYw1RI62Xfmz7jN7mkr/ZDkIxcUciVbQnveihLII+ysc snW56c4vf6HMVRgHRxkdK4t/3omtYpwxbhywW2HUTKq/B/vvog4dxSD5MBvIgPJrr+O6 YvCnc7KeNtUReHQLjNPSTSP66jhKn71qNpd80PrxKYoXb6o9m4oXaI4q3ptbfIj29PnE 1KorlGatSD1N1mjpDn17KjdRuPmSAhzKg0ZdbZGWMw3yMzxFqa3Ou2aDzaXDrVIP6aC+ wmdaQI0D9TnTolJq2Ca4MgTEBad5aAN85iw1PqldkfBAgxyXeiDB3q+hXLBmnmmOY2O2 YqhA== 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:subject :from:content-language:references:cc:to:mime-version:date:message-id :dkim-signature; bh=5S7Mmw4kjAD2XaDKIPcRvxW4MkJS5gg8vseQbxJ1MII=; b=BSx8tgnLLlk5WqSBN0mmkMeTcoI8wDEuJwVZ7PeZK/JvyrlDEsDbVZ+oxOcU0MfAo7 inrt/o/qI+5d587UiTOlxPW9Uzc8XBVN/rWua4wvL2idI6GECbZgWeE+X0ZMuwGnnq05 NT83g8QfitaygwQLjx0xWH/LYL5FL2pbrZZYLVA26P6QgJyMwCxCcmwizjj2rZqpvmbc JRYH99pu1bknOpzW15KBiuaulaZSnMwL5d/FooXUysbD4ZmH5Vs0GiAI6vd6Yn4AEJ5x eDBvFTEkQCkWQSXTiuVue2NzAoa+zibdsWIQ7S56oRS+jS2Ll0p2un/4eB++tM/kd6zy HsOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="c/OKAOtz"; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l63-20020a639142000000b0053071b7b23dsi16074540pge.345.2023.05.17.02.42.12; Wed, 17 May 2023 02:42:25 -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=@redhat.com header.s=mimecast20190719 header.b="c/OKAOtz"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230077AbjEQJIr (ORCPT + 99 others); Wed, 17 May 2023 05:08:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229965AbjEQJIi (ORCPT ); Wed, 17 May 2023 05:08:38 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDF53E5C for ; Wed, 17 May 2023 02:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684314470; h=from:from:reply-to:subject:subject: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=5S7Mmw4kjAD2XaDKIPcRvxW4MkJS5gg8vseQbxJ1MII=; b=c/OKAOtz2KK3baD4LM3ydATOncOS8oIJ6lMjWEnz5Dbhbgd6DkMTPMe9wm3Iwp/lRXaA5J 3gxV4zh9xjE8eNWL47bO5f+hzyI/F0dZVuxtK28Nz2oDOM3qJZllWNskd79fwsmyxtJjfX 9a18gVoahrLOaGXwn3Io4TEXQVROUMQ= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-286-shnYupdgOR6gV0vNsxd6gA-1; Wed, 17 May 2023 05:07:49 -0400 X-MC-Unique: shnYupdgOR6gV0vNsxd6gA-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-94a355cf318so67378066b.2 for ; Wed, 17 May 2023 02:07:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684314468; x=1686906468; h=content-transfer-encoding:in-reply-to:subject:from:content-language :references:cc:to:mime-version:date:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5S7Mmw4kjAD2XaDKIPcRvxW4MkJS5gg8vseQbxJ1MII=; b=ATIYVzen+onahUrmms8UnSyjFYIzCgSbVG5GbZ/6f71vYOF2yTAtfaui8DabhLJeR4 BS6zM+s0cWmhtnt3f8ZfR67cJ/BZYC6Nfnh4Qv12qGkEDere73tAgfZs4Ky9FqhDBnDu o+zfKBmkYrrjd0w4FFxv+9vGI6fpuqCdhs2MCYgv3Mx9bIoleVz4yNRGrItiKdDeNDo1 FKpCDdEJ/7NaoqQKKcFbv5qosaJNr2Wd25Tl2HcWjlvy4/dH/hHG32FYE/m02iYjv4UP nqcgFBg1oEGq9SB6P8cDwdmMd5vIIJofh/cx54IiwGTFowcjp3D3QNwkFTxZJHIL4eEC NEXA== X-Gm-Message-State: AC+VfDzGPh7VZuEAtOZgCXXmgOcsgzjFdoDjG/0tZ7KTvaac2vh6FbfJ PZU+ZG/KHTfdHLigJcG9qM7lmZ4ttuG3LSUDTY+nqQB7wrKOxO5WxaEz343SjiBTAh+w8OPG7nh XOp0zUA5KC2nxv3kp0NrGZF7O X-Received: by 2002:a17:907:1c9f:b0:969:bea8:e1c7 with SMTP id nb31-20020a1709071c9f00b00969bea8e1c7mr32174032ejc.37.1684314468559; Wed, 17 May 2023 02:07:48 -0700 (PDT) X-Received: by 2002:a17:907:1c9f:b0:969:bea8:e1c7 with SMTP id nb31-20020a1709071c9f00b00969bea8e1c7mr32174019ejc.37.1684314468291; Wed, 17 May 2023 02:07:48 -0700 (PDT) Received: from [10.43.17.81] (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id d20-20020a1709067a1400b0096f0c21903bsm277330ejo.31.2023.05.17.02.07.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 May 2023 02:07:47 -0700 (PDT) Message-ID: <2e650812-d484-12d7-bdf2-7cbe00d53e25@redhat.com> Date: Wed, 17 May 2023 11:07:47 +0200 MIME-Version: 1.0 To: Xia Fukun Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org References: <20230516123719.117137-1-xiafukun@huawei.com> <24c413e6-75a5-254c-b776-1459da83f86f@redhat.com> <484d25eb-bcc3-f64f-1182-ff50fb4aca9a@huawei.com> Content-Language: en-MW From: Peter Rajnoha Subject: Re: [PATCH v5] kobject: Fix global-out-of-bounds in kobject_action_type() In-Reply-To: <484d25eb-bcc3-f64f-1182-ff50fb4aca9a@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 5/17/23 10:54, Xia Fukun wrote: > 在 2023/5/16 22:02, Peter Rajnoha wrote: >> On 5/16/23 14:37, Xia Fukun wrote: > >>> --- >>> v4 -> v5: >>> - Fixed build errors and warnings, and retested the patch. >>> >> >> Please, also check this is still working: >> https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-uevent >> >> When I try passing the example line "add >> fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed A=1 B=abc", it doesn't recognize >> such input anymore and it incorrectly considers it as erroneous. >> > > Why did I receive the following error message when passing the example > line "add fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed A=1 B=abc" using the > original mainline code? > > synth uevent: /devices/virtual/block/ram12: incorrect uevent action arguments > block ram12: uevent: failed to send synthetic uevent: -22 > > Is there a problem with my test case, or is the original code unable > to successfully parse the sample? > That works for me, I'm testing on kernel 6.2.15: # echo "add fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed A=1 B=abc" > /sys/block/ram0/uevent # udevadm monitor --kernel --env monitor will print the received events for: KERNEL - the kernel uevent KERNEL[189.376386] add /devices/virtual/block/ram0 (block) ACTION=add DEVPATH=/devices/virtual/block/ram0 SUBSYSTEM=block SYNTH_UUID=fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed SYNTH_ARG_A=1 SYNTH_ARG_B=abc DEVNAME=/dev/ram0 DEVTYPE=disk DISKSEQ=14 SEQNUM=3781 MAJOR=1 MINOR=0 -- Peter