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: <20250109104147.GB26424@redhat.com>
Date: Thu, 9 Jan 2025 11:41:47 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: "Dmitry V. Levin" <ldv@...ace.io>
Cc: Eugene Syromyatnikov <evgsyr@...il.com>,
	Mike Frysinger <vapier@...too.org>,
	Renzo Davoli <renzo@...unibo.it>,
	Davide Berardi <berardi.dav@...il.com>,
	strace-devel@...ts.strace.io, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] ptrace_get_syscall_info: factor out
 ptrace_get_syscall_info_op

On 01/08, Dmitry V. Levin wrote:
>
> +ptrace_get_syscall_info_op(struct task_struct *child)
>  {
...
>  	case SIGTRAP | 0x80:
>  		switch (child->ptrace_message) {
>  		case PTRACE_EVENTMSG_SYSCALL_ENTRY:
> -			actual_size = ptrace_get_syscall_info_entry(child, regs,
> -								    &info);
> -			break;
> +			return PTRACE_SYSCALL_INFO_ENTRY;
>  		case PTRACE_EVENTMSG_SYSCALL_EXIT:
> -			actual_size = ptrace_get_syscall_info_exit(child, regs,
> -								   &info);
> -			break;
> +			return PTRACE_SYSCALL_INFO_EXIT;
>  		}
>  		break;
>  	case SIGTRAP | (PTRACE_EVENT_SECCOMP << 8):
> -		actual_size = ptrace_get_syscall_info_seccomp(child, regs,
> -							      &info);
> +		return PTRACE_SYSCALL_INFO_SECCOMP;
> +	}
> +
> +	return PTRACE_SYSCALL_INFO_NONE;

Cosmetic, I won't insist, but I'd suggest to do

	default:
		return PTRACE_SYSCALL_INFO_SECCOMP;
	}

to make it more symmetric.

Oleg.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ