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: <20250109111434.GB15384@strace.io>
Date: Thu, 9 Jan 2025 13:14:34 +0200
From: "Dmitry V. Levin" <ldv@...ace.io>
To: Oleg Nesterov <oleg@...hat.com>
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 Thu, Jan 09, 2025 at 11:41:47AM +0100, Oleg Nesterov wrote:
> 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.

OK, but I suppose you mean PTRACE_SYSCALL_INFO_NONE here, though.


-- 
ldv

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ