lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0705040410390.20834@localhost.localdomain>
Date:	Fri, 4 May 2007 04:14:26 -0400 (EDT)
From:	"Robert P. J. Day" <rpjday@...dspring.com>
To:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Rewrite the MAJOR() macro as a call to imajor().

On Fri, 4 May 2007, Jan Engelhardt wrote:

>
> On May 3 2007 23:18, Andrew Morton wrote:
> >>  	struct inode *i = file->f_mapping->host;
> >>
> >> -	return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
> >> +	return i && S_ISBLK(i->i_mode) && imajor(i) == LOOP_MAJOR;
> >>  }
> >
> >there's no runtime change, and I count a couple hundred MAJORs in the tree.
>
> Why do we even have imajor() if all it does is calling the MAJOR()
> macro?

  i'm guessing it's to hide the underlying implementation of
extracting the major/minor numbers from an inode, in case that
implementation ever changes, which strikes me as perfectly reasonable.
and i don't think you'd have any luck arguing that it should be
removed at this point:

$ grep -Erw "(imajor|iminor)" * | wc -l
350

  all i was doing was standardizing the small handful of holdouts.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ