[DTrace-devel] [PATCH 7/7] modules: support .gz and .xz-compressed modules

Kris Van Hees kris.van.hees at oracle.com
Fri Oct 8 12:03:37 PDT 2021


Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>

... and I put it in my local dev branch so I will push it at the end of the
day.

On Tue, Oct 05, 2021 at 02:38:51PM +0100, Nick Alcock wrote:
> The module path ends in .ko.*:, where * depends on the compression
> algorithm: so systems with compressed modules would skip all modules on
> the incorrect grounds that none existed.
> 
> Add a few compression algorithms to make this subsystem work again.
> (It is mostly invisible for in-tree modules.)
> 
> Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
> ---
>  libdtrace/dt_kernel_module.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/libdtrace/dt_kernel_module.c b/libdtrace/dt_kernel_module.c
> index 0121cfb1c0a0..88b8011697b4 100644
> --- a/libdtrace/dt_kernel_module.c
> +++ b/libdtrace/dt_kernel_module.c
> @@ -162,8 +162,15 @@ dt_kern_path_update(dtrace_hdl_t *dtp)
>  		char *p;
>  
>  		suffix = strstr(line, ".ko:");
> +		if (suffix == NULL)
> +			suffix = strstr(line, ".ko.gz:");
> +
> +		if (suffix == NULL)
> +			suffix = strstr(line, ".ko.xz:");
> +
>  		if (suffix == NULL)
>  			continue;
> +
>  		suffix[3] = '\0';		/* chop the dep components */
>  
>  		modname = strrchr(line, '/');
> -- 
> 2.33.0.256.gb827f06fa9
> 
> 
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel



More information about the DTrace-devel mailing list