Gentoo Archives: gentoo-hardened

From: "Peter S. Mazinger" <ps.m@×××.net>
To: gentoo-hardened@g.o
Subject: Re: [gentoo-hardened] 2.4.22-hardened O1/Low-latency/EA/ACL/grsecurity/propolice
Date: Thu, 13 Nov 2003 16:52:26
Message-Id: Pine.LNX.4.44.0311131624040.29304-200000@lnx.bridge.net
1 > Point #1
2 --------
3
4 > For your diff of sys.c, that is definitely not good. My source tree still
5 > shows set_user() as static and it should be static.
6 The change was a proposal. Since the beginnings of the O1-sched patch
7 there was an "extern int set_user" change to sched.h. I have checked
8 at that time the -ac patches and, to get rid of the warning on sched.c
9 static int was changed there(ac) to int (the diff I have sent). I have
10 taken it as OK (we wrote 2.4.18 kernel-time). Sorry for it, now I checked
11 the whole source tree and indeed, set_user is only used in sched.c, so the
12 correct solution to the warning is to remove extern int set_user from
13 sched.h (see attached patch). I've checked the -aa patches, he does it the
14 same way.
15
16 Thanks for it.
17
18 > It will make applying both the grsec and selinux patches fail horribly, but
19 > after having gone through both 2.4.21 and 2.4.22, they both fail horribly
20 > already with where they are now in the patch chain. I don't think it will be
21 > that much more work to apply them last and that will, hopefully, let us keep
22 > nearly all the other patches in their original form. Feedback on this
23 > approach is welcome.
24 What I am doing (it is an RPM build, from 1 spec-file, different
25 settings):
26 I have built many different kernels, using debian, ac, aa, ck patches
27 (these apply first, or after some pre-kernel patch). Then I do minimal
28 corrections (whitespace, includes order change) to get the common parts
29 the same (ex. ac, aa, ck apply O1 differently). These "main" patches
30 provide some "features", like
31 debian->ipsec
32 ac->scheduler
33 aa->scheduler,tux
34 ck->scheduler,preempt,lowlat
35 These get defined and used later in the spec-file. I copy the required
36 patch (ex. grsecurity-1.9.12-2.4.22.patch to some location like
37 build_dir/patches/grsec.patch). This patch applies cleanly only to
38 pristine 2.4.22, so I patch it according to the features
39 defined by main patches (or pre-kernels) (ex. %if %sched ... %endif) to
40 get it patched after any of the earlier patches. Some changes need to be
41 done afterwards (O1 sched needs corrections to grsecurity/* files, or some
42 part, where the patch has to be applied was moved from sched.c to exit.c),
43 these are separate patches depending again on the "features" the main
44 patches defined earlier.
45 With this procedure I can track pre-kernels, also cvs updates to grsec/pax
46 (the cvs updates are applied later as interdiffs), so I do not have to
47 make changes to the original patches any more.
48
49 Peter
50
51 --
52 Peter S. Mazinger <ps.m@×××.net> ID: 0xA5F059F2 NIC: IXUYHSKQLI
53 Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
54
55 ____________________________________________________________________
56 Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
57 Probald ki most! http://www.freestart.hu

Attachments

File name MIME type
correction-ck-2.4.22-sched.patch2 text/plain