Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2849546lqp; Mon, 25 Mar 2024 10:58:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8nrx4CEviz67xvIq+fbRphB8tLqI/3kg+WuBh4epRrUFS364Zf2Da2sRLwiwZPlc4L1H6l1rCG6DKmL6OnJ5LcARBvBF7/Ncjyi073w== X-Google-Smtp-Source: AGHT+IEO6bdQ6od6iI9EOmepoa/zI/lYdfd0+d6nxscpY0h2lrC7yjO+Hr7W+zRywVJIb9a3jC82 X-Received: by 2002:a17:906:240f:b0:a45:ad5d:98ac with SMTP id z15-20020a170906240f00b00a45ad5d98acmr5031846eja.44.1711389491545; Mon, 25 Mar 2024 10:58:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711389491; cv=pass; d=google.com; s=arc-20160816; b=j6tWl2/7c7/wXKoPyXpjd5yTbiqpnB67ALGtDesrcU7QDNocyadD68jYjUtTeoTrH7 A1DzOXG619ufQp6em7BmileqJnbIXBAakSCY7/dhj2JZyPsxNNoAcl1wdgouzrlZwfHS KAOwPHUKpS8xNneiiEwmNEwSBZbxJ1z8bZHLkYcYoy2djq+6ybUetIQzg4U1UWTGo79w VI+NTLO7K53/WOn7/aeka+8EprDIbyiBnjLGyaRC2/qE3f7V+B44IgTIv7eIwXDuKkAO MBgibrKfgsk3SdG/Gyfln+y40ZoY8HoRtwggBTeisqSw78SNeW9wvcdjMn/HY9c8C6c0 YGaA== 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 :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=OmH/+e2Fjmgqpw97wDc7uUt4UReDSV3J7Dkv6kUBSXM=; fh=jKQrZmfq4V9ekLsO5WzLZOpRn6tL38I+79DAbvVvFPQ=; b=elCgM85ts7gPLGx//OhdBaqsiwBUvTo2h8YFvCD7/7azOot5Z4Vs1dT6NmTKpBbm8A q1IBTdCoY24PNB/BuPGgpCgFCQ2rwc42D3fd4Sp3wblDoiO6QVkbBtv0w5n1GKejgXq8 0p2Tg27bFbmUBuj3q6BYVK5qKrUHG2ucZmZATgXiH357muTSanqBNvReyHVGuHkJRsMk YxyXqVhnnQlYnILfWVUIGMWyJn66OZejQLNQNeEEdnHmCKjORl/0ySMG3qSOPS8x7zxT 8L1IBZQTGw0mDLv3CvSRvYaeA8Grhdi5UXTlWQUk/cZJ9eGOD92Mm5lX9chUutTmH0OE C6XA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=rREXc2X4; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-kernel+bounces-117529-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117529-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id kn1-20020a170906aa4100b00a47340c3f59si2614497ejb.879.2024.03.25.10.58.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 10:58:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117529-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=rREXc2X4; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-kernel+bounces-117529-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117529-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 5C7721FA0D06 for ; Mon, 25 Mar 2024 17:48:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C39AC6CDDB; Mon, 25 Mar 2024 17:00:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="rREXc2X4" Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 68DDE6BB45 for ; Mon, 25 Mar 2024 17:00:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711386039; cv=none; b=Dr0CvfG2bypTszAiyupV15D4j9xqoh+YT1waeeFPKmXQv5ABwj6w+jEd4/EvIA7p/IZD/f4F3V6l3Z/iqip6i0jS9WfJrMxrueI8fWyq6+SKCcnTxiOVcZ/aAC8p51jXYJkTdgu+TRT6A/183iHobHtAx3TPIL+8V9TWy1BiG00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711386039; c=relaxed/simple; bh=7zx8nMq8KGqHj7jDtWixIxCbZWOIEZBEwuQCfPP3n30=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=s6Yo9JvDXTdxHYTsZ64nWKNXItdOaSdy+yKdc8knxEILwarHW9BD39FHyaX3dD1PwwksI3WdzZ7IrWRk27pXC2RW4LDFyo59dgyZEPhYLycomsFWIqfaKVJiXHQ0+SBzhW7vhccnyQ3Ixyw9naDpw1XJct6ayqtsIX869w7h4Ug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=rREXc2X4; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: 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=OmH/+e2Fjmgqpw97wDc7uUt4UReDSV3J7Dkv6kUBSXM=; t=1711386037; x=1712595637; b=rREXc2X4l+vWTMd0xUXBhNSly5LuUTXec7JPC2ZX1znBfw+ w8AAm73k1iwC1h6HIcj7CNt/SnvbzyKUhNYGNMvpHY83+XnramRhvxWksnlf3cKCFbdCDPou2DGYs 9XsIyzHFK+fwy5hi08Qbncfdiv8M4v5IHhWQV13lmYv0LrXT8MoENooEoqaNFdfnzk0zLMIMoFB+0 bfdPQfVMx2a4pn5Fof84//S+l/7GCgjneuu+gL2DSDwdBwKR4vFLOvgK4eqLqU0iGaX3owa9v5cri lH0sCQRlIrXdHsb3lm1y8TMSGuf1FFaFfcWJXL59yRoljSrCYpa3pK9vF3OAEtkw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rongX-0000000Dy0B-3sYf; Mon, 25 Mar 2024 18:00:34 +0100 Message-ID: <50c40ce746f1497cbc36ad82d6d0d3ca3ac28547.camel@sipsolutions.net> Subject: Re: [PATCH v3 2/4] devcoredump: Add dev_coredumpm_timeout() From: Johannes Berg To: =?ISO-8859-1?Q?Jos=E9?= Roberto de Souza , linux-kernel@vger.kernel.org, intel-xe@lists.freedesktop.org Cc: Rodrigo Vivi , Mukesh Ojha , Jonathan Cavitt , Lucas De Marchi Date: Mon, 25 Mar 2024 18:00:32 +0100 In-Reply-To: <20240304143905.52740-2-jose.souza@intel.com> References: <20240304143905.52740-1-jose.souza@intel.com> <20240304143905.52740-2-jose.souza@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Mon, 2024-03-04 at 06:39 -0800, Jos=C3=A9 Roberto de Souza wrote: > Add function to set a custom coredump timeout. >=20 > Current 5-minute timeout may be too short for users to search and > understand what needs to be done to capture coredump to report bugs. > + */ > +static inline void dev_coredumpm(struct device *dev, struct module *owne= r, > + void *data, size_t datalen, gfp_t gfp, > + ssize_t (*read)(char *buffer, loff_t offset, size_t count, > + void *data, size_t datalen), > + void (*free)(void *data)) nit: looks like you missed a space on the 'free' line I don't think we'll actually _solve_ the discussion of whether or not this makes sense. I still think it's a bad idea to hang on to the dumps in core kernel memory since they can be big (I would've said ath12k is big with 55MB, but Rodrigo said graphics could be up to 2GB!), without being able to page it out, etc. That's just a waste of memory, for what I don't think is even a good reason. So dunno. However, I also don't like to exercise any power that I might randomly hold just because I happened to write the code in the first place... And if you want to shoot yourselves in the foot with any of this, should I really disagree? I feel I've voiced my objections enough, and Lucas has also tried to find ways of making a userspace implementation work for you. I'd perhaps argue that the documentation for the functions should be more opinionated and actually recommend against using a large timeout (like you want) for all these reasons, but other than that, the code looks fine to me. johannes