From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 6609A2FB0B4 for ; Mon, 19 Jan 2026 07:34:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768808096; cv=none; b=cbqotOM0AYPmw6GFT0Mqz0JG3EMQnDZ0fnkiyJPeabNrw32jxfHlV6iWDM55JoxzcnBG40PCGyTpu6efzY47225Et13NBEndeARamDxTiDj3Ad1vvJnGSXwkld9aAWmdKzyhxva65Xh4dJtJn42+krxqmCbztZrHUZII2gW1ikA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768808096; c=relaxed/simple; bh=g+fzGXS7r42oE29T5ymVMaK1EF7cLVGhaC8kJ3HUce4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ps3HvibM15E5Xp0lAjlJ/jhfu/HNEi+Ty5lTwdevHCbd9N1hwF8m0A8yNfjSdIlXHw9L00tgSu+7wZdzYtGtBW1a6HSS3SIhqpKNxGBIdL80Z2h8rj8DW8orwYszR0ZkboL/5vv2ER6QuO4S1R3uyEI9nWMeDoMTW9Flc4XNItQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=kYdvFQ7H; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kYdvFQ7H" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1768808096; x=1800344096; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=g+fzGXS7r42oE29T5ymVMaK1EF7cLVGhaC8kJ3HUce4=; b=kYdvFQ7Hg77e6ugyqyeNLOmCE/hwslJkyBKlU2WD8fTofkyUTrcrcK+U 7l97sfd/cyQ1CTrP8pyImSFI8EbN2NwNTGMkAgNGFYNvCBma8DTmQqZDv WP04yT4YDPaaRJC1e8N6lxQnZOQdiqjYsfoHARCp2t75uwhEpSmQgGYZ8 WEb1IQ/+96zuSrvOjqHmTDAqKktJWiOKWaeKjue5icZ99jE3xyQ2MsOvw Yn16p5ekLCyUlYU0JHW37ZZ2uQsV8fzmXZy6x2wbpN14Wd8TpHW76/9xr oR1JI+Ja89MGg5ihUS/ZwpfEVfYqNdaNSD6ImYlxyR5kHAbR+I2M1Cj9Q w==; X-CSE-ConnectionGUID: nEmiPvj2R7C9NBZti/H0bQ== X-CSE-MsgGUID: sZkoRsAqRHyozk8fzZIwyQ== X-IronPort-AV: E=McAfee;i="6800,10657,11675"; a="72604502" X-IronPort-AV: E=Sophos;i="6.21,237,1763452800"; d="scan'208";a="72604502" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2026 23:34:55 -0800 X-CSE-ConnectionGUID: VvG2TtjxR++3lpYoON4SSw== X-CSE-MsgGUID: cX2UX9XJQ3OfumGqPE+GAg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,237,1763452800"; d="scan'208";a="206053415" Received: from egrumbac-mobl6.ger.corp.intel.com (HELO localhost) ([10.245.244.37]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2026 23:34:53 -0800 Date: Mon, 19 Jan 2026 09:34:51 +0200 From: Andy Shevchenko To: Petr Mladek Cc: Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Steven Rostedt , Rasmus Villemoes , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [PATCH] vsprintf: Add test for restricted kernel pointers Message-ID: References: <20260114-restricted-pointers-kunit-test-v1-1-a9d8a49c6b6f@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Fri, Jan 16, 2026 at 06:06:59PM +0100, Petr Mladek wrote: > On Wed 2026-01-14 08:27:34, Thomas Weißschuh wrote: ... > > Fill out the tests for restricted kernel pointers, using the %pK format. > > This test can only be executed when built into the kernel, as modules > > do not have access to the kptr_restrict knob. > > I think that we could export "kptr_restrict" like we did > with no_hash_pointers. AFAIK, it has been exported just because > of the test module as well. > > > Please note that changes to the kptr_restrict sysctl from the kernel > > commandline are only applied *after* the boot-time KUnit tests run. > > This is another motivation to export the symbol. Otherwise, it is > really hard to test the non-default variants. > > BTW: I have recently heard about EXPORT_SYMBOL_NS(). It would allow > to export the symbol only for some specific modules. > > I am not sure how exactly it works. I wonder if there already > exists a namespace for KUnit tests. > > It would be nice to use it, even for "no_hash_pointers"... This is a variant for really strict use: EXPORT_SYNBOL_FOR_MODULES(). -- With Best Regards, Andy Shevchenko