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: <20240626115410.GA27271@redhat.com>
Date: Wed, 26 Jun 2024 13:54:32 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Dev Jain <dev.jain@....com>
Cc: shuah@...nel.org, mingo@...nel.org, tglx@...utronix.de,
	mark.rutland@....com, ryan.roberts@....com, broonie@...nel.org,
	suzuki.poulose@....com, Anshuman.Khandual@....com,
	DeepakKumar.Mishra@....com, aneesh.kumar@...nel.org,
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] selftests: Add a test mangling with uc_sigmask

On 06/26, Dev Jain wrote:
>
> +int main(int argc, char *argv[])
> +{
> +	struct sigaction act, act2;
> +	sigset_t *set, *oldset;

...

> +	set = malloc(sizeof(sigset_t *));
> +	if (!set)
> +		ksft_exit_fail_perror("malloc");
> +
> +	oldset = malloc(sizeof(sigset_t *));

Why malloc() ?

Can't you simply do

	sigset_t set, oldset;

and then use sigemptyset(&set) / etc ?

Oleg.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ