mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Pavel N. Iakovenko" <yak@ispras.ru>
To: <linux-kernel@vger.kernel.org>
Subject: setgroups32 syscall changes RCX register
Date: Wed, 9 Jun 2010 14:57:03 +0400	[thread overview]
Message-ID: <20100609105115.6EB2D5D40B9@smtp.ispras.ru> (raw)

Hello

I noticed that setgroups32 syscall changes the value of RCX register. In my
case  - it is increased by PAGE_SIZE. Is it an acceptable behavior?
Kernel version is 2.6.31.6. Testing program is enclosed.

Please CC me on reply.

Best regards,
Pavel Iakovenko

#include <unistd.h>
#include <sys/types.h>
#include <syscall.h>
#include <grp.h>
#include <stdio.h>
#include <errno.h>

int main()
{
            gid_t groups;
            unsigned long rcx;
            int r ;

            r = initgroups("root", groups);
            if (r) {
                printf("initgroups failed\n");
                goto out;
            }
            
            printf("before setgroups32: RCX = 0x%lx\n", (unsigned
long)&groups);

            asm
            (
                        "int $0x80"
                        : "=a" (r), "=c" (rcx)
                        : "a" (SYS_setgroups32), "b"(1), "c" (&groups)
            );

            if (r) {
                printf("setgroups32 failed\n");
                goto out;
            }
            
            printf("after setgroups32: RCX = 0x%lx\n", rcx);

out:
            return 0;
}
 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5184 (20100609) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml
 
ЪТХ╨{.nг+┴╥÷╝┴╜├+%┼кЪ╠Ищ╤\x17╔┼wЪ╨{.nг+┴╥╔┼{╠ЧG╚²ИЪ┼{ay╨\x1dй┤з≥К,j\a╜╒fё╒╥h ▐О│ЙЪ▒ЙГz_Х╝\x03(╜И ▌┼щ╒j"²З\x1a╤^[m╖ЪЪ╬\a╚ЧG╚²ИЪ╒╦?≥╗Х╜з&ёЬ╖~▐А╤iO∙Ф╛z╥ vь^\x14\x04\x1a╤^[m╖ЪЪц\fЪ╤ЛЪ╒╦?√I╔

                 reply	other threads:[~2010-06-09 10:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20100609105115.6EB2D5D40B9@smtp.ispras.ru \
    --to=yak@ispras.ru \
    --cc=linux-kernel@vger.kernel.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
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

all inboxes | Powered by JetHome®