public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] cve-2015-3290: Handle 16-bit segments being disabled
Date: Tue, 13 Mar 2018 11:55:41 +0100	[thread overview]
Message-ID: <20180313105541.GB14611@rei> (raw)
In-Reply-To: <20180313102931.27897-1-rpalethorpe@suse.com>

Hi!
> +	TEST(tst_syscall(__NR_modify_ldt, 1, &data_desc, sizeof(data_desc)));
> +	TEST_ERRNO = -(int)TEST_RETURN;

We do have TRERRNO if we changed the test library to ignore the sign bit
we may was well get rid of this ugly hack and use TRERRNO in the
tst_brk() below.

> +	if (TEST_RETURN == -EINVAL) {
> +		tst_brk(TCONF | TTERRNO,
> +			"modify_ldt: 16-bit data segments are probably disabled");
> +	} else if (TEST_RETURN != 0) {
> +		tst_brk(TBROK | TTERRNO, "modify_ldt");
> +	}
>  }


-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2018-03-13 10:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13 10:29 [LTP] [PATCH] cve-2015-3290: Handle 16-bit segments being disabled Richard Palethorpe
2018-03-13 10:55 ` Cyril Hrubis [this message]
2018-03-13 15:24   ` [LTP] [PATCH v2 1/2] lib: Add TRERRNO to tst_res and remove sign when present Richard Palethorpe
2018-03-13 15:24   ` [LTP] [PATCH v2 2/2] cve-2015-3290: Handle 16-bit segments being disabled Richard Palethorpe
2018-03-15 15:58     ` Cyril Hrubis

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=20180313105541.GB14611@rei \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox