Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1465995pxb; Tue, 8 Feb 2022 19:01:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwL/90ePAAOi0bAm60+ZRwBL8Ke1kSWjjvF2stJUoNsgTpNGIS/SDfYEbtOflWR2tdw9S4W X-Received: by 2002:a05:6a00:1989:: with SMTP id d9mr287882pfl.14.1644375674352; Tue, 08 Feb 2022 19:01:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644375674; cv=none; d=google.com; s=arc-20160816; b=zoPwQLrU/nAlRPL8p41Tgxjt9T4muthAsYumLLqxHGVFWnpL2BBkwL3RLbPGV1Jl8x N9LQ8f1/aPNx6wcvQBGtNZIdThspFRXW6eEG3dcTj7mo2bC017kP6N8IiqjPJel1yG3J KS3MNuHEGWR8TkgEVHMQwvV/Zrf2WaDZI1ojqbXnhEpD4nzt9rBiM/GIVRAEmtaTXO6j CCR7Cd6z/THxBB1R038JmhZ6sNPMLAwkMgsIocUad39bn/CC3gS5bcFVs4rmYFSlPYul iFyEMMJY4xUQITngUGu78d8pcfp8CE3OSa29TQTU+k4G+BYnoliBkH/hEYhII2kFH/ep pXAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=A+S/j9icHeYwdxH49eBPZ83QO48LwLkJGGxnQOH8gC8=; b=GgiaIV4lw23a9A0Rx3YFimrxng2kHOcluYwDSZdrdNL66sLEJrpqtqw2pJWwHtGZjP 3u43RKTCKthJa5rAUXN+LILe3L5cQ9uU+SrdR8nFKlS3e7pFCkMjrPzIluoxmVyngFn+ YbesaVhOxlT3kKWJG72kfSEgA2FA4O3bQubbJYZc0SAxvd3G0p04DSUQu2Ir5uMME5BD hvAxFl34y/DYVyP1F719UZ1btMHCC+h3H3UqmCz6Wyjyw6FQfDXh9bCwBrc3LevNxM5E hrXtqzyqZcAYTWXW3Ogylxby7kApHTHlcUQ7dwcD7q+AU8kGwBJWpERw7rkeNVj/x/co ex2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="Apd2a+F/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id on14si4090859pjb.184.2022.02.08.19.00.48; Tue, 08 Feb 2022 19:01:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="Apd2a+F/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386645AbiBHW2V (ORCPT + 99 others); Tue, 8 Feb 2022 17:28:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387107AbiBHVym (ORCPT ); Tue, 8 Feb 2022 16:54:42 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FFD4C0612B8; Tue, 8 Feb 2022 13:54:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=A+S/j9icHeYwdxH49eBPZ83QO48LwLkJGGxnQOH8gC8=; t=1644357281; x=1645566881; b=Apd2a+F/6QJqcIihlzohIK5QcDkmZkPZ+wv3zJX4Yxl4Jds 3CDHrfcd4/ohluFaNVk+32QaaPGoaLmzjnZRLrqak0Iw1X/n9720Yxkc+Bk7McW6s7IMXxQZUV095 xYP8AcUpPyne4JtThVvUN7pR7D0iGTjKlNiW1ZKpcVZlf4KGeCiY4HkbSpVKdMxT/4+SBqmcoajnn tGtjlOiP8bAdNJlnR7O/5js6MeQHO818fFnPBNTviNgyOkfXAfbOfaB1MTmKcR6w7Nz7jMhgmtCC8 hdWs01UiYNCVviiyDIUzinyjH3y7ENLg5D3VJKxsLzUn3W48UfTfXfyHLrelWfjg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nHYRX-00GDjC-9O; Tue, 08 Feb 2022 22:54:35 +0100 Message-ID: Subject: Re: [PATCH] devcoredump: increase the device delete timeout to 10 mins From: Johannes Berg To: Abhinav Kumar , linux-kernel@vger.kernel.org Cc: rafael@kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, swboyd@chromium.org, khsieh@codeaurora.org, nganji@codeaurora.org, seanpaul@chromium.org, gregkh@linuxfoundation.org, dmitry.baryshkov@linaro.org, aravindh@codeaurora.org, freedreno@lists.freedesktop.org Date: Tue, 08 Feb 2022 22:54:34 +0100 In-Reply-To: References: <1644349472-31077-1-git-send-email-quic_abhinavk@quicinc.com> <8d67484c7e4b9fb4560d2eca1f71c75fde8bae0d.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.3 (3.42.3-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 Tue, 2022-02-08 at 13:40 -0800, Abhinav Kumar wrote: > > > I am checking what usermode sees and will get back ( I didnt see an > error do most likely it was EOF ). I didnt follow the second part. I think probably it got -ENODEV, looking at kernfs_file_read_iter(). > If the file descriptor read returns EOF, even if we consider them > separate how will it resolve this issue? > > My earlier questions were related to fixing it in devcoredump to detect > and fix it there. Are you suggesting to fix in usermode instead? How? > Yeah, no, you cannot fix it in userspace. But I just followed the rabbit hole down kernfs and all, and it looks like indeed the read would be cut short with -ENODEV, sorry. It doesn't look like there's good API for this, but it seems at least from the underlying kernfs POV it should be possible to get_device() in open and put_device() in release, so that the device sticks around while somebody has the file open? It's entirely virtual, so this should be OK? johannes