Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp660132rwd; Wed, 14 Jun 2023 23:40:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6rz03dYMaVnyEZhM0AHSrkLVoBj1NvJ5d1QBCiqHoh5g22NsM7YwJiTM0C+lN232WvbvI0 X-Received: by 2002:a17:907:948e:b0:982:8a28:ba24 with SMTP id dm14-20020a170907948e00b009828a28ba24mr2595777ejc.63.1686811202956; Wed, 14 Jun 2023 23:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686811202; cv=none; d=google.com; s=arc-20160816; b=rjHsPkenypj67/oZFZ6eUdb0XiAO4hQNI6PnoCSktkux5+LwnUedJdscNVJneHIGMG vtKIvV9v/Ae63rnmHd3xi7Q12tilMN1zCrd56l8ZaDBsPGZbCtewWDywikuqaG6zhX9j SpmkE1Za4wFSfpLmviTfKErbdUhLxbHhyLV6IzMGSh8Xj3HSCaAgrGt0aqls8lm08ZIw j4o0m9nZ8QhxNxNicOmsz0mcSlxEI7Dk7Q/ssp3T0Mb57nu/te/jj4653NWvHshwaB3R UiaDkQwMt5ybBEY2KXdvwHwWL9ZA0zmBv3LAKOI3wChdL6IrcsICoggBlxAEWaeHbPvn 6v8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bYSW/lfdpaJBD9xSfrxfMBhVdXWq2ypIuq51CvXOI6E=; b=yaYPjhCPq3dm+XEotM/VBoWNZ7eR46dGzVB5GmJdCfcTyjPj3rjbE6KKhWMzDhfx2g zHCZfnycdtN2aig4FEIBUdIxmPm+Oea4zBaRV2oXrz7JpKiWVyEdLDEVxsEgLPZevqeP vTIKYqCmAKrKHAtU9ZGPj2FZg9aeF81/fyCsjrlL1nC1udutY8xvZeI4qOGjU32uKFGq PR+7bQfgMztytwcXzzwGpvOQMi7eZOpjNA+SXXPyGFT1208mZDG2EBcL4K81CdyjeKBn IxqyEZfAC4BaIuRPorEuu4LcC73zvRHwEB60hlwB11fCAi9dl/U0tt7Mt6cZ8kdTtqQX nUZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="zbHk/kAT"; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g18-20020a170906349200b009828321c40fsi1413133ejb.415.2023.06.14.23.39.37; Wed, 14 Jun 2023 23:40:02 -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=@linuxfoundation.org header.s=korg header.b="zbHk/kAT"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238287AbjFOGFO (ORCPT + 99 others); Thu, 15 Jun 2023 02:05:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243635AbjFOGEl (ORCPT ); Thu, 15 Jun 2023 02:04:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A2582702 for ; Wed, 14 Jun 2023 23:04:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B018063094 for ; Thu, 15 Jun 2023 06:04:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC04AC433C8; Thu, 15 Jun 2023 06:04:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1686809061; bh=r2n6JouoTAE9HvQILwKK9NyKgBEJyXm/vErfVJyYT+4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zbHk/kATkoGvjSqhDogIkIc4zEYl9h9/OoS2QAmW6o2TNy7F5mET1Wnc2Njj/Qopm kQmCqdFon55M2i/GrnZIp8/FzCzRv7PixXvgdTfWDi0P0TcggG4bQ+9FpzH6PgtLzB LZhVf2eA5PoZSQBAEfRsfsehGItnijFg9WUK1sTw= Date: Thu, 15 Jun 2023 08:04:18 +0200 From: Greg KH To: Xia Fukun Cc: prajnoha@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7] kobject: Fix global-out-of-bounds in kobject_action_type() Message-ID: <2023061554-defective-islamist-fab5@gregkh> References: <20230518091614.137522-1-xiafukun@huawei.com> <86c6040d-17ab-fb01-2b75-717d82ba9345@huawei.com> <2023061444-latticed-discuss-fa70@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 Thu, Jun 15, 2023 at 09:43:34AM +0800, Xia Fukun wrote: > > On 2023/6/15 4:09, Greg KH wrote: > > > > > How did you test it? How have you verified that the previous failures > > were caught this time? > > > > My testing method is to apply the patch, compile the kernel image, > and start the QEMU virtual machine. Then compile and execute the code > mentioned in the patch that triggers out-of-bounds issues. > > In addition, the following operations will be performed to verify the > functions mentioned by Peter Rajnoha : > > # 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 So you have not run this on any real systems? Please try doing that (boot your laptop, your server, your server farm, etc.) with it and do a lot of testing that way. To only use qemu means it has not really been tested at all, which now explains why you didn't find the previous problems with this patch series as this is a kernel path that is HIGHLY dependent on the hardware involved (i.e. it wants real hardware, not emulated ones.) thanks, greg k-h