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] [day] [month] [year] [list]
Message-ID: <c9d19777-9027-0bb6-8590-1bfeac14b33f@linux.intel.com>
Date:   Thu, 24 Sep 2020 13:13:35 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
        Filipe Brandenburger <filbranden@...gle.com>,
        Greg Thelen <gthelen@...gle.com>,
        Michael Davidson <md@...gle.com>,
        Eugene Surovegin <surovegin@...gle.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Michal Marek <michal.lkml@...kovi.net>,
        Jonathan Corbet <corbet@....net>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>
Subject: Re: [PATCH] modpost: allow modpost to fail on warnings



>>> I think [1] should be an error instead of a warning
>>> by default.
>>
>> would the following patch be what you have in mind?
> 
> 
> No.
> error() does not exist.
> 
> merror() exists, but the difference from warn()
> is just a prefix.
> 
> If any error happens, modpost should return the error code.

Sorry, I am not able to understand your recommendation. Existing code 
which calls merror() does not exit with an error code, e.g.

static void sym_update_namespace(const char *symname, const char *namespace)
{
	struct symbol *s = find_symbol(symname);

	/*
	 * That symbol should have been created earlier and thus this is
	 * actually an assertion.
	 */
	if (!s) {
		merror("Could not update namespace(%s) for symbol %s\n",
		       namespace, symname);
		return;
	}

What would be suggestion be then in this case?

change all functions to return -EINVAL after each use of merror() or 
something?

Or just add an exit(1) after all uses of merror()?

>> If yes, also wondering if we can still add the option to treat warnings
>> as errors as an opt-in behavior?
> 
> 
> I want to add a new option only when it is necessary to do so.
> 
> I am not sure which warnings are real warnings.

That was the point of the suggested option, treat all warnings as errors 
and ignore the warning if it's no big deal. it's standard with gcc 
-Werror, it's be good to extend this to modpost - or what would be the 
drawback of doing so?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ