Linux-m68k Archive on lore.kernel.org
 help / color / Atom feed
From: Michael Schmitz <schmitzmic@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	Debian m68k <debian-68k@lists.debian.org>,
	Helge Deller <deller@gmx.de>
Subject: Re: Seccomp support for linux-m68k
Date: Mon, 27 Jul 2020 09:39:28 +1200
Message-ID: <96592373-33e0-e7a5-052b-5cd53b2d9fc5@gmail.com> (raw)
In-Reply-To: <877duq56hn.fsf@igel.home>

Hi Andreas,

On 27/07/20 9:08 AM, Andreas Schwab wrote:
> On Jul 27 2020, Michael Schmitz wrote:
>
>> Hi Andreas,
>>
>> On 26/07/20 11:03 PM, Andreas Schwab wrote:
>>> On Jul 26 2020, Michael Schmitz wrote:
>>>
>>>> No particular reason - I had seen testb used in the syscall entry code and
>>> Where?  That may be bugs.
>> Here:
>>
>> ENTRY(ret_from_signal)
>>          movel   %curptr@(TASK_STACK),%a1
>>          tstb    %a1@(TINFO_FLAGS+2)
>>          jge     1f
>>          jbsr    syscall_trace_leave
>> 1:      RESTORE_SWITCH_STACK
>>          addql   #4,%sp
>> ....
>>
>> and here:
>>
>> ENTRY(system_call)
>>          SAVE_ALL_SYS
>>
>>          GET_CURRENT(%d1)
>>          movel   %d1,%a1
>>
>>          | save top of frame
>>          movel   %sp,%curptr@(TASK_THREAD+THREAD_ESP0)
>>
>>          | syscall trace?
>>          tstb    %a1@(TINFO_FLAGS+2)
>>          jmi     do_trace_entry
>>          cmpl    #NR_syscalls,%d0
>>          jcc     badsys
>>
> How is that relevant?  That is testing a single bit, of course.

No, tstb tests a byte operand. btst tests a bit. And testing the second 
byte of the thread info flags is just what we need if the trace bits are 
14 and 15.

(Had to look up the m68k programmer's reference and check to be sure, 
admittedly.)

Cheers,

     Michael

>
> Andreas.
>

  reply index

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20  8:46 John Paul Adrian Glaubitz
2020-03-20 22:49 ` Finn Thain
2020-03-20 22:59   ` John Paul Adrian Glaubitz
2020-03-20 23:08     ` Finn Thain
2020-03-21 22:18     ` Michael Schmitz
2020-03-21 22:48       ` John Paul Adrian Glaubitz
2020-03-21 23:01         ` John Paul Adrian Glaubitz
2020-07-21 15:13 ` John Paul Adrian Glaubitz
2020-07-25  9:29   ` Michael Schmitz
2020-07-25 11:55     ` Andreas Schwab
2020-07-26  1:23       ` Michael Schmitz
2020-07-26 11:03         ` Andreas Schwab
2020-07-26 21:02           ` Michael Schmitz
2020-07-26 21:08             ` Andreas Schwab
2020-07-26 21:39               ` Michael Schmitz [this message]
2020-07-27  6:35                 ` Andreas Schwab
2020-07-25 18:54     ` John Paul Adrian Glaubitz
2020-07-26  1:34       ` Michael Schmitz
2020-07-26  7:13         ` Michael Schmitz
2020-07-26 11:05         ` Andreas Schwab
2020-07-26 20:46           ` Michael Schmitz
2020-07-26 21:10             ` Andreas Schwab
2020-07-26 22:40               ` Michael Schmitz
2020-07-25 22:48     ` John Paul Adrian Glaubitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96592373-33e0-e7a5-052b-5cd53b2d9fc5@gmail.com \
    --to=schmitzmic@gmail.com \
    --cc=debian-68k@lists.debian.org \
    --cc=deller@gmx.de \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-m68k Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-m68k/0 linux-m68k/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-m68k linux-m68k/ https://lore.kernel.org/linux-m68k \
		linux-m68k@vger.kernel.org linux-m68k@lists.linux-m68k.org
	public-inbox-index linux-m68k

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-m68k


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git