ewx: (penguin)

https://en.wikipedia.org/wiki/Red/black_concept describes a notation sometimes used when discussing confidentiality:

  • red denotes signals carrying secret plaintext;
  • black denotes signals carrying ciphertext.

Is there any generally agreed coloring for the analogous integrity question? i.e.:

  • a color which denotes signals where integrity matters (or maybe this is "all of them" and we don't need a specific choice of color); and
  • a color which indicates a signal with cryptographic integrity protection of some kind.

Non-color visual notations also welcome for several reasons:

  1. things still get printed in monochrome;
  2. color vision is not uniform among humans;
  3. using too many color notations at once leads to angry fruit salad rather than clear diagrams.

ewx: (geek)

From time to time I and colleagues find ourselves extending some function in C in a way that requires extra arguments. Often this happens in a context where it's impractical to change all the callers (for instance, because some of them are in customer code) so the extended version of the function gets a new name and the original name just calls that with some default value of the new arguments.

For instance I might go from this:

int refine_glorp(glorp *g) {
  /* refinement */

…to this:

int refine_glorp(glorp *g) {
  return refine_glorp_ex(g, 0);

int refine_glorp_ex(glorp *g, int arg) {
  /* extended refinement, based on arg */

Is there a well-known name for this transformation?

A colleague who did this a week or so ago started out with 'decapitation' but changed his mind to 'recapitation' on the grounds that he was really adding a second head to the function rather than removing one. But neither of us knew if there was already a name for this.

ewx: (penguin)
I found http://www.bbcactivelanguages.com/OurProducts/Italian/ProductViewer.aspx?ISBN=9781406679236 pretty good for learning tourist Italian a few years ago. But we're going to Scandinavia next and there isn't a direct equivalent in the same range. Does anyone have any recommendations for learning a little tourist-level Danish and/or Swedish?
ewx: (marvin)

If a user of an ISP tries to visit a website controlled by an identifiable legal person, which does not contain any pornography, but the ISP instead serves them a block page informing them that the website does contain pornography, has the person controlling the website been libeled by the ISP? (All three parties located in the UK.)

(If you think Cameron's latest wheeze won't lead to overblocking then you haven't been paying attention to the existing implementations.)

ewx: (penguin)
Can we have a referendum on deficit-cutting, too?
ewx: (no idea)

What on earth is the point of the Thomson Local directory? I don't think I've used it once in my life (even before discovering the Internet) but it's been coming through the door for as long as I can remember (which in this case means at least back to the 1980s).

Have you ever used it?


Feb. 29th, 2012 09:07 am
ewx: (Default)
The last time they did this they lent nearly half a trillion Euros. Anyone care to guess how much it’ll come to this time?
ewx: (no idea)
Apropos of this comment thread, since PTC and I don’t seem to have been able to come up with a good answer: If the Melian dialog is the middle of a trilogy, and Ozymandias the conclusion … what’s the first part?
ewx: (geek)
#if __GNUC__ && __i386__
/* This is not entirely satisfactory: the xchgl would be unnecessary, if only
 * we had some way of communicating the detailed input and output assignments
 * of the registers to the compiler. */
#define BSWAP64(N)                                      \
({uint64_t __n = (N); __asm__("xchgl %%eax,%%edx\n"     \
                              "\tbswap %%eax\n"         \
                              "\tbswap %%edx"           \
                              : "+A"(__n));             \

The trouble is, the result ends up looking something like this:

        movl    0x04(%eax),%edx
        movl    (%eax),%eax
        xchgl   %edx,%eax
        bswap   %eax
        bswap   %edx
        movl    0x0c(%ebp),%esi
        movl    %eax,(%esi)
        movl    %edx,0x04(%esi)

…when obviously it would be better to:

        movl    0x04(%eax),%edx
        movl    (%eax),%eax
        bswap   %eax
        bswap   %edx
        movl    0x0c(%ebp),%esi
        movl    %edx,(%esi)
        movl    %eax,0x04(%esi)

However as far as I can see A is the only available constraint letter for 64-bit values on x86.

ewx: (no idea)

Found at the bottom of cup of tea, it’s smooth to the touch and fairly bendy. We are mystified.

+3 )
ewx: (red robot (waving arms))

…and pointed it at no2av.org?

$ whois yes2av.org
NOTICE: Access to .ORG WHOIS information is provided to assist persons in
determining the contents of a domain name registration record in the Public Interest Registry
registry database. The data in this record is provided by Public Interest Registry
for informational purposes only, and Public Interest Registry does not guarantee its
accuracy.  This service is intended only for query-based access.  You agree
that you will use this data only for lawful purposes and that, under no
circumstances will you use this data to: (a) allow, enable, or otherwise
support the transmission by e-mail, telephone, or facsimile of mass
unsolicited, commercial advertising or solicitations to entities other than
the data recipient's own existing customers; or (b) enable high volume,
automated, electronic processes that send queries or data to the systems of
Registry Operator or any ICANN-Accredited Registrar, except as reasonably
necessary to register domain names or modify existing registrations.  All
rights reserved. Public Interest Registry reserves the right to modify these terms at any
time. By submitting this query, you agree to abide by this policy.

Domain ID:D159836964-LROR
Domain Name:YES2AV.ORG
Created On:06-Aug-2010 15:59:56 UTC
Last Updated On:06-Oct-2010 03:47:48 UTC
Expiration Date:06-Aug-2011 15:59:56 UTC
Sponsoring Registrar:Tucows Inc. (R11-LROR)
Registrant ID:tuzeQni18zPa7NOG
Registrant Name:Matthew Elliott
Registrant Organization:Matthew Elliott
Registrant Street1:55 Tufton Street
Registrant Street2:
Registrant Street3:
Registrant City:London
Registrant State/Province:London
Registrant Postal Code:SW1P3QL
Registrant Country:GB
Registrant Phone:+44.8453309554
Registrant Phone Ext.:
Registrant FAX:
Registrant FAX Ext.:
Registrant Email:admin@no2av.org
Admin ID:tuqKzN2M58tyaurf
Admin Name:Matthew Elliott
Admin Organization:Matthew Elliott
Admin Street1:55 Tufton Street
Admin Street2:
Admin Street3:
Admin City:London
Admin State/Province:London
Admin Postal Code:SW1P3QL
Admin Country:GB
Admin Phone:+44.8453309554
Admin Phone Ext.:
Admin FAX:
Admin FAX Ext.:
Admin Email:admin@no2av.org
Tech ID:tuHItVDJqZ4gIyQ7
Tech Name:Matthew Elliott
Tech Organization:Matthew Elliott
Tech Street1:55 Tufton Street
Tech Street2:
Tech Street3:
Tech City:London
Tech State/Province:London
Tech Postal Code:SW1P3QL
Tech Country:GB
Tech Phone:+44.8453309554
Tech Phone Ext.:
Tech FAX:
Tech FAX Ext.:
Tech Email:admin@no2av.org
Name Server:NS.123-REG.CO.UK
Name Server:NS2.123-REG.CO.UK
Name Server:
Name Server:
Name Server:
Name Server:
Name Server:
Name Server:
Name Server:
Name Server:
Name Server:
Name Server:
Name Server:

$ telnet yes2av.org 80
Connected to yes2av.org.
Escape character is '^]'.
GET / HTTP/1.0
Host: yes2av.org

HTTP/1.1 302 Found
Connection: close
Date: Tue, 19 Apr 2011 21:12:06 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Location: http://www.no2av.org
Cache-Control: private
Content-Length: 0

Connection closed by foreign host.
ewx: (geek)

I recently found myself binary-editing a shared library to NOP out some code in order to test a theory about the cause of a crash. In this case I had the source available but this was a quicker approach than rebuilding; in other cases I might not have the source.

What I actually did was read a disassembly, figure out what addresses I needed to change, and then use tweak to edit it.

The ideal tool for the job, though, would have been one that displayed the disassembly and let me drag out a region and replace with it a new sequence of instructions, with an error if they were too long and NOP-filling if they were short, and with warnings if I was disrupting a branch target. You can probably imagine other nice features.

Anyway, does anyone know if such a tool exists?

I think I’ve spent more time reading and writing assembler in the last year than the entire preceding decade. Funny how things turn out.

Tube (2)

Dec. 24th, 2009 06:22 pm
ewx: (xmas)
I fairly often have cause to go form King’s Cross to Waterloo (and subsequently back again). Usually I take either the Victoria or Piccadilly line and change onto the Northern Line at Warren St or Leicester Square; is one of these likely to be reasonably reliably quicker than the other? Or is there some quicker route still I could take?
ewx: (geek)

I noticed, on my 64-bit Linux system, that gnome-panel was apparently using an awful lot of virtual memory.

 3734 rjk       20   0  290m  16m 6668 S    0  0.8   3:22.05 gnome-panel

Virtual memory’s pretty cheap, so that’s not hugely problematic, but it seemed a huge amount for a glorified toolbar. I looked in /proc/3734/maps and found that about 260MB of that space belonged to shared libraries. Now, gnome-panel does use a lot of library, 82 to be precise, but 3MB per library sounded a lot, and the biggest of them is only 4MB. Looking closer I noticed that an awful lot of the libraries had 2MB (0x200000) non-executable mappings associated with them. As an example here are the mappings for GTK+ (with the size in hex added at the start for convenience):

3c7000 7f967efd6000-7f967f39d000 r-xp 00000000 fe:00 3111259  /usr/lib/libgtk-x11-2.0.so.0.1200.12
200000 7f967f39d000-7f967f59d000 ---p 003c7000 fe:00 3111259  /usr/lib/libgtk-x11-2.0.so.0.1200.12
  a000 7f967f59d000-7f967f5a7000 rw-p 003c7000 fe:00 3111259  /usr/lib/libgtk-x11-2.0.so.0.1200.12

The first line is the code segment and the last the data segment. But what’s the strange 0x200000 (2MB) mapping in the middle?

The answer took me a while to figure out.

ewx: (no idea)

I'm actually more interested in how I keep them out.

August 2017

13 141516171819


RSS Atom

Most Popular Tags

Expand Cut Tags

No cut tags