mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: torvalds@transmeta.com
Cc: alan@redhat.com, linux-kernel@vger.rutgers.edu
Subject: [PATCH] Avoid kernel memory leaks in signal handling
Date: Mon, 3 Apr 2000 18:46:34 +0200	[thread overview]
Message-ID: <20000403184634.F1468@sunsite.ms.mff.cuni.cz> (raw)

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]

Hi!

Attached is an updated version of the patch to avoid leaking kernel memory
into userspace with signals. This time it should support all architectures
currently in the 2.3 tree. At the same time it optimizes signal handling a
little bit and fixes siginfo_t conversion for sparc64(sparc), ia64(i386) and
in the future would help mips64 and ppc64 as well.
To copy siginfo_t in the kernel one uses

copy_siginfo(siginfo_t *to, siginfo_t *from)

instead of memcpy resp. direct assignment (this one can be implemented as
memcpy by the architecture but can be optimized),
to copy siginfo_t to userland kernel calls

copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)

The latter has to make sure kernel does not leak any non-initialized
siginfo_t memory (ie. has to copy only the si_code, si_signo, si_errno and
the relevant union member entries).

	Jakub

[-- Attachment #2: siginfo-noleak.patch.gz --]
[-- Type: application/octet-stream, Size: 12176 bytes --]

                 reply	other threads:[~2000-04-03 16:48 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=20000403184634.F1468@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=torvalds@transmeta.com \
    /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®