lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ad745b51-0aef-4a16-95a4-3514846e6504@suswa.mountain>
Date: Tue, 2 Jul 2024 15:45:55 +0200
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Ágatha Isabelle Chris Moreira Guedes <code@...tha.dev>
Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
	linux-modules@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Luis Chamberlain <mcgrof@...nel.org>,
	Ágatha Isabelle Chris Moreira Guedes <patch-reply@...tha.dev>,
	Jookia <contact@...kia.org>
Subject: Re: [PATCH] staging: Fix missing warning/taint on builtin code

On Tue, Jul 02, 2024 at 02:44:31AM -0300, Ágatha Isabelle Chris Moreira Guedes wrote:
> diff --git a/init/main.c b/init/main.c
> index 206acdde51f5..fca889f3bcc0 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -1602,3 +1602,23 @@ static noinline void __init kernel_init_freeable(void)
>  
>  	integrity_load_keys();
>  }
> +
> +#ifdef CONFIG_STAGING
> +/**
> + * staging_init_taint() - We need to taint the kernel whenever staging code
> + * is initialized (from built-in drivers) or loaded (as modules) and issue
> + * a warning the first time it happens.
> + */
> +void staging_taint(const char *code_id, bool module)
> +{
> +	char *code_type = module ? "module" : "builtin driver at";
> +
> +	pr_warn("%s %s: The kernel contains code from staging directory"

Needs a space after directory before the quote.

> +		"the quality is unknown, you have been warned.\n",
> +		code_type, code_id);
> +
> +	add_taint(TAINT_CRAP, LOCKDEP_STILL_OK);
> +}
> +EXPORT_SYMBOL(staging_taint);

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ