On Fri, Jan 28, 2005, Dag-Erling Smrgrav wrote:
> [EMAIL PROTECTED] (Dag-Erling Smørgrav) writes:
> > David Schultz <[EMAIL PROTECTED]> writes:
> > > When the line is there, the compiler is probably smart enough to
> > > realize that 'x=y; y=x' is (usually) a no-op, so it optimizes away
> > > both
[EMAIL PROTECTED] (Dag-Erling Smørgrav) writes:
> David Schultz <[EMAIL PROTECTED]> writes:
> > When the line is there, the compiler is probably smart enough to
> > realize that 'x=y; y=x' is (usually) a no-op, so it optimizes away
> > both statements.
> Wrong. The compiler is free to optimize awa
David Schultz <[EMAIL PROTECTED]> writes:
> On Thu, Jan 27, 2005, Jacques Fourie wrote:
> > unsigned char *p = NULL;
> > unsigned char v = 0x55;
> > /* ... */
> > p = (unsigned char *)ip_output;
> > /* ... */
> > v = p[0];
> > p[0] = v;
> > /* ... */
> When the line is there, the compiler is probab
Thanks for the reply - I really appreciate it. I have tried to change
the protection on the page in a way similar to mprotect() but no luck.
I have had a look at what ddb does when modifying kernel code and
after applying the same ideas to my code everything works without a
problem.
The funny thin
On Thu, Jan 27, 2005 at 06:48:56PM +0200, Jacques Fourie wrote:
> Hi,
>
> Yes, I am trying to patch a piece of code in the kernel. The strange
> thing is that this code works without a problem on FreeBSD 4.8 - has
> the VM system changed to such an extent between 4.8 and 4.9 that the
> pages in th
On Thu, Jan 27, 2005, Jacques Fourie wrote:
> Hi,
>
> Yes, I am trying to patch a piece of code in the kernel. The strange
> thing is that this code works without a problem on FreeBSD 4.8 - has
> the VM system changed to such an extent between 4.8 and 4.9 that the
> pages in the kernel code segmen
Hi,
Yes, I am trying to patch a piece of code in the kernel. The strange
thing is that this code works without a problem on FreeBSD 4.8 - has
the VM system changed to such an extent between 4.8 and 4.9 that the
pages in the kernel code segment are not writeable anymore?
Thanks for the bit about t
On Thu, Jan 27, 2005, Jacques Fourie wrote:
> Hi,
>
> I have a kernel module with the following entry point :
>
> static int test_modevent(module_t mod, int type, void *unused)
> {
> int s;
> unsigned char *p = NULL;
> unsigned char v = 0x55;
>
> switch (type)
> {
> case MOD_LOAD
On Thu, 27 Jan 2005, Jacques Fourie wrote:
> Hi,
>
> I have a kernel module with the following entry point :
>
> static int test_modevent(module_t mod, int type, void *unused)
> {
>int s;
>unsigned char *p = NULL;
>unsigned char v = 0x55;
>
>switch (type)
> {
> case MOD
Hi,
I have a kernel module with the following entry point :
static int test_modevent(module_t mod, int type, void *unused)
{
int s;
unsigned char *p = NULL;
unsigned char v = 0x55;
switch (type)
{
case MOD_LOAD:
p = (unsigned char *)ip_output;
s = splhigh();
v = p[
10 matches
Mail list logo