All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit master 1/1] ruby: don't build documentation when building for host either
From: Peter Korsgaard @ 2011-02-01 19:14 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=b823c04d080016b28c955240ec634764718041bd
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

We don't use it, so it only slows down the build.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/ruby/ruby.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/package/ruby/ruby.mk b/package/ruby/ruby.mk
index adb1862..966a6a1 100644
--- a/package/ruby/ruby.mk
+++ b/package/ruby/ruby.mk
@@ -12,6 +12,8 @@ RUBY_DEPENDENCIES = host-ruby
 RUBY_MAKE_ENV = $(TARGET_MAKE_ENV)
 RUBY_CONF_OPT = --disable-install-doc
 
+HOST_RUBY_CONF_OPT = --disable-install-doc
+
 # Force optionals to build before we do
 ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
 	RUBY_DEPENDENCIES += berkeleydb
-- 
1.7.3.4

^ permalink raw reply related

* [U-Boot] [PATCH 2/2] at91sam9261ek: make operational again
From: Michael Trimarchi @ 2011-02-01 19:11 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <4D47F99D.1080208@free.fr>

Hi

On 02/01/2011 01:16 PM, Albert ARIBAUD wrote:
> Le 01/02/2011 11:45, Michael Trimarchi a ?crit :
>
>> Hi
>>
>> /home/toolchain/bin/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ld  -pie -r -o libat91.o  lowlevel_init.o clock.o cpu.o reset.o timer.o
>> /home/toolchain/bin/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ld: -r and -shared may not be used together
>>
>> I have tried this patch but this a problem releated to linking option. Do you have this problem?
>>
>> Michael
>
> Read up recent posts on the list: this was detected and is fixed in the 
> master branch of the u-boot-arm repository.
>
> Amicalement,
I see, but I see but I have other little problem. I have fixed the compilation, but I have a segmentation fault.

Starting program: /opt/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ld -pie -Bstatic -T u-boot.lds -Ttext 0x23e00000 arch/arm/cpu/arm926ejs/start.o --start-group api/libapi.o arch/arm/cpu/arm926ejs/at91/libat91.o arch/arm/cpu/arm926ejs/libarm926ejs.o arch/arm/lib/libarm.o common/libcommon.o disk/libdisk.o drivers/bios_emulator/libatibiosemu.o drivers/block/libblock.o drivers/dma/libdma.o drivers/fpga/libfpga.o drivers/gpio/libgpio.o drivers/hwmon/libhwmon.o drivers/i2c/libi2c.o drivers/input/libinput.o drivers/misc/libmisc.o drivers/mmc/libmmc.o drivers/mtd/libmtd.o drivers/mtd/nand/libnand.o drivers/mtd/onenand/libonenand.o drivers/mtd/spi/libspi_flash.o drivers/mtd/ubi/libubi.o drivers/net/libnet.o drivers/net/phy/libphy.o drivers/pci/libpci.o drivers/pcmcia/libpcmcia.o drivers/power/libpower.o drivers/rtc/librtc.o drivers/serial/libserial.o drivers/spi/libspi.o drivers/twserial/libtws.o drivers/usb/gadget/libusb_gadget.o
drivers/usb/host/libusb_host.o drivers/usb/musb/libusb_musb.o drivers/usb/phy/libusb_phy.o drivers/video/libvideo.o drivers/watchdog/libwatchdog.o fs/cramfs/libcramfs.o fs/ext2/libext2fs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o fs/reiserfs/libreiserfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o net/libnet.o post/libpost.o board/atmel/at91sam9261ek/libat91sam9261ek.o --end-group /home/michael/u-boot/arch/arm/lib/eabi_compat.o -L /opt/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/../lib/gcc/arm-none-linux-gnueabi/4.1.2 -lgcc -Map u-boot.map -o u-boot
/opt/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ld: u-boot: warning: allocated section `.bss' not in segment

Program received signal SIGSEGV, Segmentation fault.
0x08081ebd in elf32_arm_finish_dynamic_sections ()
(gdb) bt
#0  0x08081ebd in elf32_arm_finish_dynamic_sections ()
#1  0x0809cc2b in bfd_elf_final_link ()
#2  0x0807b525 in elf32_arm_bfd_final_link ()
#3  0x0805bfce in ldwrite ()
#4  0x0805a0be in main ()

Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: timer.patch
Type: text/x-patch
Size: 673 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110201/f1326848/attachment.bin 

^ permalink raw reply

* RE: [xen-unstable test] 5482: regressions - FAIL
From: Ian Jackson @ 2011-02-01 19:11 UTC (permalink / raw)
  To: Kay, Allen M; +Cc: xen-devel@lists.xensource.com, keir
In-Reply-To: <987664A83D2D224EAE907B061CE93D5301944405A0@orsmsx505.amr.corp.intel.com>

Kay, Allen M writes ("[Xen-devel] RE: [xen-unstable test] 5482: regressions - FAIL"):
> Attached patch disables pci_vtd_quirk for 32-bit Xen since 32-bit xen does not support MMCFG access.

Thanks, that looks like a plausible fix to me so I have applied it.
That way we should avoid getting this failure in our tests again.

CC'd Keir in case he minds the #ifdef or has some other comment to
make.

Ian.

^ permalink raw reply

* [U-Boot] PCIE supported networking cards?
From: Aaron Williams @ 2011-02-01 19:10 UTC (permalink / raw)
  To: u-boot

Are there any PCIE networking cards that are supported? So far I've
tried an Intel card and a Realtek RTL8168 card, but neither is
supported. It looks like the E1000 driver only supports PCI and PCIX
based cards (Linux uses the e1000e card for PCIe cards).

-Aaron

^ permalink raw reply

* Re: [poky] [PATCH 2/2] linux-yocto: export kernel configuration audit to the console
From: Bruce Ashfield @ 2011-02-01 19:09 UTC (permalink / raw)
  To: Darren Hart; +Cc: yocto, poky, saul.wold
In-Reply-To: <4D485554.1030209@linux.intel.com>

On Tue, Feb 1, 2011 at 1:47 PM, Darren Hart <dvhart@linux.intel.com> wrote:
> On 02/01/2011 09:25 AM, Bruce Ashfield wrote:
>>
>> Fixes [BUGID #692]
>>
>> Previously the information dumped by the kernel configuration audit
>> scripts was only placed in log files. This isn't as useful as it
>> could be, since they are rarely checked. This change takes the
>> output from kconf_check and explicitly displays it to the user.
>>
>> Signed-off-by: Bruce Ashfield<bruce.ashfield@windriver.com>
>
>> diff --git a/meta/conf/distro/include/poky-default-revisions.inc
>> b/meta/conf/distro/include/poky-default-revisions.inc
>> index 0c3aa9a..ac0de6a 100644
>> --- a/meta/conf/distro/include/poky-default-revisions.inc
>> +++ b/meta/conf/distro/include/poky-default-revisions.inc
>
>> -SRCREV_meta_pn-linux-yocto ?= "8a49ef6f1a43dabbce34a9ee9a1be08b26fc511c"
>> +SRCREV_meta_pn-linux-yocto ?= "e8b8c1ae44932835f4f79e77180d3ce5e4b1ec99"
>
> Was this an intentional change? It wasn't clear to me above which bits
> necessitated a linux-yocto-2.6.37/meta SRCREV change.

Good catch, and typically that would have been a mistake. That's
me updating the captured scripts to have the updated kconf_check
(among others), so it was intentional, but I did for get to mention it
in the submission email.

Cheers,

Bruce

>
> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply

* Re: [PATCH 2/2] linux-yocto: export kernel configuration audit to the console
From: Bruce Ashfield @ 2011-02-01 19:09 UTC (permalink / raw)
  To: Darren Hart; +Cc: yocto, poky, saul.wold
In-Reply-To: <4D485554.1030209@linux.intel.com>

On Tue, Feb 1, 2011 at 1:47 PM, Darren Hart <dvhart@linux.intel.com> wrote:
> On 02/01/2011 09:25 AM, Bruce Ashfield wrote:
>>
>> Fixes [BUGID #692]
>>
>> Previously the information dumped by the kernel configuration audit
>> scripts was only placed in log files. This isn't as useful as it
>> could be, since they are rarely checked. This change takes the
>> output from kconf_check and explicitly displays it to the user.
>>
>> Signed-off-by: Bruce Ashfield<bruce.ashfield@windriver.com>
>
>> diff --git a/meta/conf/distro/include/poky-default-revisions.inc
>> b/meta/conf/distro/include/poky-default-revisions.inc
>> index 0c3aa9a..ac0de6a 100644
>> --- a/meta/conf/distro/include/poky-default-revisions.inc
>> +++ b/meta/conf/distro/include/poky-default-revisions.inc
>
>> -SRCREV_meta_pn-linux-yocto ?= "8a49ef6f1a43dabbce34a9ee9a1be08b26fc511c"
>> +SRCREV_meta_pn-linux-yocto ?= "e8b8c1ae44932835f4f79e77180d3ce5e4b1ec99"
>
> Was this an intentional change? It wasn't clear to me above which bits
> necessitated a linux-yocto-2.6.37/meta SRCREV change.

Good catch, and typically that would have been a mistake. That's
me updating the captured scripts to have the updated kconf_check
(among others), so it was intentional, but I did for get to mention it
in the submission email.

Cheers,

Bruce

>
> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply

* Re: Tracking empty directories
From: Ilari Liusvaara @ 2011-02-01 19:09 UTC (permalink / raw)
  To: Jakub Narebski
  Cc: Nguyen Thai Ngoc Duy, Jonathan Nieder, Dmitry S. Kravtsov, git,
	Shawn Pearce
In-Reply-To: <201102011931.40559.jnareb@gmail.com>

On Tue, Feb 01, 2011 at 07:31:38PM +0100, Jakub Narebski wrote:
> Dnia wtorek 1. lutego 2011 19:15, Ilari Liusvaara napisał:
> > 
> > Worse problem than the index: Tree entries. Those are actually transferable
> > and IIRC older (current?) git versions don't handle empty subdirectories
> > (pointing entry of type directory to empty tree hash) all too well...
> 
> What did you mean by "don't handle" here?  The following entry
> 
>   040000 tree 22d5826c087c4b9dcc72e2131c2cfb061403f7eb	empty
> 
> should be not a problem; empty tree is hardcoded and also shouldn't there
> be a problem with such object.  Is the problem when checking out such tree
> (writing to index and/or working area)?

Yes, writing to index/working area. IIRC, having such entry in tree causes
a "ghost directory". I don't exactly recall what such thing broke, but I
remember that it broke something (merging?)...

Those ghosts also had annoying tendency to persist between commits. Commits
didn't kill them. Rm didn't work. You had to create something on top/inside to
get rid of them.

> > Worse yet, there isn't easy way to break the tree parser to avoid current
> > git versions from screwing things up (IIRC, when I tested, invalid octal
> > numbers finally broke it, invalid file types didn't do the trick)...
> 
> Well, then 1.8.0 version could be good place to break backwards 
> compatibility; we did similar thing when introducing submodule entries,
> isn't it?

Hint: Entry of mode "88888" blows up the tree parser nicely... :-)

At the same time, it could be useful to have manually tracked directories
(incidate via "sticky" bit of tree entry mode?)

-Ilari

^ permalink raw reply

* Re: Tracking empty directories
From: Jakub Narebski @ 2011-02-01 19:03 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: Nguyen Thai Ngoc Duy, Dmitry S. Kravtsov, git, Shawn Pearce
In-Reply-To: <20110201183508.GE3771@burratino>

Dnia wtorek 1. lutego 2011 19:35, Jonathan Nieder napisał:
> Nguyen Thai Ngoc Duy wrote:
>> On Wed, Feb 2, 2011 at 12:28 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> 
>>> I have ideas about how to resolve those tricky corner cases, but not
>>> about what the UI should look like.  How does one go about adding a
>>> directory?  Does it ever get implicitly removed?
>>
>> I suppose a special command for it is appropriate (git-keepdir?). Many
>> index-related commands are recursive by default and hard to change.
>>
>> Yes I think it should be automatically removed from index when a file
>> is added inside tracked directories. Removing those files will also
>> remove the containing directory though.
> 
> Okay, I'm convinced.  This fits a "worse is better" point of view
> nicely.
> 
> To add, one would use "git update-index --add".

Porcelain version could be "git add -N <directory>", don't you agree?

> The magic disappears when you register a file within that directory;
> to tell git you want to keep it, one would mkdir and
> "git update-index --add" again.  Once it's working, we can think about
> if there is a need for making that last step automatic after all
> (my guess: "no"). ;-) 

Hmmm... could we use mechanism similar to assume-unchanged to mark
directory as explicitely tracked, and that git should not remove it
when it becomes empty?

-- 
Jakub Narebski
Poland

^ permalink raw reply

* Re: [PATCH] xl: fix broken cpupool-numa-split (part 2)
From: Ian Jackson @ 2011-02-01 19:07 UTC (permalink / raw)
  To: Juergen Gross
  Cc: George Dunlap, Andre Przywara, xen-devel@lists.xensource.com
In-Reply-To: <4D465D1B.1010504@ts.fujitsu.com>

Juergen Gross writes ("Re: [Xen-devel] [PATCH] xl: fix broken cpupool-numa-split (part 2)"):
> On 01/29/11 01:35, Andre Przywara wrote:
> > Before the creation and population of a new CPU pool we have to clear
> > the poolid variable, which still contains the value from the previous
> > iteration.
> > This fixes the execution of xl cpupool-numa-split on machines with more
> > than two nodes.

Applied, thanks.

Ian.

^ permalink raw reply

* latest clutter-recipe
From: Andreas Mueller @ 2011-02-01 19:02 UTC (permalink / raw)
  To: openembedded-devel

Hi

it surprised me to see that Koen committed a new recipe for clutter 1.4.2. As you might know I was also working on this and sent some pre-release version here of this (1). What makes me not running in happy mode:

- Many of my previous patches were rejected first because of some commit message. Here we read 'clutter: add 1.4.2' - cool. Which tests were performed?

- the recipe breaks clutter-gst:
| checking for CLUTTER_GST... configure: error: Package requirements (clutter-1.0 < 1.3.0 gio-2.0) were not met:
| 
| Requested 'clutter-1.0 < 1.3.0' but version of Clutter is 1.4.2
I prepared clutter-gst 1.3.4 but I am tired preparing commit messages..

- the recipe breaks clutter-gtk :
| NOTE: make -j 4
| make  all-recursive
| make[1]: Entering directory `/home/Superandi/tmp/work/armv7a-angstrom-linux-gnueabi/clutter-gtk-0.10.8-r2.0/clutter-gtk-0.10.8'
| Making all in build
| make[2]: Entering directory `/home/Superandi/tmp/work/armv7a-angstrom-linux-gnueabi/clutter-gtk-0.10.8-r2.0/clutter-gtk-0.10.8/build'
| Making all in autotools
| make[3]: Entering directory `/home/Superandi/tmp/work/armv7a-angstrom-linux-gnueabi/clutter-gtk-0.10.8-r2.0/clutter-gtk-0.10.8/build/autotools'
| make[3]: Nothing to be done for `all'.
| make[3]: Leaving directory `/home/Superandi/tmp/work/armv7a-angstrom-linux-gnueabi/clutter-gtk-0.10.8-r2.0/clutter-gtk-0.10.8/build/autotools'
| make[3]: Entering directory `/home/Superandi/tmp/work/armv7a-angstrom-linux-gnueabi/clutter-gtk-0.10.8-r2.0/clutter-gtk-0.10.8/build'
| make[3]: Nothing to be done for `all-am'.
| make[3]: Leaving directory `/home/Superandi/tmp/work/armv7a-angstrom-linux-gnueabi/clutter-gtk-0.10.8-r2.0/clutter-gtk-0.10.8/build'
| make[2]: Leaving directory `/home/Superandi/tmp/work/armv7a-angstrom-linux-gnueabi/clutter-gtk-0.10.8-r2.0/clutter-gtk-0.10.8/build'
| Making all in clutter-gtk
| make[2]: Entering directory `/home/Superandi/tmp/work/armv7a-angstrom-linux-gnueabi/clutter-gtk-0.10.8-r2.0/clutter-gtk-0.10.8/clutter-gtk'
|   CC     libclutter_gtk_0.10_la-gtk-clutter-embed.lo
|   CC     libclutter_gtk_0.10_la-gtk-clutter-scrollable.lo
|   CC     libclutter_gtk_0.10_la-gtk-clutter-viewport.lo
|   CC     libclutter_gtk_0.10_la-gtk-clutter-util.lo
|   CC     libclutter_gtk_0.10_la-gtk-clutter-zoomable.lo
|   CCLD   libclutter-gtk-0.10.la
| /home/Superandi/tmp/sysroots/i686-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lclutter-egl-1.0
Let's hope gtk_0.12 will help...

- What exactly is the goal of 'test-conformance-fix.patch' (to get the build working there less cluttering solutions are possible e.g.  sed'ing out BUILIT_SOURCES in Makefile.am)? From my point of view it creates a lot of unusable scripts in the sub folder 'wrapper' and the file 'unit-tests'. Nothing created by this is packed.


Please don't tell me I am invited to change this situation:  Many patches send by non-commit guys are nit-picked at least for commit message - and then I read 'clutter: add 1.4.2' for a recipe breaking lots of others.

Sorry for this, but to me the this should have been a hobby for having fun - but at the moment it's far from

Andreas

(1) http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-January/029260.html



^ permalink raw reply

* Re: [PATCH] xl: output illegal option character
From: Ian Jackson @ 2011-02-01 19:06 UTC (permalink / raw)
  To: Andre Przywara; +Cc: xen-devel
In-Reply-To: <4D4348CF.6070001@amd.com>

Andre Przywara writes ("[PATCH] xl: output illegal option character"):
> What do you think about the attached one? Looks quite obvious to me.

Yes, applied, thanks.

> Looking at the two patches I hope I can refactor the option parsing into 
> common code after the release. This should be easier to fix then.

That would be lovely.

Ian.

^ permalink raw reply

* Re: [PATCH 2/2] security: remove unused security_sysctl hook
From: Stephen Smalley @ 2011-02-01 19:05 UTC (permalink / raw)
  To: Lucian Adrian Grijincu
  Cc: James Morris, Eric Paris, ebiederm, linux-kernel,
	linux-security-module
In-Reply-To: <1296578696-5989-1-git-send-email-lucian.grijincu@gmail.com>

On Tue, 2011-02-01 at 18:44 +0200, Lucian Adrian Grijincu wrote:
> The only user for this hook was selinux. sysctl routes every call
> through /proc/sys/. Selinux and other security modules use the file
> system checks for sysctl too, so no need for this hook any more.
> 
> Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>

Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>

> ---
>  include/linux/security.h |   13 -------------
>  kernel/sysctl.c          |    5 -----
>  security/capability.c    |    6 ------
>  security/security.c      |    5 -----
>  4 files changed, 0 insertions(+), 29 deletions(-)
> 
> diff --git a/include/linux/security.h b/include/linux/security.h
> index c642bb8..e7b48dc 100644
> --- a/include/linux/security.h
> +++ b/include/linux/security.h
> @@ -1257,12 +1257,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
>   *	@cap contains the capability <include/linux/capability.h>.
>   *	@audit: Whether to write an audit message or not
>   *	Return 0 if the capability is granted for @tsk.
> - * @sysctl:
> - *	Check permission before accessing the @table sysctl variable in the
> - *	manner specified by @op.
> - *	@table contains the ctl_table structure for the sysctl variable.
> - *	@op contains the operation (001 = search, 002 = write, 004 = read).
> - *	Return 0 if permission is granted.
>   * @syslog:
>   *	Check permission before accessing the kernel message ring or changing
>   *	logging to the console.
> @@ -1383,7 +1377,6 @@ struct security_operations {
>  		       const kernel_cap_t *permitted);
>  	int (*capable) (struct task_struct *tsk, const struct cred *cred,
>  			int cap, int audit);
> -	int (*sysctl) (struct ctl_table *table, int op);
>  	int (*quotactl) (int cmds, int type, int id, struct super_block *sb);
>  	int (*quota_on) (struct dentry *dentry);
>  	int (*syslog) (int type);
> @@ -1665,7 +1658,6 @@ int security_capset(struct cred *new, const struct cred *old,
>  int security_capable(int cap);
>  int security_real_capable(struct task_struct *tsk, int cap);
>  int security_real_capable_noaudit(struct task_struct *tsk, int cap);
> -int security_sysctl(struct ctl_table *table, int op);
>  int security_quotactl(int cmds, int type, int id, struct super_block *sb);
>  int security_quota_on(struct dentry *dentry);
>  int security_syslog(int type);
> @@ -1883,11 +1875,6 @@ int security_real_capable_noaudit(struct task_struct *tsk, int cap)
>  	return ret;
>  }
>  
> -static inline int security_sysctl(struct ctl_table *table, int op)
> -{
> -	return 0;
> -}
> -
>  static inline int security_quotactl(int cmds, int type, int id,
>  				     struct super_block *sb)
>  {
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 0f1bd83..56f6fc1 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -1685,13 +1685,8 @@ static int test_perm(int mode, int op)
>  
>  int sysctl_perm(struct ctl_table_root *root, struct ctl_table *table, int op)
>  {
> -	int error;
>  	int mode;
>  
> -	error = security_sysctl(table, op & (MAY_READ | MAY_WRITE | MAY_EXEC));
> -	if (error)
> -		return error;
> -
>  	if (root->permissions)
>  		mode = root->permissions(root, current->nsproxy, table);
>  	else
> diff --git a/security/capability.c b/security/capability.c
> index 2a5df2b..ebe3b5d 100644
> --- a/security/capability.c
> +++ b/security/capability.c
> @@ -12,11 +12,6 @@
>  
>  #include <linux/security.h>
>  
> -static int cap_sysctl(ctl_table *table, int op)
> -{
> -	return 0;
> -}
> -
>  static int cap_syslog(int type)
>  {
>  	return 0;
> @@ -880,7 +875,6 @@ void __init security_fixup_ops(struct security_operations *ops)
>  	set_to_cap_if_null(ops, capable);
>  	set_to_cap_if_null(ops, quotactl);
>  	set_to_cap_if_null(ops, quota_on);
> -	set_to_cap_if_null(ops, sysctl);
>  	set_to_cap_if_null(ops, syslog);
>  	set_to_cap_if_null(ops, settime);
>  	set_to_cap_if_null(ops, vm_enough_memory);
> diff --git a/security/security.c b/security/security.c
> index 739e403..53d793a 100644
> --- a/security/security.c
> +++ b/security/security.c
> @@ -182,11 +182,6 @@ int security_real_capable_noaudit(struct task_struct *tsk, int cap)
>  	return ret;
>  }
>  
> -int security_sysctl(struct ctl_table *table, int op)
> -{
> -	return security_ops->sysctl(table, op);
> -}
> -
>  int security_quotactl(int cmds, int type, int id, struct super_block *sb)
>  {
>  	return security_ops->quotactl(cmds, type, id, sb);
> -- 
> 1.7.4.rc1.7.g2cf08.dirty

-- 
Stephen Smalley
National Security Agency


^ permalink raw reply

* Re: [PATCH 1/2] security/selinux: fix /proc/sys/ labeling
From: Stephen Smalley @ 2011-02-01 19:04 UTC (permalink / raw)
  To: Lucian Adrian Grijincu
  Cc: James Morris, Eric Paris, Eric W. Biederman, linux-kernel,
	linux-security-module
In-Reply-To: <1296578542-5902-1-git-send-email-lucian.grijincu@gmail.com>

On Tue, 2011-02-01 at 18:42 +0200, Lucian Adrian Grijincu wrote:
> This fixes an old (2007) selinux regression: filesystem labeling for
> /proc/sys returned
>      -r--r--r-- unknown                          /proc/sys/fs/file-nr
> instead of
>      -r--r--r-- system_u:object_r:sysctl_fs_t:s0 /proc/sys/fs/file-nr
> 
> Events that lead to breaking of /proc/sys/ selinux labeling:
> 
> 1) sysctl was reimplemented to route all calls through /proc/sys/
> 
>     commit 77b14db502cb85a031fe8fde6c85d52f3e0acb63
>     [PATCH] sysctl: reimplement the sysctl proc support
> 
> 2) proc_dir_entry was removed from ctl_table:
> 
>     commit 3fbfa98112fc3962c416452a0baf2214381030e6
>     [PATCH] sysctl: remove the proc_dir_entry member for the sysctl tables
> 
> 3) selinux still walked the proc_dir_entry tree to apply
>    labeling. Because ctl_tables don't have a proc_dir_entry, we did
>    not label /proc/sys/ inodes any more. To achieve this the /proc/sys/
>    inodes were marked private and private inodes were ignored by
>    selinux.
> 
>     commit bbaca6c2e7ef0f663bc31be4dad7cf530f6c4962
>     [PATCH] selinux: enhance selinux to always ignore private inodes
> 
>     commit 86a71dbd3e81e8870d0f0e56b87875f57e58222b
>     [PATCH] sysctl: hide the sysctl proc inodes from selinux
> 
> Access control checks have been done by means of a special sysctl hook
> that was called for read/write accesses to any /proc/sys/ entry.
> 
> We don't have to do this because, instead of walking the
> proc_dir_entry tree we can walk the dentry tree (as done in this
> patch). With this patch:
> * we don't mark /proc/sys/ inodes as private
> * we don't need the sysclt security hook
> * we walk the dentry tree to find the path to the inode.
> 
> We have to strip the PID in /proc/PID/ entries that have a
> proc_dir_entry because selinux does not know how to label paths like
> '/1/net/rpc/nfsd.fh' (and defaults to 'proc_t' labeling). Selinux does
> know of '/net/rpc/nfsd.fh' (and applies the 'sysctl_rpc_t' label).
> 
> PID stripping from the path was done implicitly in the previous code
> because the proc_dir_entry tree had the root in '/net' in the example
> from above. The dentry tree has the root in '/1'.
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
> Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>

Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>

> ---
>  fs/proc/proc_sysctl.c    |    1 -
>  security/selinux/hooks.c |  120 +++++++---------------------------------------
>  2 files changed, 18 insertions(+), 103 deletions(-)
> 
> diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
> index 09a1f92..fb707e0 100644
> --- a/fs/proc/proc_sysctl.c
> +++ b/fs/proc/proc_sysctl.c
> @@ -32,7 +32,6 @@ static struct inode *proc_sys_make_inode(struct super_block *sb,
>  	ei->sysctl_entry = table;
>  
>  	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
> -	inode->i_flags |= S_PRIVATE; /* tell selinux to ignore this inode */
>  	inode->i_mode = table->mode;
>  	if (!table->child) {
>  		inode->i_mode |= S_IFREG;
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index e276eb4..5231b95 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -43,7 +43,6 @@
>  #include <linux/fdtable.h>
>  #include <linux/namei.h>
>  #include <linux/mount.h>
> -#include <linux/proc_fs.h>
>  #include <linux/netfilter_ipv4.h>
>  #include <linux/netfilter_ipv6.h>
>  #include <linux/tty.h>
> @@ -70,7 +69,6 @@
>  #include <net/ipv6.h>
>  #include <linux/hugetlb.h>
>  #include <linux/personality.h>
> -#include <linux/sysctl.h>
>  #include <linux/audit.h>
>  #include <linux/string.h>
>  #include <linux/selinux.h>
> @@ -1120,39 +1118,35 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
>  }
>  
>  #ifdef CONFIG_PROC_FS
> -static int selinux_proc_get_sid(struct proc_dir_entry *de,
> +static int selinux_proc_get_sid(struct dentry *dentry,
>  				u16 tclass,
>  				u32 *sid)
>  {
> -	int buflen, rc;
> -	char *buffer, *path, *end;
> +	int rc;
> +	char *buffer, *path;
>  
>  	buffer = (char *)__get_free_page(GFP_KERNEL);
>  	if (!buffer)
>  		return -ENOMEM;
>  
> -	buflen = PAGE_SIZE;
> -	end = buffer+buflen;
> -	*--end = '\0';
> -	buflen--;
> -	path = end-1;
> -	*path = '/';
> -	while (de && de != de->parent) {
> -		buflen -= de->namelen + 1;
> -		if (buflen < 0)
> -			break;
> -		end -= de->namelen;
> -		memcpy(end, de->name, de->namelen);
> -		*--end = '/';
> -		path = end;
> -		de = de->parent;
> +	path = dentry_path_raw(dentry, buffer, PAGE_SIZE);
> +	if (IS_ERR(path))
> +		rc = PTR_ERR(path);
> +	else {
> +		/* each process gets a /proc/PID/ entry. Strip off the
> +		 * PID part to get a valid selinux labeling.
> +		 * e.g. /proc/1/net/rpc/nfs -> /net/rpc/nfs */
> +		while (path[1] >= '0' && path[1] <= '9') {
> +			path[1] = '/';
> +			path++;
> +		}
> +		rc = security_genfs_sid("proc", path, tclass, sid);
>  	}
> -	rc = security_genfs_sid("proc", path, tclass, sid);
>  	free_page((unsigned long)buffer);
>  	return rc;
>  }
>  #else
> -static int selinux_proc_get_sid(struct proc_dir_entry *de,
> +static int selinux_proc_get_sid(struct dentry *dentry,
>  				u16 tclass,
>  				u32 *sid)
>  {
> @@ -1316,10 +1310,9 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
>  		isec->sid = sbsec->sid;
>  
>  		if ((sbsec->flags & SE_SBPROC) && !S_ISLNK(inode->i_mode)) {
> -			struct proc_inode *proci = PROC_I(inode);
> -			if (proci->pde) {
> +			if (opt_dentry) {
>  				isec->sclass = inode_mode_to_security_class(inode->i_mode);
> -				rc = selinux_proc_get_sid(proci->pde,
> +				rc = selinux_proc_get_sid(opt_dentry,
>  							  isec->sclass,
>  							  &sid);
>  				if (rc)
> @@ -1862,82 +1855,6 @@ static int selinux_capable(struct task_struct *tsk, const struct cred *cred,
>  	return task_has_capability(tsk, cred, cap, audit);
>  }
>  
> -static int selinux_sysctl_get_sid(ctl_table *table, u16 tclass, u32 *sid)
> -{
> -	int buflen, rc;
> -	char *buffer, *path, *end;
> -
> -	rc = -ENOMEM;
> -	buffer = (char *)__get_free_page(GFP_KERNEL);
> -	if (!buffer)
> -		goto out;
> -
> -	buflen = PAGE_SIZE;
> -	end = buffer+buflen;
> -	*--end = '\0';
> -	buflen--;
> -	path = end-1;
> -	*path = '/';
> -	while (table) {
> -		const char *name = table->procname;
> -		size_t namelen = strlen(name);
> -		buflen -= namelen + 1;
> -		if (buflen < 0)
> -			goto out_free;
> -		end -= namelen;
> -		memcpy(end, name, namelen);
> -		*--end = '/';
> -		path = end;
> -		table = table->parent;
> -	}
> -	buflen -= 4;
> -	if (buflen < 0)
> -		goto out_free;
> -	end -= 4;
> -	memcpy(end, "/sys", 4);
> -	path = end;
> -	rc = security_genfs_sid("proc", path, tclass, sid);
> -out_free:
> -	free_page((unsigned long)buffer);
> -out:
> -	return rc;
> -}
> -
> -static int selinux_sysctl(ctl_table *table, int op)
> -{
> -	int error = 0;
> -	u32 av;
> -	u32 tsid, sid;
> -	int rc;
> -
> -	sid = current_sid();
> -
> -	rc = selinux_sysctl_get_sid(table, (op == 0001) ?
> -				    SECCLASS_DIR : SECCLASS_FILE, &tsid);
> -	if (rc) {
> -		/* Default to the well-defined sysctl SID. */
> -		tsid = SECINITSID_SYSCTL;
> -	}
> -
> -	/* The op values are "defined" in sysctl.c, thereby creating
> -	 * a bad coupling between this module and sysctl.c */
> -	if (op == 001) {
> -		error = avc_has_perm(sid, tsid,
> -				     SECCLASS_DIR, DIR__SEARCH, NULL);
> -	} else {
> -		av = 0;
> -		if (op & 004)
> -			av |= FILE__READ;
> -		if (op & 002)
> -			av |= FILE__WRITE;
> -		if (av)
> -			error = avc_has_perm(sid, tsid,
> -					     SECCLASS_FILE, av, NULL);
> -	}
> -
> -	return error;
> -}
> -
>  static int selinux_quotactl(int cmds, int type, int id, struct super_block *sb)
>  {
>  	const struct cred *cred = current_cred();
> @@ -5398,7 +5315,6 @@ static struct security_operations selinux_ops = {
>  	.ptrace_traceme =		selinux_ptrace_traceme,
>  	.capget =			selinux_capget,
>  	.capset =			selinux_capset,
> -	.sysctl =			selinux_sysctl,
>  	.capable =			selinux_capable,
>  	.quotactl =			selinux_quotactl,
>  	.quota_on =			selinux_quota_on,

-- 
Stephen Smalley
National Security Agency


^ permalink raw reply

* Re: OE TSC
From: Mark Hatle @ 2011-02-01 19:02 UTC (permalink / raw)
  To: openembedded-devel
In-Reply-To: <1296579133.13501.19996.camel@rex>

On 2/1/11 10:52 AM, Richard Purdie wrote:
> On Tue, 2011-02-01 at 15:51 +0100, Koen Kooi wrote:
>> On 31-01-11 15:10, Richard Purdie wrote:
>>
>>> There are various issues needing attention ASAP and therefore the TSC
>>> would like to propose that we call for candidates and that the board
>>> then empower an interim TSC based on the result of that call without
>>> waiting for a vote.
>>
>> Since I'll be travelling the rest of the week and will likely be offline
>> when the actual call comes from the board:
>>
>> I would like to stand as candidate for that interim TSC.
>>
>> Earlier Khem and Tom Rini expressed interest in standing as candidate as
>> well, but I can't say if that is still the case. Please speak up if it is :)
>>
>> It would be nice to have someone with an interest in the releases as
>> well, e.g. Stefan Schmidt.
> 
> So just for completeness I've also wondered whether anyone from the
> Yocto world would be welcome on the TSC, in particular I think Mark
> Hatle might have a lot to offer.
> 
> I appreciate he isn't know much in the OE world but he has a strong
> background in embedded Linux (works for Wind River) and is a strong
> participant in the Yocto community. Some OE people met him in Cambridge
> since he was at OEDEM.

As Richard mentioned, I'm likely not well known within the OE community.
However, I am willing to serve on the TSC and bring my experience in embedded
Linux with me.  I've worked with both Khem and Tom both in an Open Source
capacity as well as professionally in the past.

As a quick bio, let me share my background.

Back in around 1997 I started working on MkLinux (Mach Microkernel based Linux)
on the old Power Macs.  I was one of the first people (maybe the first?) to
integrate a full 'modern' Linux distribution on a PowerPC based machine.  This
eventually lead to MkLinux, LinuxPPC and even early Yellow Dog Linux releases..

Since 2000 I've been working on embedded Linux projects.  In 2000 I was hired as
an engineer with MontaVista Software.  My responsibilities covered everything
from build systems, to toolchains, to userspace integration...

In 2005 I moved to my present employer, Wind River, and repeated many of my
previous assignments.. build systems, toolchains, package management and
userspace integration.

Since 2008, I've been involved with the GENIVI automotive organization.  I
helped in the early days determine open source strategies, as well as was the
chair for the System Infrastructure working group.

Since 2010, I've been involved with the Yocto project since the beginning.  This
was my first experience with an OE style build environment, but the general
every day work, toolchains, userspace integration, package management are all
the same problems as I've encountered numerous times in the past.

I hope this gives a quick background of my qualifications.  If anyone has any
questions, I'll be happy to answer them.

Thanks,
--Mark



^ permalink raw reply

* Re: How To Temporarily Suspend Network Traffic
From: Volkan YAZICI @ 2011-02-01 18:22 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Rick Jones, netdev
In-Reply-To: <20110201094923.4fa6637f@nehalam>

On Tue, 1 Feb 2011 09:49:23 -0800, Stephen Hemminger writes:
> What about using tc mired to redirect to dummy device? or use netem drop

Ohh! I have just heard about netem. I'll definitely give it a try.
Thanks!


Regards.

P.S. I will ofcourse google and read the documentation that I can find
     about these stuff. OTOH, I'd be really appreciated if you can point
     me some relevant material. Kind of material, that is, which might
     not be able to easily reachable via searching and following links.

^ permalink raw reply

* Re: snd_soc_jack_add_gpios vs. SOC_DAPM_PIN_SWITCH
From: Stephen Warren @ 2011-02-01 18:59 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel@alsa-project.org
In-Reply-To: <20110201113351.GB12743@opensource.wolfsonmicro.com>

Mark Brown wrote at Tuesday, February 01, 2011 4:34 AM:
> On Mon, Jan 31, 2011 at 04:03:58PM -0800, Stephen Warren wrote:
> 
> > However, if I use the control to disable the headphones, then
> > unplug/replug the headphones, the jack detect seems to override
> > the control, and I hear audio from the headphones.
> 
> Using these two together makes no sense.  Either you manually control
> the state of the output or you manage it automatically.

I was thinking that the jack detect would be used to enable/disable widgets
for power purposes, but with a manual override to allow SW to set up use
cases where only the internal speakers were used, and never headphones.

That said, if that isn't something that's ever typically done, I'm fine
not supporting that.

> Generally a PIN_SWITCH() should only be used to offer control if none is
> availabile within the CODEC - in the case of Harmony it wouldn't make
> much sense as there's plenty of control in the CODEC for what gets
> routed to the various outputs.

IIRC, the codec controls allow selecting only what gets routed, but there
wasn't an overall "enable/disable speakers" switch (the mute switch does
not disable the DAPM widgets). One would have to disable all the routing
options to disable the speaker amplifiers, which would entail remembering
what those routing options were to restore them once the speakers were
desired again. A manual switch avoids this.

-- 
nvpublic

^ permalink raw reply

* Re: [PATCH 2/3] t9010-svn-fi: Add tests for svn-fi
From: Jonathan Nieder @ 2011-02-01 18:58 UTC (permalink / raw)
  To: Ramkumar Ramachandra
  Cc: Git List, David Barr, Sverre Rabbelier, Junio C Hamano
In-Reply-To: <1296570403-9082-3-git-send-email-artagnon@gmail.com>

Ramkumar Ramachandra wrote:

> Create a test-svn-fi in toplevel directory, add rules to build it, and
> add some basic tests.

Thanks.  Probably this should be squashed with patch #1?

> --- /dev/null
> +++ b/t/t9010-svn-fi.sh

Test number's already taken.  9012 is free, though.

> @@ -0,0 +1,303 @@
> +#!/bin/sh
> +
> +test_description='check svn dumpfile exporter'
> +
> +. ./test-lib.sh
> +
> +if ! svnadmin -h >/dev/null 2>&1
> +then
> +	skip_all='skipping svn-fi tests, svn not available'
> +	test_done
> +fi

Is it impossible to test without svn present or otherwise speed
these up?  Some random ideas:

 - feed svn-fi output into svn-fe and compare git repos
 - check if "svn-fi after svn-fe" is idempotent (should it be?)
 - check for individual salient features from svn-fi output, using
   "grep", "sed", or "awk" to ignore the rest
 - use svnrdump in place of "svnadmin load" if available (is it
   faster?)
 - find the bottleneck in svnadmin and fix it

Of course at least one test of the "svn-fe | svnadmin load"
pipeline seems worthwhile; I'm just thinking we should avoid
habits that slow down the test suite too much.

> +svn_look () {
> +	subcommand=$1 &&
> +	shift &&
> +	svnlook "$subcommand" "$svnrepo" "$@"
> +}

Needed?  The svn_cmd function exists to point to a configuration
directory.

> +test_expect_success 'normal empty files' '
> +	reinit_svn &&
> +	cat >expect.tree <<-\EOF &&
> +	/
> +	 foo
> +	 bar
> +	EOF
> +	cat >input <<-\EOF &&
> +	reset refs/heads/master
> +	commit refs/heads/master
> +	mark :1
> +	author nobody <nobody@localhost> 1170199019 +0100
> +	committer nobody <nobody@localhost> 1170199019 +0100

Where do the dates come from?  Why should I (the reader) expect
them?

> +# TODO: How to test date? Need to convert from local timestamp

Ah, you saw. :)

One possibility is to fuzz away whatever is unimportant when
comparing results (and using tools like "awk" to extract the
date to perform whatever tests on it are appropriate where it
matters).

> +test_expect_success 'malformed fast-import stream: author 2' '
> +	reinit_svn &&
> +	cat >input <<-\EOF &&
> +	reset refs/heads/master
> +	commit refs/heads/master
> +	mark :1
> +	author nobody <localhost> 1170199019 +0100
> +	committer nobody <nobody@localhost> 1170199019 +0100
> +	data 0
> +	M 100644 inline foo
> +	data 0
> +
> +	EOF
> +	try_load input must_fail

What's wrong with this stream?

> +test_expect_success 'svn:special and svn:executable' '
> +	reinit_svn &&
> +	cat >input <<-\EOF &&
> +	reset refs/heads/master
> +	commit refs/heads/master
> +	mark :1
> +	author nobody <nobody@localhost> 1170199019 +0100
> +	committer nobody <nobody@localhost> 1170199019 +0100
> +	data 7
> +	nothing
> +	M 100755 inline foo
> +	data 0
> +	M 755 inline moo
> +	data 0
> +	M 120000 inline bar
> +	data 0
> +
> +	EOF
> +	try_load input &&
> +	svn_look propget svn:executable foo &&
> +	svn_look propget svn:executable moo &&
> +	svn_look propget svn:special bar

Maybe worth checking for the absence of svn:executable +
svn:special from an ordinary file, too?

> +test_expect_success 'replace symlink with normal file' '

Nice.  "replace symlink with executable" and "replace symlink
with directory" might also be interesting.

Regards,
Jonathan

^ permalink raw reply

* Re: [PATCH v2 5/6] KVM-GST: adjust scheduler cpu power
From: Peter Zijlstra @ 2011-02-01 18:59 UTC (permalink / raw)
  To: Glauber Costa
  Cc: kvm, linux-kernel, aliguori, Rik van Riel, Jeremy Fitzhardinge,
	Avi Kivity
In-Reply-To: <1296577358.5081.23.camel@mothafucka.localdomain>

On Tue, 2011-02-01 at 14:22 -0200, Glauber Costa wrote:
> 
> 
> Which tick accounting? In your other e-mail , you pointed that this only
> runs in touch_steal_time, which is fine, will change.

That tick ;-), all the account_foo muck is per tick.

>  But all the rest
> here, that is behind the hypervisor specific vs generic code has nothing
> to do with ticks at all.

But I don't get it, there is no generic code needed, all that's needed
is u64 steal_time_clock(int cpu), and the first part of your
kvm_account_steal_time() function is exactly that if you add the cpu
argument.

+static u64 steal_time_clock(int cpu)
+{
+       u64 steal_time;
+       struct kvm_steal_time *src;
+       int version;
+
+	preempt_disable();
+       src = &per_cpu_ptr(steal_time, cpu);
+       do {
+               version = src->version;
+               rmb();
+               steal_time = src->steal;
+               rmb();
+       } while ((src->version & 1) || (version != src->version));
+       preempt_enable();
+
+       return steal_time
+}

And you're done.. no need to for any of that steal_time_{read,write} business.


^ permalink raw reply

* Re: Xen 4.1.0 RC2 released,
From: Ian Campbell @ 2011-02-01 18:53 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel@lists.xensource.com, Nathan March
In-Reply-To: <19784.22061.626047.196403@mariner.uk.xensource.com>

On Tue, 2011-02-01 at 18:51 +0000, Ian Jackson wrote: 
> Ian Campbell writes ("Re: [Xen-devel] Xen 4.1.0 RC2 released,"):
> > -LDFLAGS += $(shell getconf LFS_LDFLAGS)
> > +LDFLAGS += $(shell getconf LFS_LDFLAGS) -Wl,--no-as-needed
> 
> Before I commit this change,

You don't want this one, it broke the hypervisor build.

There is a post of a fixed patch in a new thread " tools: disable linker
--as-needed option" from this morning.

> I do wonder whether there are older
> versions of GNU ld that don't support --as-needed and therefore break
> with --no-as-needed.
> 
> Does anyone have an ancient build environment they could try this
> patch on ?

The above thread has some analysis -- I think we're ok on this score,
even Debian Sarge had a new enough ld.

Ian.

^ permalink raw reply

* Re: [tip:perf/core] perf top: Introduce slang based TUI
From: Yinghai Lu @ 2011-02-01 18:51 UTC (permalink / raw)
  To: mingo, hpa, acme, paulus, eranian, linux-kernel, tzanussi, efault,
	peterz, fweisbec, tglx, mingo
  Cc: linux-tip-commits
In-Reply-To: <tip-c0443df1b69b59675fc6790e0ddce87c8ca00abf@git.kernel.org>

On 02/01/2011 01:20 AM, tip-bot for Arnaldo Carvalho de Melo wrote:
> Commit-ID:  c0443df1b69b59675fc6790e0ddce87c8ca00abf
> Gitweb:     http://git.kernel.org/tip/c0443df1b69b59675fc6790e0ddce87c8ca00abf
> Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
> AuthorDate: Mon, 31 Jan 2011 18:19:33 -0200
> Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
> CommitDate: Mon, 31 Jan 2011 18:19:33 -0200
> 
> perf top: Introduce slang based TUI
> 
> Disabled by default as there are features found in the stdio based one
> that aren't implemented, like live annotation, filtering knobs data
> entry.
> 
> Annotation hopefully will get somehow merged with the 'perf annotate'
> code.
> 
> To use it:
> 
> perf top --tui
> 
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Mike Galbraith <efault@gmx.de>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Stephane Eranian <eranian@google.com>
> Cc: Tom Zanussi <tzanussi@gmail.com>
> LKML-Reference: <new-submission>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/Makefile               |    4 +
>  tools/perf/builtin-top.c          |   35 ++++++++--
>  tools/perf/util/top.c             |    7 ++-
>  tools/perf/util/top.h             |   15 ++++-
>  tools/perf/util/ui/browsers/top.c |  136 +++++++++++++++++++++++++++++++++++++
>  5 files changed, 189 insertions(+), 8 deletions(-)
> 
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index edc660e..67a9f4d 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -621,6 +621,7 @@ else
>  		LIB_OBJS += $(OUTPUT)util/ui/browsers/annotate.o
>  		LIB_OBJS += $(OUTPUT)util/ui/browsers/hists.o
>  		LIB_OBJS += $(OUTPUT)util/ui/browsers/map.o
> +		LIB_OBJS += $(OUTPUT)util/ui/browsers/top.o
>  		LIB_OBJS += $(OUTPUT)util/ui/helpline.o
>  		LIB_OBJS += $(OUTPUT)util/ui/progress.o
>  		LIB_OBJS += $(OUTPUT)util/ui/util.o
> @@ -1050,6 +1051,9 @@ $(OUTPUT)util/ui/browser.o: util/ui/browser.c $(OUTPUT)PERF-CFLAGS
>  $(OUTPUT)util/ui/browsers/annotate.o: util/ui/browsers/annotate.c $(OUTPUT)PERF-CFLAGS
>  	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<
>  
> +$(OUTPUT)util/ui/browsers/top.o: util/ui/browsers/top.c $(OUTPUT)PERF-CFLAGS
> +	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<
> +
>  $(OUTPUT)util/ui/browsers/hists.o: util/ui/browsers/hists.c $(OUTPUT)PERF-CFLAGS
>  	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<
>  
> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> index 3c9ba94..104de9a 100644
> --- a/tools/perf/builtin-top.c
> +++ b/tools/perf/builtin-top.c
> @@ -20,6 +20,7 @@
>  
>  #include "perf.h"
>  
> +#include "util/cache.h"
>  #include "util/color.h"
>  #include "util/evlist.h"
>  #include "util/evsel.h"
> @@ -75,6 +76,8 @@ static struct perf_top top = {
>  
>  static bool			system_wide			=  false;
>  
> +static bool			use_tui, use_stdio;
> +
>  static int			default_interval		=      0;
>  
>  static bool			inherit				=  false;
> @@ -96,11 +99,6 @@ static int			sym_pcnt_filter			=      5;
>   * Source functions
>   */
>  
> -static inline struct symbol *sym_entry__symbol(struct sym_entry *self)
> -{
> -       return ((void *)self) + symbol_conf.priv_size;
> -}
> -
>  void get_term_dimensions(struct winsize *ws)
>  {
>  	char *s = getenv("LINES");
> @@ -695,6 +693,14 @@ static void handle_keypress(struct perf_session *session, int c)
>  	}
>  }
>  
> +static void *display_thread_tui(void *arg __used)
> +{
> +	perf_top__tui_browser(&top);
> +	exit_browser(0);
> +	exit(0);
> +	return NULL;
> +}
> +
>  static void *display_thread(void *arg __used)
>  {
>  	struct pollfd stdin_poll = { .fd = 0, .events = POLLIN };
> @@ -1005,7 +1011,8 @@ static int __cmd_top(void)
>  
>  	perf_session__mmap_read(session);
>  
> -	if (pthread_create(&thread, NULL, display_thread, session)) {
> +	if (pthread_create(&thread, NULL, (use_browser > 0 ? display_thread_tui :
> +							     display_thread), session)) {
>  		printf("Could not create display thread.\n");
>  		exit(-1);
>  	}
> @@ -1078,6 +1085,8 @@ static const struct option options[] = {
>  		    "display this many functions"),
>  	OPT_BOOLEAN('U', "hide_user_symbols", &top.hide_user_symbols,
>  		    "hide user symbols"),
> +	OPT_BOOLEAN(0, "tui", &use_tui, "Use the TUI interface"),
> +	OPT_BOOLEAN(0, "stdio", &use_stdio, "Use the stdio interface"),
>  	OPT_INCR('v', "verbose", &verbose,
>  		    "be more verbose (show counter open errors, etc)"),
>  	OPT_END()
> @@ -1098,6 +1107,20 @@ int cmd_top(int argc, const char **argv, const char *prefix __used)
>  	if (argc)
>  		usage_with_options(top_usage, options);
>  
> +	/*
> + 	 * XXX For now start disabled, only using TUI if explicitely asked for.
> + 	 * Change that when handle_keys equivalent gets written, live annotation
> + 	 * done, etc.
> + 	 */
> +	use_browser = 0;
> +
> +	if (use_stdio)
> +		use_browser = 0;
> +	else if (use_tui)
> +		use_browser = 1;
> +
> +	setup_browser(false);
> +
>  	/* CPU and PID are mutually exclusive */
>  	if (top.target_tid > 0 && top.cpu_list) {
>  		printf("WARNING: PID switch overriding CPU\n");
> diff --git a/tools/perf/util/top.c b/tools/perf/util/top.c
> index c06cc53..1d2e265 100644
> --- a/tools/perf/util/top.c
> +++ b/tools/perf/util/top.c
> @@ -158,6 +158,7 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root)
>  	syme = list_entry(top->active_symbols.next, struct sym_entry, node);
>  	pthread_mutex_unlock(&top->active_symbols_lock);
>  
> +	top->rb_entries = 0;
>  	list_for_each_entry_safe_from(syme, n, &top->active_symbols, node) {
>  		syme->snap_count = syme->count[snap];
>  		if (syme->snap_count != 0) {
> @@ -170,7 +171,11 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root)
>  				continue;
>  			}
>  			syme->weight = sym_weight(syme, top);
> -			rb_insert_active_sym(root, syme);
> +
> +			if ((int)syme->snap_count >= top->count_filter) {
> +				rb_insert_active_sym(root, syme);
> +				++top->rb_entries;
> +			}
>  			sum_ksamples += syme->snap_count;
>  
>  			for (j = 0; j < top->evlist->nr_entries; j++)
> diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h
> index 0467b26..611370f 100644
> --- a/tools/perf/util/top.h
> +++ b/tools/perf/util/top.h
> @@ -38,6 +38,11 @@ struct sym_entry {
>  	unsigned long		count[0];
>  };
>  
> +static inline struct symbol *sym_entry__symbol(struct sym_entry *self)
> +{
> +       return ((void *)self) + symbol_conf.priv_size;
> +}
> +
>  struct perf_top {
>  	struct perf_evlist *evlist;
>  	/*
> @@ -51,7 +56,7 @@ struct perf_top {
>  	u64		   exact_samples;
>  	u64		   guest_us_samples, guest_kernel_samples;
>  	int		   print_entries, count_filter, delay_secs;
> -	int		   display_weighted, freq;
> +	int		   display_weighted, freq, rb_entries;
>  	int		   sym_counter, target_pid, target_tid;
>  	bool		   hide_kernel_symbols, hide_user_symbols, zero;
>  	const char	   *cpu_list;
> @@ -64,4 +69,12 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root);
>  void perf_top__find_widths(struct perf_top *top, struct rb_root *root,
>  			   int *dso_width, int *dso_short_width, int *sym_width);
>  
> +#ifdef NO_NEWT_SUPPORT
> +static inline int perf_top__tui_browser(struct perf_top *top __used)
> +{
> +	return 0;
> +}
> +#else
> +int perf_top__tui_browser(struct perf_top *top);
> +#endif
>  #endif /* __PERF_TOP_H */
> diff --git a/tools/perf/util/ui/browsers/top.c b/tools/perf/util/ui/browsers/top.c
> new file mode 100644
> index 0000000..ca60624
> --- /dev/null
> +++ b/tools/perf/util/ui/browsers/top.c
> @@ -0,0 +1,136 @@
> +/*
> + * Copyright (C) 2011, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
> + *
> + * Parts came from builtin-{top,stat,record}.c, see those files for further
> + * copyright notes.
> + *
> + * Released under the GPL v2. (and only v2, not any later version)
> + */
> +#include "../browser.h"
> +#include "../helpline.h"
> +#include "../libslang.h"
> +#include "../../evlist.h"
> +#include "../../hist.h"
> +#include "../../sort.h"
> +#include "../../symbol.h"
> +#include "../../top.h"
> +
> +struct perf_top_browser {
> +	struct ui_browser b;
> +	struct rb_root	  root;
> +	float		  sum_ksamples;
> +	int		  dso_width;
> +	int		  dso_short_width;
> +	int		  sym_width;
> +};
> +
> +static void perf_top_browser__write(struct ui_browser *browser, void *entry, int row)
> +{
> +	struct perf_top_browser *top_browser = container_of(browser, struct perf_top_browser, b);
> +	struct sym_entry *syme = rb_entry(entry, struct sym_entry, rb_node);
> +	bool current_entry = ui_browser__is_current_entry(browser, row);
> +	struct symbol *symbol = sym_entry__symbol(syme);
> +	struct perf_top *top = browser->priv;
> +	int width = browser->width;
> +	double pcnt;
> +
> +	pcnt = 100.0 - (100.0 * ((top_browser->sum_ksamples - syme->snap_count) /
> +				 top_browser->sum_ksamples));
> +	ui_browser__set_percent_color(browser, pcnt, current_entry);
> +
> +	if (top->evlist->nr_entries == 1 || !top->display_weighted) {
> +		slsmg_printf("%20.2f ", syme->weight);
> +		width -= 24;
> +	} else {
> +		slsmg_printf("%9.1f %10ld ", syme->weight, syme->snap_count);
> +		width -= 23;
> +	}
> +
> +	slsmg_printf("%4.1f%%", pcnt);
> +	width -= 7;
> +
> +	if (verbose) {
> +		slsmg_printf(" %016" PRIx64, symbol->start);
> +		width -= 17;
> +	}
> +
> +	slsmg_printf(" %-*.*s ", top_browser->sym_width, top_browser->sym_width,
> +		     symbol->name);
> +	width -= top_browser->sym_width;
> +	slsmg_write_nstring(width >= syme->map->dso->long_name_len ?
> +				syme->map->dso->long_name :
> +				syme->map->dso->short_name, width);


need update macro for that calling

[PATCH] perf: fix compiling for perf top tui

util/ui/browsers/top.c: In function ‘perf_top_browser__write’:
util/ui/browsers/top.c:60:2: error: cast to pointer from integer of different size
util/ui/browsers/top.c:60:2: error: comparison between pointer and integer
util/ui/browsers/top.c:60:2: error: passing argument 1 of ‘SLsmg_write_nstring’ discards qualifiers from pointer target type
/usr/include/slang.h:1728:16: note: expected ‘char *’ but argument is of type ‘const char *’
make: *** [util/ui/browsers/top.o] Error 1

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 tools/perf/util/ui/libslang.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6/tools/perf/util/ui/libslang.h
===================================================================
--- linux-2.6.orig/tools/perf/util/ui/libslang.h
+++ linux-2.6/tools/perf/util/ui/libslang.h
@@ -13,11 +13,11 @@
 
 #if SLANG_VERSION < 20104
 #define slsmg_printf(msg, args...) \
-	SLsmg_printf((char *)msg, ##args)
+	SLsmg_printf((char *)(msg), ##args)
 #define slsmg_write_nstring(msg, len) \
-	SLsmg_write_nstring((char *)msg, len)
+	SLsmg_write_nstring((char *)(msg), len)
 #define sltt_set_color(obj, name, fg, bg) \
-	SLtt_set_color(obj,(char *)name, (char *)fg, (char *)bg)
+	SLtt_set_color(obj,(char *)(name), (char *)(fg), (char *)(bg))
 #else
 #define slsmg_printf SLsmg_printf
 #define slsmg_write_nstring SLsmg_write_nstring

^ permalink raw reply

* Re: [RFC PATCH 4/3] block: skip elevator initialization for flush requests
From: Tejun Heo @ 2011-02-01 18:52 UTC (permalink / raw)
  To: Mike Snitzer
  Cc: axboe, tytso, djwong, shli, neilb, adilger.kernel, jack,
	linux-kernel, kmannth, cmm, linux-ext4, rwheeler, hch, josef,
	jmoyer
In-Reply-To: <20110201173846.GA25252@redhat.com>

Hello,

On Tue, Feb 01, 2011 at 12:38:46PM -0500, Mike Snitzer wrote:
> > I thought about doing it this way but I think we're burying the
> > REQ_FLUSH|REQ_FUA test logic too deep.  get_request() shouldn't
> > "magically" know not to allocate elevator data.
> 
> There is already a considerable amount of REQ_FLUSH|REQ_FUA special
> casing magic sprinkled though-out the block layer.  Why is this
> get_request() change the case that goes too far?

After the reimplementation, FLUSH implementation seems to be pretty
well isolated.  Also, having REQ_FLUSH logic in the issue and
completion paths is logical and preventing them from leaking to other
places sounds like a good idea.

> > The decision should
> > be made higher in the stack and passed down to get_request().  e.g. if
> > REQ_SORTED is set in @rw, elevator data is allocated; otherwise, not.
> 
> Considering REQ_SORTED is set in elv_insert(), well after get_request() 
> is called, I'm not seeing what you're suggesting.

I was suggesting using REQ_SORTED in @rw parameter to indicate "this
request may be sorted and thus needs elevator data allocation".

> Anyway, I agree that ideally we'd have a mechanism to explicitly
> short-circuit elevator initialization.  But doing so in a meaningful way
> would likely require a fair amount of refactoring of get_request* and
> its callers.  I'll come back to this and have another look but my gut is
> this interface churn wouldn't _really_ help -- all things considered.

I don't know.  I agree that it's not a critical issue but, to me,
subjectively of course, it feels a bit too subtle.  The sharing of
fields using unions is already subtle enough.  I with that at least
the allocation switching would be obvious and explicit.  The combined
subtleties scare me.

Thank you.

-- 
tejun

^ permalink raw reply

* Re: 2.6.38-rc2: Uhhuh. NMI received for unknown reason 2d on CPU 0.
From: Don Zickus @ 2011-02-01 18:51 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: George Spelvin, linux-kernel, Ingo Molnar, Peter Zijlstra,
	Lin Ming, Stephane Eranian
In-Reply-To: <4D48547F.5040905@gmail.com>

On Tue, Feb 01, 2011 at 09:44:15PM +0300, Cyrill Gorcunov wrote:
> On 02/01/2011 09:41 PM, Don Zickus wrote:
> ...
> > 
> > Unfortunately, I have not had success with patch below on my system. :-(
> > 
> > Cheers,
> > Don
> 
> You mean it didn't help?

Not that I noticed no.

Cheers,
Don

^ permalink raw reply

* Re: Xen 4.1.0 RC2 released,
From: Ian Jackson @ 2011-02-01 18:51 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel@lists.xensource.com, Nathan March
In-Reply-To: <1296502210.20804.203.camel@localhost.localdomain>

Ian Campbell writes ("Re: [Xen-devel] Xen 4.1.0 RC2 released,"):
> -LDFLAGS += $(shell getconf LFS_LDFLAGS)
> +LDFLAGS += $(shell getconf LFS_LDFLAGS) -Wl,--no-as-needed

Before I commit this change, I do wonder whether there are older
versions of GNU ld that don't support --as-needed and therefore break
with --no-as-needed.

Does anyone have an ancient build environment they could try this
patch on ?

Ian.

^ permalink raw reply

* Re: [PATCH] powerpc/mm: add devmem_is_allowed() for STRICT_DEVMEM checking
From: Scott Wood @ 2011-02-01 18:35 UTC (permalink / raw)
  To: Steve Best; +Cc: linuxppc-dev
In-Reply-To: <1296580906.5343.6.camel@dhcp-100-2-27.bos.redhat.com>

On Tue, 1 Feb 2011 12:21:45 -0500
Steve Best <sfbest@us.ibm.com> wrote:

> 
> On Mon, 2011-01-31 at 13:40 -0600, Scott Wood wrote:
> > I don't see how this is a sane thing to turn on by default (you're not
> > restricting it, BTW -- you're completely disabling it with that
> > implementation of devmem_is_allowed).  It will break anything that
> > uses /dev/mem to access I/O, 
> 
> could you expand on what I/O depends on /dev/mem, so I can take
> that into account?

It could be anything.  You're shutting off, by default, a
longstanding userspace interface, that already has adequate security
protection.

Even x86 doesn't default it to yes (though it does say "if in doubt
say Y"), and when enabled x86 only restricts access to memory, not I/O.

> > possibly including desktoppy stuff like X
> > servers, 
> 
> you are right just found out that X needs to access it. will 
> take that into account
> > as well as lots of stuff that goes on in embedded setups.
> 
> could you explain more about what needs access to /dev/mem in 
> the embedded setups?

All sorts of custom stuff -- userspace drivers, special memory regions
reserved at boot, etc.

If you really want this, I suggest prohibiting access only when it's an
actual RAM page tracked by the kernel (maybe only when PageReserved
is unset as well?), or when iomem_is_exclusive returns true.

-Scott

^ permalink raw reply

* Re: [BUG] broken ebba638ae723d8a8fc2f7abce5ec18b688b791d7
From: Rafael J. Wysocki @ 2011-02-01 18:50 UTC (permalink / raw)
  To: castet.matthieu
  Cc: Ingo Molnar, Kees Cook, H. Peter Anvin, Linux Kernel list,
	Jeremy Fitzhardinge
In-Reply-To: <1296565633.4d4805812c3f5@imp.free.fr>

On Tuesday, February 01, 2011, castet.matthieu@free.fr wrote:
> Quoting "Rafael J. Wysocki" <rjw@sisk.pl>:
> 
> > On Tuesday, February 01, 2011, matthieu castet wrote:
> > Well, in my not so humble opinion the amount of random fixes required by the
> > entire NX protection of kernel "data" pages is simply unacceptable.
> 
> What's the relation between this bug and NX protection of kernel "data" ?

Sorry, I confused threads.

Rafael

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.